GH Auto: Upstream dependencies ADF:8.1.0-14660630465 JS-API:9.1.0-14660630465 using Tag:8.1.0-14660630465 (#4533)

* [ci:force][auto-commit] Update dependencies ADF:8.1.0-14660630465  JS:9.1.0-14660630465

* [ACS-9564] Fix rendering of Knowledge Retrieval answer after change in answer structure

* incease viewer load time waiting

* exclude test XAT-5470 ACS-9580

---------

Co-authored-by: DenysVuika <503991+DenysVuika@users.noreply.github.com>
Co-authored-by: Aleksander Sklorz <Aleksander.Sklorz@hyland.com>
Co-authored-by: akashrathod28 <akash.rathod@hyland.com>
This commit is contained in:
Alfresco Build
2025-04-25 15:19:38 +02:00
committed by GitHub
parent ba1ef44fdf
commit 680b11ba2e
6 changed files with 54 additions and 41 deletions

View File

@@ -46,7 +46,14 @@ import { searchAiMarkedOptions } from './search-ai-marked-options';
const questionMock: QuestionModel = { question: 'test', questionId: 'testId', restrictionQuery: { nodesIds: [] } };
const getAiAnswerEntry = (noAnswer?: boolean): AiAnswerEntry => {
return { entry: { answer: noAnswer ? '' : 'Some answer', questionId: 'some id', references: [] } };
return {
entry: {
answer: noAnswer ? '' : 'Some answer',
question: 'some question',
objectReferences: [],
complete: true
}
};
};
describe('SearchAiResultsComponent', () => {
@@ -512,7 +519,12 @@ describe('SearchAiResultsComponent', () => {
spyOn(userPreferencesService, 'set');
spyOn(userPreferencesService, 'get').and.returnValue(knowledgeRetrievalNodes);
const answer = getAiAnswerEntry();
answer.entry.references = [{ referenceId: nodeId, referenceText: 'some text' }];
answer.entry.objectReferences = [
{
objectId: nodeId,
references: []
}
];
spyOn(searchAiService, 'getAnswer').and.returnValues(throwError('error'), of(answer));
mockQueryParams.next({ query: 'test', agentId: 'agentId1' });

View File

@@ -198,7 +198,7 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit {
}
this.queryAnswer = response.entry;
this._displayedAnswer = this.preprocessMarkdownFormat(response.entry.answer);
return forkJoin(this.queryAnswer.references.map((reference) => this.nodesApiService.getNode(reference.referenceId)));
return forkJoin(this.queryAnswer.objectReferences.map((reference) => this.nodesApiService.getNode(reference.objectId)));
}),
retryWhen((errors: Observable<Error>) => this.aiSearchRetryWhen(errors)),
finalize(() => (this._loading = false)),