@sinequa/assistant 3.9.5 → 3.9.6-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat/chat-message/chat-message.component.d.ts +17 -25
- package/chat/chat-message/i18n/de.json +11 -0
- package/chat/chat-reference/chat-reference.component.d.ts +18 -8
- package/chat/chat-reference/i18n/de.json +4 -0
- package/chat/chat-settings-v3/i18n/de.json +14 -0
- package/chat/chat.component.d.ts +2 -1
- package/chat/debug-message/debug-message-details/debug-message-details.component.d.ts +2 -3
- package/chat/debug-message/i18n/de.json +3 -0
- package/chat/dialogs/i18n/de.json +19 -0
- package/chat/directives/copy-to-clipboard.directive.d.ts +8 -0
- package/chat/documents-upload/document-list/document-list.component.d.ts +4 -9
- package/chat/documents-upload/document-overview/document-overview.component.d.ts +3 -17
- package/chat/documents-upload/document-upload/document-upload.component.d.ts +3 -8
- package/chat/documents-upload/documents-upload.service.d.ts +7 -16
- package/chat/documents-upload/i18n/de.json +24 -0
- package/chat/i18n/de.json +42 -0
- package/chat/markdown-it-plugins/code-block.plugin.d.ts +2 -0
- package/chat/markdown-it-plugins/image-reference.plugin.d.ts +3 -0
- package/chat/markdown-it-plugins/link.plugin.d.ts +5 -0
- package/chat/markdown-it-plugins/page-reference.plugin.d.ts +3 -0
- package/chat/markdown-it-plugins/reference.plugin.d.ts +7 -0
- package/chat/public-api.d.ts +2 -1
- package/chat/references/i18n/de.json +6 -0
- package/chat/references/references.component.d.ts +43 -0
- package/chat/saved-chats/i18n/de.json +5 -0
- package/chat/services/app.service.d.ts +2 -1
- package/chat/services/custom-elements.service.d.ts +13 -0
- package/chat/smart-renderer/smart-renderer.d.ts +23 -0
- package/chat/token-progress-bar/i18n/de.json +4 -0
- package/chat/tooltip/tooltip.directive.d.ts +2 -2
- package/chat/types.d.ts +8 -42
- package/esm2022/chat/chat-message/chat-message.component.mjs +33 -135
- package/esm2022/chat/chat-reference/chat-reference.component.mjs +60 -26
- package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +1 -1
- package/esm2022/chat/chat.component.mjs +48 -12
- package/esm2022/chat/chat.service.mjs +3 -2
- package/esm2022/chat/debug-message/debug-message-details/debug-message-details.component.mjs +2 -2
- package/esm2022/chat/debug-message/debug-message.service.mjs +4 -7
- package/esm2022/chat/directives/copy-to-clipboard.directive.mjs +68 -0
- package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +21 -22
- package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +8 -31
- package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +12 -14
- package/esm2022/chat/documents-upload/documents-upload.service.mjs +25 -44
- package/esm2022/chat/markdown-it-plugins/code-block.plugin.mjs +14 -0
- package/esm2022/chat/markdown-it-plugins/image-reference.plugin.mjs +58 -0
- package/esm2022/chat/markdown-it-plugins/link.plugin.mjs +15 -0
- package/esm2022/chat/markdown-it-plugins/page-reference.plugin.mjs +60 -0
- package/esm2022/chat/markdown-it-plugins/reference.plugin.mjs +68 -0
- package/esm2022/chat/public-api.mjs +3 -2
- package/esm2022/chat/references/references.component.mjs +290 -0
- package/esm2022/chat/saved-chats/saved-chats.component.mjs +4 -3
- package/esm2022/chat/saved-chats/saved-chats.service.mjs +9 -12
- package/esm2022/chat/services/app.service.mjs +8 -2
- package/esm2022/chat/services/assistant-configuration.service.mjs +9 -18
- package/esm2022/chat/services/assistant-metadata.service.mjs +3 -3
- package/esm2022/chat/services/assistant-tokens-tracking.service.mjs +3 -6
- package/esm2022/chat/services/custom-elements.service.mjs +43 -0
- package/esm2022/chat/smart-renderer/smart-renderer.mjs +103 -0
- package/esm2022/chat/tooltip/tooltip.directive.mjs +9 -9
- package/esm2022/chat/types.mjs +2 -5
- package/fesm2022/sinequa-assistant-chat.mjs +908 -497
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -1
- package/package.json +4 -6
- package/chat/prompt.component.d.ts +0 -25
- package/chat/unified-plugins/embedded-image-reference.plugin.d.ts +0 -3
- package/chat/unified-plugins/embedded-page-reference.plugin.d.ts +0 -3
- package/esm2022/chat/prompt.component.mjs +0 -88
- package/esm2022/chat/unified-plugins/embedded-image-reference.plugin.mjs +0 -56
- package/esm2022/chat/unified-plugins/embedded-page-reference.plugin.mjs +0 -57
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "prismjs-components-importer/esm";
|
|
3
|
-
import "prismjs/plugins/autoloader/prism-autoloader";
|
|
4
|
-
import { Processor } from "unified";
|
|
5
|
-
import { Node } from "unist";
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, SimpleChanges } from "@angular/core";
|
|
6
2
|
import { PrincipalService } from "../services/principal.service";
|
|
7
3
|
import { UIService } from "../services/ui.service";
|
|
8
4
|
import { ChatContextAttachment, ChatMessage, SuggestedAction } from "../types";
|
|
9
5
|
import { MessageImageReference } from "../types/message-reference.types";
|
|
10
6
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class ChatMessageComponent implements OnChanges
|
|
7
|
+
export declare class ChatMessageComponent implements OnChanges {
|
|
12
8
|
ui: UIService;
|
|
13
9
|
principalService: PrincipalService;
|
|
14
10
|
cdr: ChangeDetectorRef;
|
|
15
11
|
el: ElementRef;
|
|
12
|
+
id: import("@angular/core").InputSignal<string | undefined>;
|
|
16
13
|
message: ChatMessage;
|
|
17
14
|
conversation: ChatMessage[];
|
|
18
15
|
suggestedActions: SuggestedAction[] | undefined;
|
|
@@ -27,6 +24,7 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
|
|
|
27
24
|
canDebug: boolean;
|
|
28
25
|
canLike: boolean;
|
|
29
26
|
canDislike: boolean;
|
|
27
|
+
collapseReferences: boolean;
|
|
30
28
|
openDocument: EventEmitter<{
|
|
31
29
|
reference: ChatContextAttachment;
|
|
32
30
|
partId?: number;
|
|
@@ -42,44 +40,38 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
|
|
|
42
40
|
like: EventEmitter<any>;
|
|
43
41
|
dislike: EventEmitter<any>;
|
|
44
42
|
debug: EventEmitter<ChatMessage>;
|
|
45
|
-
|
|
46
|
-
references: string[]
|
|
43
|
+
refs: import("@angular/core").WritableSignal<number[]>;
|
|
44
|
+
references: import("@angular/core").Signal<string[]>;
|
|
47
45
|
referenceMap: Map<string, ChatContextAttachment>;
|
|
48
46
|
imageReferencesMap: Map<string, MessageImageReference>;
|
|
49
47
|
pageReferencesMap: Map<string, MessageImageReference>;
|
|
50
|
-
showReferences: boolean;
|
|
51
48
|
collapseProgress: boolean;
|
|
52
49
|
iconSize: number;
|
|
53
50
|
hiddenTooltip: boolean;
|
|
51
|
+
Array: ArrayConstructor;
|
|
54
52
|
constructor(ui: UIService, principalService: PrincipalService, cdr: ChangeDetectorRef, el: ElementRef);
|
|
55
53
|
ngOnChanges(changes: SimpleChanges): void;
|
|
56
|
-
ngAfterViewInit(): void;
|
|
57
54
|
getEmbeddedImageReference(ref: string): MessageImageReference | undefined;
|
|
58
55
|
getEmbeddedPageReference(ref: string): MessageImageReference | undefined;
|
|
59
56
|
get name(): string;
|
|
60
57
|
get isAdmin(): boolean;
|
|
61
58
|
processMessageType(message: ChatMessage): void;
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
60
|
+
* Processes a reference string by validating and adding it to the set of references if applicable.
|
|
61
|
+
*
|
|
62
|
+
* - Ignores empty or falsy references.
|
|
63
|
+
* - Ignores references that are not numeric.
|
|
64
|
+
* - Ignores references that already exist in the set.
|
|
65
|
+
* - Converts the reference to a number and adds it to the set of references.
|
|
66
|
+
*
|
|
67
|
+
* @param ref - The reference string to process.
|
|
65
68
|
*/
|
|
66
|
-
|
|
67
|
-
placeholderPlugin: (tree: Node) => Node<import("unist").Data>;
|
|
68
|
-
getLinkText(node: any): string;
|
|
69
|
-
/**
|
|
70
|
-
* Reformat [ids: 12.2, 42.5] to [12.2][42.5]
|
|
71
|
-
*/
|
|
72
|
-
reformatReferences(content: string): string;
|
|
73
|
-
/**
|
|
74
|
-
* Match all references in a given message
|
|
75
|
-
*/
|
|
76
|
-
getReferenceMatches(content: string): RegExpExecArray[];
|
|
69
|
+
processReferences(ref: string): void;
|
|
77
70
|
private _copyToClipboard;
|
|
78
71
|
copyMessage(message: ChatMessage): void;
|
|
79
|
-
copyCode(code: string): void;
|
|
80
72
|
openAttachmentPreview(attachment: ChatContextAttachment, partId?: number): void;
|
|
81
73
|
openOriginalAttachment(attachment: ChatContextAttachment, partId?: number): void;
|
|
82
74
|
hideTooltip(): void;
|
|
83
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
84
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "sq-chat-message", never, { "message": { "alias": "message"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "suggestedActions": { "alias": "suggestedActions"; "required": false; }; "assistantMessageIcon": { "alias": "assistantMessageIcon"; "required": false; }; "userMessageIcon": { "alias": "userMessageIcon"; "required": false; }; "connectionErrorMessageIcon": { "alias": "connectionErrorMessageIcon"; "required": false; }; "searchWarningMessageIcon": { "alias": "searchWarningMessageIcon"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "canEdit": { "alias": "canEdit"; "required": false; }; "canRegenerate": { "alias": "canRegenerate"; "required": false; }; "canCopy": { "alias": "canCopy"; "required": false; }; "canDebug": { "alias": "canDebug"; "required": false; }; "canLike": { "alias": "canLike"; "required": false; }; "canDislike": { "alias": "canDislike"; "required": false; }; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; "edit": "edit"; "copy": "copy"; "regenerate": "regenerate"; "like": "like"; "dislike": "dislike"; "debug": "debug"; }, never, never, true, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "sq-chat-message", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "suggestedActions": { "alias": "suggestedActions"; "required": false; }; "assistantMessageIcon": { "alias": "assistantMessageIcon"; "required": false; }; "userMessageIcon": { "alias": "userMessageIcon"; "required": false; }; "connectionErrorMessageIcon": { "alias": "connectionErrorMessageIcon"; "required": false; }; "searchWarningMessageIcon": { "alias": "searchWarningMessageIcon"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "canEdit": { "alias": "canEdit"; "required": false; }; "canRegenerate": { "alias": "canRegenerate"; "required": false; }; "canCopy": { "alias": "canCopy"; "required": false; }; "canDebug": { "alias": "canDebug"; "required": false; }; "canLike": { "alias": "canLike"; "required": false; }; "canDislike": { "alias": "canDislike"; "required": false; }; "collapseReferences": { "alias": "collapseReferences"; "required": false; }; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; "edit": "edit"; "copy": "copy"; "regenerate": "regenerate"; "like": "like"; "dislike": "dislike"; "debug": "debug"; }, never, never, true, never>;
|
|
85
77
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"viewProgress": "Fortschritt anzeigen",
|
|
3
|
+
"copyCode": "Code kopieren",
|
|
4
|
+
"references": "Referenzen",
|
|
5
|
+
"copyText": "Text kopieren",
|
|
6
|
+
"editMessage": "Nachricht bearbeiten",
|
|
7
|
+
"likeAnswer": "Antwort gefällt mir",
|
|
8
|
+
"reportIssue": "Problem melden",
|
|
9
|
+
"regenerateResponse": "Antwort neu generieren",
|
|
10
|
+
"showLogInformation": "Log informationen anzeigen"
|
|
11
|
+
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChatContextAttachment, DocumentPart } from
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { ChatContextAttachment, DocumentPart } from "../types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ChatReferenceComponent {
|
|
5
|
-
reference: string
|
|
6
|
-
attachment: ChatContextAttachment
|
|
7
|
-
partId
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
readonly reference: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly attachment: import("@angular/core").InputSignal<ChatContextAttachment>;
|
|
7
|
+
readonly partId: import("@angular/core").InputSignal<number | undefined>;
|
|
8
|
+
readonly referenceMap: import("@angular/core").InputSignal<Map<string, ChatContextAttachment> | undefined>;
|
|
9
|
+
readonly images: import("@angular/core").InputSignal<string[]>;
|
|
10
|
+
readonly pages: import("@angular/core").InputSignal<string[]>;
|
|
11
|
+
readonly openDocument: import("@angular/core").OutputEmitterRef<ChatContextAttachment>;
|
|
12
|
+
readonly openPreview: import("@angular/core").OutputEmitterRef<ChatContextAttachment>;
|
|
13
|
+
readonly modalTpl: import("@angular/core").Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
14
|
+
readonly modalRef: import("@angular/core").WritableSignal<any>;
|
|
15
|
+
readonly groupedImagesIds: import("@angular/core").Signal<Record<string, number[]>>;
|
|
16
|
+
readonly groupedPagesIds: import("@angular/core").Signal<Record<string, number[]>>;
|
|
10
17
|
get parts(): DocumentPart[];
|
|
18
|
+
findImage: (arr: any[], number: number) => any | undefined;
|
|
19
|
+
findPage: (arr: any[], number: number) => any | undefined;
|
|
11
20
|
expandAttachment(): void;
|
|
21
|
+
modalClicked(ref: any): void;
|
|
12
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatReferenceComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatReferenceComponent, "sq-chat-reference", never, { "reference": { "alias": "reference"; "required":
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatReferenceComponent, "sq-chat-reference", never, { "reference": { "alias": "reference"; "required": true; "isSignal": true; }; "attachment": { "alias": "attachment"; "required": true; "isSignal": true; }; "partId": { "alias": "partId"; "required": false; "isSignal": true; }; "referenceMap": { "alias": "referenceMap"; "required": false; "isSignal": true; }; "images": { "alias": "images"; "required": false; "isSignal": true; }; "pages": { "alias": "pages"; "required": false; "isSignal": true; }; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; }, never, never, true, never>;
|
|
14
24
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"model": "Modell",
|
|
3
|
+
"functions": "Funktionen",
|
|
4
|
+
"debug": "Debug",
|
|
5
|
+
"advancedParameters": "Erweiterte Parameter",
|
|
6
|
+
"temperature": "Temperatur",
|
|
7
|
+
"topP": "Top P",
|
|
8
|
+
"MaxGeneratedTokens": "Max. generierte Token pro Antwort",
|
|
9
|
+
"Prompts": "Eingabeaufforderungen",
|
|
10
|
+
"systemPrompt": "Systemaufforderung (verborgen)",
|
|
11
|
+
"initialUserPrompt": "Anfängliche Benutzereingabe",
|
|
12
|
+
"cancel": "Abbrechen",
|
|
13
|
+
"save": "Speichern"
|
|
14
|
+
}
|
package/chat/chat.component.d.ts
CHANGED
|
@@ -345,7 +345,8 @@ export declare class ChatComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
345
345
|
/**
|
|
346
346
|
* Handle the click on a suggested action.
|
|
347
347
|
* @param action Suggested action.
|
|
348
|
-
* @param index
|
|
348
|
+
* @param index index of the message containing the suggested action.
|
|
349
|
+
* @returns void
|
|
349
350
|
*/
|
|
350
351
|
suggestActionClick(action: SuggestedAction, index: number): void;
|
|
351
352
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AfterViewInit } from "@angular/core";
|
|
2
|
-
import { KvObject, ListObject } from "../../types";
|
|
3
1
|
import { UIService } from "../../services/ui.service";
|
|
2
|
+
import { KvObject, ListObject } from "../../types";
|
|
4
3
|
import { DebugMessageService } from "../debug-message.service";
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DebugMessageDetailsComponent
|
|
5
|
+
export declare class DebugMessageDetailsComponent {
|
|
7
6
|
ui: UIService;
|
|
8
7
|
debugMessageService: DebugMessageService;
|
|
9
8
|
data: (KvObject | ListObject)[] | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deleteSavedDiscussion": "Diskussion löschen",
|
|
3
|
+
"deleteSavedDiscussionText": "Sie sind dabei, die Diskussion zu löschen",
|
|
4
|
+
"deleteSavedDiscussionConfirm": "Möchten Sie fortfahren?",
|
|
5
|
+
"cancel": "Abbrechen",
|
|
6
|
+
"confirm": "Bestätigen",
|
|
7
|
+
"deleteSavedDiscussionSuccess": "Die Diskussion '{{title}}' wurde erfolgreich gelöscht.",
|
|
8
|
+
"deleteSavedDiscussionError": "Beim Löschen der Diskussion '{{title}}' ist ein Fehler aufgetreten.",
|
|
9
|
+
"renameSavedDiscussion": "Diskussion umbenennen",
|
|
10
|
+
"renameSavedDiscussionText": "Bitte geben Sie einen neuen Namen für die Diskussion ein",
|
|
11
|
+
"rename": "Umbenennen",
|
|
12
|
+
"renameSavedDiscussionSuccess": "Die Diskussion '{{currentTitle}}' wurde erfolgreich in '{{title}}' umbenannt.",
|
|
13
|
+
"renameSavedDiscussionError": "Beim Umbenennen der Diskussion '{{currentTitle}}' ist ein Fehler aufgetreten.",
|
|
14
|
+
"availableUpdates": "Updates verfügbar!",
|
|
15
|
+
"availableUpdatesText": "An der Standardkonfiguration wurden Änderungen vorgenommen. Möchten Sie Ihre eigene Version aktualisieren?",
|
|
16
|
+
"seeNoMore": "Nicht mehr anzeigen",
|
|
17
|
+
"remindMeLater": "Später erinnern",
|
|
18
|
+
"update": "Aktualisieren"
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopyToClipboardDirective {
|
|
3
|
+
private el;
|
|
4
|
+
text: import("@angular/core").InputSignal<string>;
|
|
5
|
+
onClick(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopyToClipboardDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CopyToClipboardDirective, "[copy-to-clipboard]", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
2
|
import { BehaviorSubject } from "rxjs";
|
|
3
|
-
import { InstanceManagerService } from "../../instance-manager.service";
|
|
4
|
-
import { ChatService } from "../../chat.service";
|
|
5
3
|
import { DocumentsUploadService } from "../documents-upload.service";
|
|
6
4
|
import { UploadedDocument } from "../documents-upload.model";
|
|
7
5
|
import { NotificationsService } from "../../services/notification.service";
|
|
6
|
+
import { AppService } from "../../services/app.service";
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
10
|
-
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
11
|
-
instanceId: string;
|
|
12
|
-
chatService: ChatService;
|
|
13
9
|
groupedUploadedDocuments$: BehaviorSubject<{
|
|
14
10
|
key: string;
|
|
15
11
|
value: UploadedDocument[];
|
|
@@ -17,21 +13,20 @@ export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
|
17
13
|
documentToDelete?: UploadedDocument;
|
|
18
14
|
deletingAll: boolean;
|
|
19
15
|
private _subscription;
|
|
20
|
-
instanceManagerService: InstanceManagerService;
|
|
21
16
|
documentsUploadService: DocumentsUploadService;
|
|
22
17
|
notificationsService: NotificationsService;
|
|
18
|
+
appService: AppService;
|
|
23
19
|
private readonly transloco;
|
|
24
20
|
private readonly assistantUtils;
|
|
25
21
|
ngOnInit(): void;
|
|
26
22
|
ngOnDestroy(): void;
|
|
27
|
-
instantiateChatService(): void;
|
|
28
23
|
/**
|
|
29
24
|
* Updates the list of uploaded documents by fetching the latest data from the service.
|
|
30
25
|
* The fetched documents are grouped by date.
|
|
31
26
|
*
|
|
32
27
|
* @returns {void}
|
|
33
28
|
*/
|
|
34
|
-
|
|
29
|
+
onUpdateUploadedDocumentsList(): void;
|
|
35
30
|
deleteDocument(event: Event, doc: UploadedDocument): void;
|
|
36
31
|
/**
|
|
37
32
|
* Handles the deletion of an uploaded document. This method triggers a confirmation modal
|
|
@@ -65,5 +60,5 @@ export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
|
65
60
|
performDeleteAllDocuments(): void;
|
|
66
61
|
private _groupUploadedDocumentsByDate;
|
|
67
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "sq-document-list", never, {
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "sq-document-list", never, {}, {}, never, never, true, never>;
|
|
69
64
|
}
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
|
-
import { BehaviorSubject } from "rxjs";
|
|
3
|
-
import { InstanceManagerService } from "../../instance-manager.service";
|
|
4
|
-
import { ChatService } from "../../chat.service";
|
|
5
2
|
import { DocumentsUploadService } from "../documents-upload.service";
|
|
6
|
-
import { UploadedDocument } from "../documents-upload.model";
|
|
7
3
|
import { NotificationsService } from "../../services/notification.service";
|
|
4
|
+
import { AppService } from "../../services/app.service";
|
|
8
5
|
import * as i0 from "@angular/core";
|
|
9
6
|
export declare class DocumentOverviewComponent implements OnInit, OnDestroy {
|
|
10
|
-
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
11
|
-
instanceId: string;
|
|
12
7
|
disabledUpload: boolean;
|
|
13
8
|
onUpload: EventEmitter<any>;
|
|
14
|
-
chatService: ChatService;
|
|
15
|
-
uploadedDocuments$: BehaviorSubject<UploadedDocument[]>;
|
|
16
9
|
private _subscription;
|
|
17
|
-
instanceManagerService: InstanceManagerService;
|
|
18
10
|
documentsUploadService: DocumentsUploadService;
|
|
19
11
|
notificationsService: NotificationsService;
|
|
12
|
+
appService: AppService;
|
|
20
13
|
ngOnInit(): void;
|
|
21
14
|
ngOnDestroy(): void;
|
|
22
|
-
instantiateChatService(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Updates the list of uploaded documents by fetching the latest data from the service.
|
|
25
|
-
*
|
|
26
|
-
* @returns {void}
|
|
27
|
-
*/
|
|
28
|
-
updateUploadedDocumentsList(): void;
|
|
29
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentOverviewComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentOverviewComponent, "sq-document-overview", never, { "
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentOverviewComponent, "sq-document-overview", never, { "disabledUpload": { "alias": "disabledUpload"; "required": false; }; }, { "onUpload": "onUpload"; }, never, never, true, never>;
|
|
31
17
|
}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
2
|
import { FlowDirective, Transfer } from "@flowjs/ngx-flow";
|
|
3
3
|
import { BehaviorSubject } from "rxjs";
|
|
4
|
-
import { InstanceManagerService } from "../../instance-manager.service";
|
|
5
|
-
import { ChatService } from "../../chat.service";
|
|
6
4
|
import { DocumentsUploadService } from "../documents-upload.service";
|
|
7
5
|
import { IndexingInfos, UploadingInfos } from "../documents-upload.model";
|
|
8
6
|
import { NotificationsService } from "../../services/notification.service";
|
|
7
|
+
import { AppService } from "../../services/app.service";
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
11
|
-
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
12
|
-
instanceId: string;
|
|
13
10
|
/** Polling interval in milliseconds to update the indexing status of the uploaded documents */
|
|
14
11
|
pollingInterval: number;
|
|
15
12
|
flow: FlowDirective;
|
|
16
|
-
chatService: ChatService;
|
|
17
13
|
readonly flowConfig: flowjs.FlowOptions;
|
|
18
14
|
errorAlerts: string[];
|
|
19
15
|
dragging$: BehaviorSubject<boolean>;
|
|
@@ -22,13 +18,12 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
22
18
|
uploading$: BehaviorSubject<boolean>;
|
|
23
19
|
uploadingInfos$: BehaviorSubject<UploadingInfos | undefined>;
|
|
24
20
|
private _subscription;
|
|
25
|
-
instanceManagerService: InstanceManagerService;
|
|
26
21
|
documentsUploadService: DocumentsUploadService;
|
|
27
22
|
notificationsService: NotificationsService;
|
|
23
|
+
appService: AppService;
|
|
28
24
|
private readonly transloco;
|
|
29
25
|
ngOnInit(): void;
|
|
30
26
|
ngOnDestroy(): void;
|
|
31
|
-
instantiateChatService(): void;
|
|
32
27
|
/**
|
|
33
28
|
* Handles the submission of files.
|
|
34
29
|
*
|
|
@@ -92,5 +87,5 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
92
87
|
*/
|
|
93
88
|
getIndexingProgress(infos: IndexingInfos | undefined): number;
|
|
94
89
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadComponent, never>;
|
|
95
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "sq-document-upload", never, { "
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "sq-document-upload", never, { "pollingInterval": { "alias": "pollingInterval"; "required": false; }; }, {}, never, never, true, never>;
|
|
96
91
|
}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import { ChatService } from '../chat.service';
|
|
2
1
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
-
import { deleteDocumentsResponse, IndexingInfos, UploadConfig, UploadedDocuments, UploadEvent } from './documents-upload.model';
|
|
2
|
+
import { deleteDocumentsResponse, IndexingInfos, UploadConfig, UploadedDocument, UploadedDocuments, UploadEvent } from './documents-upload.model';
|
|
4
3
|
import { HttpClient } from '@angular/common/http';
|
|
5
4
|
import { AppService } from '../services/app.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class DocumentsUploadService {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Documents' upload configuration. */
|
|
7
|
+
readonly REQUEST_URL = "api/v1/plugin/SinequaAssistantREST";
|
|
8
|
+
/** Documents upload configuration. */
|
|
11
9
|
uploadConfig$: BehaviorSubject<UploadConfig | undefined>;
|
|
12
|
-
|
|
10
|
+
/** Emit the list of indexed documents */
|
|
11
|
+
uploadedDocuments$: BehaviorSubject<UploadedDocument[] | undefined>;
|
|
13
12
|
appService: AppService;
|
|
14
13
|
http: HttpClient;
|
|
15
14
|
/**
|
|
16
|
-
* Initializes the file upload service
|
|
17
|
-
*
|
|
18
|
-
* @param chatService - An instance of ChatService. If not provided, an error is thrown.
|
|
19
|
-
* @throws {Error} If the chatService instance is not provided or if there is an error during initialization.
|
|
20
|
-
*/
|
|
21
|
-
init(chatService: ChatService | undefined): void;
|
|
22
|
-
/**
|
|
23
|
-
* Fetch the endpoint to use for the file upload related requests
|
|
24
|
-
* @throws {Error} If the property 'restEndpoint' is not provided in the assistant configuration
|
|
15
|
+
* Initializes the file upload service.
|
|
25
16
|
*/
|
|
26
|
-
|
|
17
|
+
init(): void;
|
|
27
18
|
/**
|
|
28
19
|
* Retrieves the upload configuration for documents.
|
|
29
20
|
* The response, which contains the upload configuration, is emitted to the `uploadConfig$` observable.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cancel": "Abbrechen",
|
|
3
|
+
"confirm": "Bestätigen",
|
|
4
|
+
"delete": "Löschen",
|
|
5
|
+
"deleteDocumentText": "Sie sind dabei, das Dokument '{{title}}' zu löschen. Möchten Sie fortfahren?",
|
|
6
|
+
"deleteDocumentSuccess": "Das Dokument '{{title}}' wurde erfolgreich gelöscht.",
|
|
7
|
+
"deleteDocumentError": "Beim Löschen des Dokuments '{{title}}' ist ein Fehler aufgetreten.",
|
|
8
|
+
"deleteAllDocumentsText": "Sie sind dabei, alle Dokumente zu löschen. Möchten Sie fortfahren?",
|
|
9
|
+
"deleteAllDocumentsSuccess": "Alle Dokumente wurden erfolgreich gelöscht.",
|
|
10
|
+
"deleteAllDocumentsError": "Beim Löschen aller Dokumente ist ein Fehler aufgetreten.",
|
|
11
|
+
"uploadedDocuments": "{count, plural,=0 {Keine Dokumente hochgeladen} one {# hochgeladenes Dokument} other {# hochgeladene Dokumente}}",
|
|
12
|
+
"uploadToSources": "In Quellen hochladen",
|
|
13
|
+
"dragAndDrop": "Dateien hier ablegen oder",
|
|
14
|
+
"clickToBrowse": "klicken zum Durchsuchen",
|
|
15
|
+
"dropFiles": "Dateien hier ablegen",
|
|
16
|
+
"uploadingFiles": "{count, plural, one {Lade # Datei hoch} other {Lade # Dateien hoch}}",
|
|
17
|
+
"indexingFiles": "{count, plural, one {Indiziere # Datei} other {Indiziere # Dateien}}",
|
|
18
|
+
"upload": "Hochladen",
|
|
19
|
+
"filesNumberLimitExceeded": "Die Anzahl der Dateien überschreitet das zulässige Limit. Sie können maximal {{max}} Dateien hochladen.",
|
|
20
|
+
"filesSizeLimitExceeded": "Die Gesamtgröße der Dateien überschreitet das zulässige Limit. Sie können Dateien bis zu {{max}} MB hochladen.",
|
|
21
|
+
"fileExtensionUnsupported": "Die Dateierweiterung {{extension}} wird nicht unterstützt.",
|
|
22
|
+
"errorUploadingFiles": "Beim Hochladen der Dateien ist ein Fehler aufgetreten.",
|
|
23
|
+
"errorIndexingStatus": "Fehler beim Abrufen des Indizierungsstatus."
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tryAgain": "Erneut versuchen",
|
|
3
|
+
"loading": "Wird geladen…",
|
|
4
|
+
"askSomething": "Stellen Sie eine Frage",
|
|
5
|
+
"sendMessage": "Nachricht senden",
|
|
6
|
+
"cancelEdition": "Bearbeitung abbrechen",
|
|
7
|
+
"generating": "Generiere",
|
|
8
|
+
"stopping": "Stoppe",
|
|
9
|
+
"stopGeneration": "Generierung stoppen",
|
|
10
|
+
"issueType": "Problemtyp",
|
|
11
|
+
"chooseIssueType": "Wählen Sie einen Problemtyp",
|
|
12
|
+
"askUnlikeReasons": "Was war an dieser Antwort unbefriedigend? (optional)",
|
|
13
|
+
"askLikeReasons": "Was hat Ihnen an dieser Antwort gefallen? (optional)",
|
|
14
|
+
"writeComment": "Schreiben Sie Ihren Kommentar",
|
|
15
|
+
"send": "Senden",
|
|
16
|
+
"doNotSend": "Bericht nicht senden",
|
|
17
|
+
"userInterfaceBug": "Fehler in der Benutzeroberfläche",
|
|
18
|
+
"incorrectResponse": "Falsche oder irreführende Antwort",
|
|
19
|
+
"incompleteResponse": "Unvollständige Antwort",
|
|
20
|
+
"technicalIssue": "Technisches Problem",
|
|
21
|
+
"privacyDataSecurityIssue": "Datenschutz- oder Sicherheitsproblem",
|
|
22
|
+
"otherIssue": "Anderes Problem",
|
|
23
|
+
"sendReportNotification": "Ihr Bericht wurde erfolgreich gesendet",
|
|
24
|
+
"today": "Heute",
|
|
25
|
+
"yesterday": "Gestern",
|
|
26
|
+
"thisWeek": "Diese Woche",
|
|
27
|
+
"lastWeek": "Letzte Woche",
|
|
28
|
+
"thisMonth": "Dieser Monat",
|
|
29
|
+
"lastMonth": "Letzter Monat",
|
|
30
|
+
"thisQuarter": "Dieses Quartal",
|
|
31
|
+
"lastQuarter": "Letztes Quartal",
|
|
32
|
+
"thisYear": "Dieses Jahr",
|
|
33
|
+
"lastYear": "Letztes Jahr",
|
|
34
|
+
"clipboard": {
|
|
35
|
+
"success": "\"{{value}}\" wurde in die Zwischenablage kopiert.",
|
|
36
|
+
"fail": "Kopieren fehlgeschlagen."
|
|
37
|
+
},
|
|
38
|
+
"saveChatConfig": {
|
|
39
|
+
"success": "Die Konfiguration der Assistenten-Instanz {{value}} wurde erfolgreich aktualisiert.",
|
|
40
|
+
"fail": "Die Aktualisierung der Assistenten-Instanz {{value}} ist fehlgeschlagen."
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type MarkdownIt from "markdown-it";
|
|
2
|
+
/**
|
|
3
|
+
* A markdown-it plugin to convert [n] where n is a number into a <reference id="n">n</reference> HTML tag.
|
|
4
|
+
*
|
|
5
|
+
* For example, [123] will be converted to <reference id="123">123</reference>.
|
|
6
|
+
*/
|
|
7
|
+
export declare function markdownItReferencePlugin(md: MarkdownIt): void;
|
package/chat/public-api.d.ts
CHANGED
|
@@ -6,10 +6,11 @@ export * from './initials-avatar/initials-avatar.component';
|
|
|
6
6
|
export * from './format-icon/format-icon.component';
|
|
7
7
|
export * from './types';
|
|
8
8
|
export * from './instance-manager.service';
|
|
9
|
-
export * from './prompt.component';
|
|
10
9
|
export * from './documents-upload/document-upload/document-upload.component';
|
|
11
10
|
export * from './documents-upload/document-list/document-list.component';
|
|
12
11
|
export * from './documents-upload/documents-upload.service';
|
|
13
12
|
export * from './documents-upload/documents-upload.model';
|
|
14
13
|
export * from './documents-upload/document-overview/document-overview.component';
|
|
15
14
|
export * from './services/notification.service';
|
|
15
|
+
export * from './services/custom-elements.service';
|
|
16
|
+
export * from './references/references.component';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ElementRef, OnChanges } from "@angular/core";
|
|
2
|
+
import { ChatContextAttachment } from "../types";
|
|
3
|
+
import type { MessageImageReference } from "../types/message-reference.types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ReferenceComponent implements OnChanges {
|
|
6
|
+
id: any;
|
|
7
|
+
attachment: any;
|
|
8
|
+
rank: number;
|
|
9
|
+
ref: ChatContextAttachment;
|
|
10
|
+
ngOnChanges(): void;
|
|
11
|
+
onOpenPreview(attachment: ChatContextAttachment, partId?: number): void;
|
|
12
|
+
onOpenDocument(attachment: ChatContextAttachment, partId?: number): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReferenceComponent, "reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; "rank": { "alias": "rank"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
export declare class PageReferenceComponent implements OnChanges {
|
|
17
|
+
id: any;
|
|
18
|
+
attachment: any;
|
|
19
|
+
ref: MessageImageReference;
|
|
20
|
+
ngOnChanges(): void;
|
|
21
|
+
onOpenPreview(attachment: ChatContextAttachment, partId?: number): void;
|
|
22
|
+
onOpenDocument(attachment: ChatContextAttachment, partId?: number): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageReferenceComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageReferenceComponent, "page-reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
export declare class ImageReferenceComponent implements OnChanges {
|
|
27
|
+
id: any;
|
|
28
|
+
attachment: any;
|
|
29
|
+
ref: MessageImageReference;
|
|
30
|
+
ngOnChanges(): void;
|
|
31
|
+
onOpenPreview(attachment: ChatContextAttachment, partId?: number): void;
|
|
32
|
+
onOpenDocument(attachment: ChatContextAttachment, partId?: number): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageReferenceComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageReferenceComponent, "image-reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
export declare class CodeBlockReferenceComponent {
|
|
37
|
+
langname: string;
|
|
38
|
+
el: ElementRef<any>;
|
|
39
|
+
encodeCode: string;
|
|
40
|
+
ngAfterViewInit(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeBlockReferenceComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeBlockReferenceComponent, "code-block-reference", never, { "langname": { "alias": "langname"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CCApp } from "@sinequa/atomic";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class AppService {
|
|
4
|
-
app: CCApp;
|
|
4
|
+
app: CCApp | undefined;
|
|
5
|
+
init(): Promise<void>;
|
|
5
6
|
get appName(): string;
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
|
|
7
8
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Service to register custom elements in the Angular application.
|
|
4
|
+
* This service is used to define custom elements that can be used in the application.
|
|
5
|
+
* It is called through APP_INITIALIZER to ensure that custom elements are registered before the application starts.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CustomElementsService {
|
|
8
|
+
private _injector;
|
|
9
|
+
setupCustomElements(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomElementsService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CustomElementsService>;
|
|
12
|
+
}
|
|
13
|
+
export declare function initializeCustomElements(customElementsService: CustomElementsService): () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
2
|
+
import "prismjs-components-importer/esm";
|
|
3
|
+
import "prismjs/plugins/autoloader/prism-autoloader";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SafeHtmlPipe {
|
|
6
|
+
private sanitizer;
|
|
7
|
+
constructor(sanitizer: DomSanitizer);
|
|
8
|
+
transform(html: any): import("@angular/platform-browser").SafeHtml;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
|
|
11
|
+
}
|
|
12
|
+
export declare class SmartRendererComponent {
|
|
13
|
+
readonly message: import("@angular/core").InputSignal<string>;
|
|
14
|
+
readonly context: import("@angular/core").InputSignal<any>;
|
|
15
|
+
readonly safe: import("@angular/core").WritableSignal<string>;
|
|
16
|
+
readonly processing: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
private lastSliceIndex;
|
|
18
|
+
private localSliceIndex;
|
|
19
|
+
constructor();
|
|
20
|
+
messageUpdated(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmartRendererComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SmartRendererComponent, "SmartRenderer", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|