@sinequa/assistant 3.8.0 → 3.9.0
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/charts/chart/chart.component.d.ts +13 -13
- package/chat/chat-message/chat-message.component.d.ts +85 -81
- package/chat/chat-message/i18n/en.json +11 -0
- package/chat/chat-message/i18n/fr.json +11 -0
- package/chat/chat-reference/chat-reference.component.d.ts +14 -14
- package/chat/chat-reference/i18n/en.json +4 -0
- package/chat/chat-reference/i18n/fr.json +4 -0
- package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +48 -50
- package/chat/chat-settings-v3/i18n/en.json +14 -0
- package/chat/chat-settings-v3/i18n/fr.json +14 -0
- package/chat/chat.component.d.ts +388 -1405
- package/chat/chat.service.d.ts +247 -228
- package/chat/debug-message/debug-message.component.d.ts +17 -17
- package/chat/debug-message/i18n/en.json +3 -0
- package/chat/debug-message/i18n/fr.json +3 -0
- package/chat/dialogs/delete-saved-chat.component.d.ts +22 -0
- package/chat/dialogs/i18n/en.json +19 -0
- package/chat/dialogs/i18n/fr.json +19 -0
- package/chat/dialogs/rename-saved-chat.component.d.ts +21 -0
- package/chat/dialogs/updates.component.d.ts +15 -0
- package/chat/documents-upload/document-list/document-list.component.d.ts +68 -77
- package/chat/documents-upload/document-overview/document-overview.component.d.ts +31 -41
- package/chat/documents-upload/document-upload/document-upload.component.d.ts +96 -98
- package/chat/documents-upload/documents-upload.model.d.ts +66 -66
- package/chat/documents-upload/documents-upload.service.d.ts +170 -174
- package/chat/documents-upload/i18n/en.json +24 -0
- package/chat/documents-upload/i18n/fr.json +24 -0
- package/chat/format-icon/format-icon.component.d.ts +10 -10
- package/chat/format-icon/icons.d.ts +5 -5
- package/chat/i18n/en.json +42 -0
- package/chat/i18n/fr.json +42 -0
- package/chat/index.d.ts +5 -5
- package/chat/initials-avatar/initials-avatar.component.d.ts +35 -35
- package/chat/instance-manager.service.d.ts +28 -28
- package/chat/pipes/message-content.pipe.d.ts +16 -0
- package/chat/prompt.component.d.ts +25 -21
- package/chat/public-api.d.ts +17 -17
- package/chat/references/i18n/en.json +6 -0
- package/chat/references/i18n/fr.json +6 -0
- package/chat/references/inline-image-reference.d.ts +21 -0
- package/chat/references/inline-page-reference.d.ts +21 -0
- package/chat/rest-chat.service.d.ts +31 -33
- package/chat/saved-chats/i18n/en.json +4 -0
- package/chat/saved-chats/i18n/fr.json +4 -0
- package/chat/saved-chats/saved-chats.component.d.ts +30 -36
- package/chat/services/app.service.d.ts +8 -0
- package/chat/services/dialog.service.d.ts +12 -0
- package/chat/services/notification.service.d.ts +10 -0
- package/chat/services/principal.service.d.ts +7 -0
- package/chat/services/search.service.d.ts +7 -0
- package/chat/services/signalR.web.service.d.ts +45 -0
- package/chat/services/ui.service.d.ts +13 -0
- package/chat/services/user-settings.service.d.ts +7 -0
- package/chat/token-progress-bar/i18n/en.json +4 -0
- package/chat/token-progress-bar/i18n/fr.json +4 -0
- package/chat/token-progress-bar/token-progress-bar.component.d.ts +24 -27
- package/chat/tooltip/tooltip.component.d.ts +12 -0
- package/chat/tooltip/tooltip.directive.d.ts +81 -0
- package/chat/types/message-content.types.d.ts +54 -0
- package/chat/types/message-reference.types.d.ts +11 -0
- package/chat/types.d.ts +913 -873
- package/chat/unified-plugins/embedded-image-reference.plugin.d.ts +3 -0
- package/chat/unified-plugins/embedded-page-reference.plugin.d.ts +3 -0
- package/chat/utils/assistant-json.d.ts +2 -0
- package/chat/websocket-chat.service.d.ts +102 -103
- package/esm2022/chat/charts/chart/chart.component.mjs +40 -0
- package/esm2022/chat/chat-message/chat-message.component.mjs +351 -0
- package/esm2022/chat/chat-reference/chat-reference.component.mjs +40 -0
- package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +118 -0
- package/esm2022/chat/chat.component.mjs +1090 -0
- package/esm2022/chat/chat.service.mjs +417 -0
- package/esm2022/chat/debug-message/debug-message.component.mjs +43 -0
- package/esm2022/chat/dialogs/delete-saved-chat.component.mjs +81 -0
- package/esm2022/chat/dialogs/rename-saved-chat.component.mjs +84 -0
- package/esm2022/chat/dialogs/updates.component.mjs +61 -0
- package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +140 -0
- package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +65 -0
- package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +256 -0
- package/{esm2020 → esm2022}/chat/documents-upload/documents-upload.model.mjs +1 -1
- package/esm2022/chat/documents-upload/documents-upload.service.mjs +291 -0
- package/{esm2020 → esm2022}/chat/format-icon/format-icon.component.mjs +23 -23
- package/{esm2020 → esm2022}/chat/format-icon/icons.mjs +137 -137
- package/{esm2020 → esm2022}/chat/initials-avatar/initials-avatar.component.mjs +60 -60
- package/esm2022/chat/instance-manager.service.mjs +46 -0
- package/esm2022/chat/pipes/message-content.pipe.mjs +34 -0
- package/esm2022/chat/prompt.component.mjs +88 -0
- package/{esm2020 → esm2022}/chat/public-api.mjs +18 -18
- package/esm2022/chat/references/inline-image-reference.mjs +110 -0
- package/esm2022/chat/references/inline-page-reference.mjs +110 -0
- package/esm2022/chat/rest-chat.service.mjs +296 -0
- package/esm2022/chat/saved-chats/saved-chats.component.mjs +82 -0
- package/esm2022/chat/services/app.service.mjs +19 -0
- package/esm2022/chat/services/dialog.service.mjs +40 -0
- package/esm2022/chat/services/notification.service.mjs +25 -0
- package/esm2022/chat/services/principal.service.mjs +16 -0
- package/esm2022/chat/services/search.service.mjs +13 -0
- package/esm2022/chat/services/signalR.web.service.mjs +79 -0
- package/esm2022/chat/services/ui.service.mjs +61 -0
- package/esm2022/chat/services/user-settings.service.mjs +22 -0
- package/{esm2020 → esm2022}/chat/sinequa-assistant-chat.mjs +4 -4
- package/esm2022/chat/token-progress-bar/token-progress-bar.component.mjs +52 -0
- package/esm2022/chat/tooltip/tooltip.component.mjs +44 -0
- package/esm2022/chat/tooltip/tooltip.directive.mjs +203 -0
- package/esm2022/chat/types/message-content.types.mjs +2 -0
- package/esm2022/chat/types/message-reference.types.mjs +2 -0
- package/esm2022/chat/types.mjs +130 -0
- package/esm2022/chat/unified-plugins/embedded-image-reference.plugin.mjs +57 -0
- package/esm2022/chat/unified-plugins/embedded-page-reference.plugin.mjs +57 -0
- package/esm2022/chat/utils/assistant-json.mjs +12 -0
- package/esm2022/chat/websocket-chat.service.mjs +654 -0
- package/{esm2020 → esm2022}/public-api.mjs +2 -2
- package/{esm2020 → esm2022}/sinequa-assistant.mjs +4 -4
- package/fesm2022/sinequa-assistant-chat.mjs +5340 -0
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/sinequa-assistant.mjs +3 -3
- package/index.d.ts +5 -5
- package/package.json +52 -25
- package/public-api.d.ts +1 -1
- package/chat/messages/de.d.ts +0 -4
- package/chat/messages/en.d.ts +0 -4
- package/chat/messages/fr.d.ts +0 -4
- package/chat/messages/index.d.ts +0 -4
- package/esm2020/chat/charts/chart/chart.component.mjs +0 -40
- package/esm2020/chat/chat-message/chat-message.component.mjs +0 -263
- package/esm2020/chat/chat-reference/chat-reference.component.mjs +0 -40
- package/esm2020/chat/chat-settings-v3/chat-settings-v3.component.mjs +0 -117
- package/esm2020/chat/chat.component.mjs +0 -1069
- package/esm2020/chat/chat.service.mjs +0 -333
- package/esm2020/chat/debug-message/debug-message.component.mjs +0 -43
- package/esm2020/chat/documents-upload/document-list/document-list.component.mjs +0 -191
- package/esm2020/chat/documents-upload/document-overview/document-overview.component.mjs +0 -80
- package/esm2020/chat/documents-upload/document-upload/document-upload.component.mjs +0 -258
- package/esm2020/chat/documents-upload/documents-upload.service.mjs +0 -289
- package/esm2020/chat/instance-manager.service.mjs +0 -46
- package/esm2020/chat/messages/de.mjs +0 -4
- package/esm2020/chat/messages/en.mjs +0 -4
- package/esm2020/chat/messages/fr.mjs +0 -4
- package/esm2020/chat/messages/index.mjs +0 -9
- package/esm2020/chat/prompt.component.mjs +0 -88
- package/esm2020/chat/rest-chat.service.mjs +0 -241
- package/esm2020/chat/saved-chats/saved-chats.component.mjs +0 -175
- package/esm2020/chat/token-progress-bar/token-progress-bar.component.mjs +0 -54
- package/esm2020/chat/types.mjs +0 -112
- package/esm2020/chat/websocket-chat.service.mjs +0 -641
- package/fesm2015/sinequa-assistant-chat.mjs +0 -4200
- package/fesm2015/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant-chat.mjs +0 -4171
- package/fesm2020/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant.mjs +0 -9
- package/fesm2020/sinequa-assistant.mjs.map +0 -1
- /package/{fesm2015 → fesm2022}/sinequa-assistant.mjs.map +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ChatService } from './chat.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* A service to create and manage instances of ChatService dynamically based on the provided component references and the implementation type (http or websocket)
|
|
5
|
-
* All chat-related components should share the same instance of this InstanceManagerService, which in turn provides the appropriate instance of ChatService
|
|
6
|
-
*/
|
|
7
|
-
export declare class InstanceManagerService {
|
|
8
|
-
private _serviceInstances;
|
|
9
|
-
/**
|
|
10
|
-
* Store the instance of ChatService in the map
|
|
11
|
-
* @param key key differentiator between components used to store their corresponding ChatService instance
|
|
12
|
-
* @param service The ChatService instance
|
|
13
|
-
*/
|
|
14
|
-
storeInstance(key: string, service: ChatService): void;
|
|
15
|
-
/**
|
|
16
|
-
* @param key key differentiator between components based on which the corresponding ChatService instance is fetched
|
|
17
|
-
* @returns The instance of the service corresponding to the instance of the component
|
|
18
|
-
*/
|
|
19
|
-
getInstance(key: string): ChatService;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @param key key differentiator between components based on which the check for an existent ChatService instance is performed
|
|
23
|
-
* @returns True if a ChatService instance has been already instantiated for the given key. Otherwise, false.
|
|
24
|
-
*/
|
|
25
|
-
checkInstance(key: string): boolean;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InstanceManagerService, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<InstanceManagerService>;
|
|
28
|
-
}
|
|
1
|
+
import { ChatService } from './chat.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* A service to create and manage instances of ChatService dynamically based on the provided component references and the implementation type (http or websocket)
|
|
5
|
+
* All chat-related components should share the same instance of this InstanceManagerService, which in turn provides the appropriate instance of ChatService
|
|
6
|
+
*/
|
|
7
|
+
export declare class InstanceManagerService {
|
|
8
|
+
private _serviceInstances;
|
|
9
|
+
/**
|
|
10
|
+
* Store the instance of ChatService in the map
|
|
11
|
+
* @param key key differentiator between components used to store their corresponding ChatService instance
|
|
12
|
+
* @param service The ChatService instance
|
|
13
|
+
*/
|
|
14
|
+
storeInstance(key: string, service: ChatService): void;
|
|
15
|
+
/**
|
|
16
|
+
* @param key key differentiator between components based on which the corresponding ChatService instance is fetched
|
|
17
|
+
* @returns The instance of the service corresponding to the instance of the component
|
|
18
|
+
*/
|
|
19
|
+
getInstance(key: string): ChatService;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param key key differentiator between components based on which the check for an existent ChatService instance is performed
|
|
23
|
+
* @returns True if a ChatService instance has been already instantiated for the given key. Otherwise, false.
|
|
24
|
+
*/
|
|
25
|
+
checkInstance(key: string): boolean;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InstanceManagerService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InstanceManagerService>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import { RawMessageContent } from "../types/message-content.types";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Pipe to extract the content of a message
|
|
6
|
+
* Main role is to support how to render each type of message directly from the template
|
|
7
|
+
*
|
|
8
|
+
* @param messageContent The message content to extract
|
|
9
|
+
*
|
|
10
|
+
* @returns The content of the message
|
|
11
|
+
*/
|
|
12
|
+
export declare class MessageContentPipe implements PipeTransform {
|
|
13
|
+
transform(messageContent: RawMessageContent): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageContentPipe, never>;
|
|
15
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MessageContentPipe, "messageContent", true>;
|
|
16
|
+
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
-
import {
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type PromptOptions = {
|
|
6
|
+
title?: string;
|
|
7
|
+
message: string;
|
|
8
|
+
messageParams?: any;
|
|
9
|
+
rowCount?: number;
|
|
10
|
+
output?: string;
|
|
11
|
+
validators?: any;
|
|
12
|
+
};
|
|
13
|
+
export declare class ChatPrompt implements OnInit, OnDestroy {
|
|
14
|
+
protected formBuilder: UntypedFormBuilder;
|
|
15
|
+
inputControl: UntypedFormControl;
|
|
16
|
+
form: UntypedFormGroup;
|
|
17
|
+
formChanges: Subscription;
|
|
18
|
+
model: import("@angular/core").InputSignal<PromptOptions>;
|
|
19
|
+
constructor(formBuilder: UntypedFormBuilder);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
get title(): string;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatPrompt, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatPrompt, "sq-chat-prompt", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
package/chat/public-api.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from './chat-settings-v3/chat-settings-v3.component';
|
|
2
|
-
export * from './chat.component';
|
|
3
|
-
export * from './chat.service';
|
|
4
|
-
export * from './saved-chats/saved-chats.component';
|
|
5
|
-
export * from './initials-avatar/initials-avatar.component';
|
|
6
|
-
export * from './format-icon/format-icon.component';
|
|
7
|
-
export * from './types';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './documents-upload/document-
|
|
14
|
-
export * from './documents-upload/
|
|
15
|
-
export * from './documents-upload/documents-upload.
|
|
16
|
-
export * from './documents-upload/
|
|
17
|
-
export * from './
|
|
1
|
+
export * from './chat-settings-v3/chat-settings-v3.component';
|
|
2
|
+
export * from './chat.component';
|
|
3
|
+
export * from './chat.service';
|
|
4
|
+
export * from './saved-chats/saved-chats.component';
|
|
5
|
+
export * from './initials-avatar/initials-avatar.component';
|
|
6
|
+
export * from './format-icon/format-icon.component';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './websocket-chat.service';
|
|
9
|
+
export * from './rest-chat.service';
|
|
10
|
+
export * from './instance-manager.service';
|
|
11
|
+
export * from './prompt.component';
|
|
12
|
+
export * from './documents-upload/document-upload/document-upload.component';
|
|
13
|
+
export * from './documents-upload/document-list/document-list.component';
|
|
14
|
+
export * from './documents-upload/documents-upload.service';
|
|
15
|
+
export * from './documents-upload/documents-upload.model';
|
|
16
|
+
export * from './documents-upload/document-overview/document-overview.component';
|
|
17
|
+
export * from './services/notification.service';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { RawAttachment } from "../types";
|
|
3
|
+
import { MessageImageReference } from "../types/message-reference.types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class InlineImageReferenceComponent {
|
|
6
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly ref: import("@angular/core").InputSignal<MessageImageReference>;
|
|
8
|
+
readonly openPreview: import("@angular/core").OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
9
|
+
$partId: string;
|
|
10
|
+
}>;
|
|
11
|
+
readonly openDocument: import("@angular/core").OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
12
|
+
$partId: string;
|
|
13
|
+
}>;
|
|
14
|
+
readonly openModal: import("@angular/core").OutputEmitterRef<void>;
|
|
15
|
+
readonly modalTpl: import("@angular/core").Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
16
|
+
previewClicked(): void;
|
|
17
|
+
documentClicked(): void;
|
|
18
|
+
modalClicked(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineImageReferenceComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineImageReferenceComponent, "InlineImageReference", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "ref": { "alias": "ref"; "required": true; "isSignal": true; }; }, { "openPreview": "openPreview"; "openDocument": "openDocument"; "openModal": "openModal"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { RawAttachment } from "../types";
|
|
3
|
+
import { MessageImageReference } from "../types/message-reference.types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class InlinePageReferenceComponent {
|
|
6
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly ref: import("@angular/core").InputSignal<MessageImageReference>;
|
|
8
|
+
readonly openPreview: import("@angular/core").OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
9
|
+
$partId: string;
|
|
10
|
+
}>;
|
|
11
|
+
readonly openDocument: import("@angular/core").OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
12
|
+
$partId: string;
|
|
13
|
+
}>;
|
|
14
|
+
readonly openModal: import("@angular/core").OutputEmitterRef<void>;
|
|
15
|
+
readonly modalTpl: import("@angular/core").Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
16
|
+
previewClicked(): void;
|
|
17
|
+
documentClicked(): void;
|
|
18
|
+
modalClicked(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlinePageReferenceComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlinePageReferenceComponent, "InlinePageReference", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "ref": { "alias": "ref"; "required": true; "isSignal": true; }; }, { "openPreview": "openPreview"; "openDocument": "openDocument"; "openModal": "openModal"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<RestChatService>;
|
|
33
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Query } from "@sinequa/atomic";
|
|
3
|
+
import { ChatService } from './chat.service';
|
|
4
|
+
import { ChatMessage, ChatResponse, DeleteSavedChatResponse, GllmFunction, GllmModelDescription, SavedChatHistory, SavedChatResponse } from './types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class RestChatService extends ChatService {
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the chat process after the login is complete.
|
|
10
|
+
* It listens for the 'login-complete' event, initializes necessary URL, and performs parallel requests for models, functions and quota data.
|
|
11
|
+
* @returns An Observable<boolean> indicating the success of the initialization process.
|
|
12
|
+
*/
|
|
13
|
+
init(): Observable<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Define the GLLM plugin to use for the http requests
|
|
16
|
+
* It can be overridden by the app config
|
|
17
|
+
*/
|
|
18
|
+
getRequestsUrl(): void;
|
|
19
|
+
overrideUser(): void;
|
|
20
|
+
listModels(): Observable<GllmModelDescription[] | undefined>;
|
|
21
|
+
listFunctions(): Observable<GllmFunction[] | undefined>;
|
|
22
|
+
fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;
|
|
23
|
+
stopGeneration(): Observable<any>;
|
|
24
|
+
listSavedChat(): void;
|
|
25
|
+
addSavedChat(messages: ChatMessage[]): Observable<SavedChatResponse>;
|
|
26
|
+
getSavedChat(id: string): Observable<SavedChatHistory | undefined>;
|
|
27
|
+
updateSavedChat(id: string, name?: string, messages?: ChatMessage[]): Observable<SavedChatResponse>;
|
|
28
|
+
deleteSavedChat(ids: string[]): Observable<DeleteSavedChatResponse>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RestChatService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RestChatService>;
|
|
31
|
+
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { NotificationsService } from "
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onDelete(event: Event, savedChat: SavedChat): void;
|
|
32
|
-
private _groupSavedChatsByDate;
|
|
33
|
-
private _getTimeKey;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SavedChatsComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SavedChatsComponent, "sq-saved-chats-v3", never, { "instanceId": "instanceId"; }, { "load": "load"; "delete": "delete"; }, never, never, true>;
|
|
36
|
-
}
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { BehaviorSubject, Subscription } from "rxjs";
|
|
3
|
+
import { ChatService } from "../chat.service";
|
|
4
|
+
import { InstanceManagerService } from "../instance-manager.service";
|
|
5
|
+
import { NotificationsService } from "../services/notification.service";
|
|
6
|
+
import { SavedChat } from "../types";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class SavedChatsComponent implements OnInit, OnDestroy {
|
|
9
|
+
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
10
|
+
instanceId: string;
|
|
11
|
+
load: EventEmitter<SavedChat>;
|
|
12
|
+
delete: EventEmitter<SavedChat>;
|
|
13
|
+
chatService: ChatService;
|
|
14
|
+
subscription: Subscription;
|
|
15
|
+
groupedSavedChats$: BehaviorSubject<{
|
|
16
|
+
key: string;
|
|
17
|
+
value: SavedChat[];
|
|
18
|
+
}[]>;
|
|
19
|
+
instanceManagerService: InstanceManagerService;
|
|
20
|
+
notificationsService: NotificationsService;
|
|
21
|
+
private readonly transloco;
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
instantiateChatService(): void;
|
|
25
|
+
onListSavedChat(): void;
|
|
26
|
+
onLoad(savedChat: SavedChat): void;
|
|
27
|
+
private _groupSavedChatsByDate;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SavedChatsComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SavedChatsComponent, "sq-saved-chats-v3", never, { "instanceId": { "alias": "instanceId"; "required": false; }; }, { "load": "load"; "delete": "delete"; }, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CCApp } from "@sinequa/atomic";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AppService {
|
|
4
|
+
app: CCApp;
|
|
5
|
+
get appName(): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApplicationRef, ComponentRef, Type } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type DialogEvent = 'dialog-close' | 'dialog-cancel' | 'dialog-confirm' | 'dialog-no' | 'dialog-yes';
|
|
4
|
+
export declare class DialogService {
|
|
5
|
+
private appRef;
|
|
6
|
+
protected dialogRef?: ComponentRef<any>;
|
|
7
|
+
constructor(appRef: ApplicationRef);
|
|
8
|
+
open<T>(componentType: Type<T>): Promise<DialogEvent>;
|
|
9
|
+
protected removeDialog(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type NotificationType = "success" | "warning" | "error";
|
|
3
|
+
export declare class NotificationsService {
|
|
4
|
+
success(message: string, title?: string): void;
|
|
5
|
+
warning(message: string, title?: string): void;
|
|
6
|
+
error(message: string, title?: string): void;
|
|
7
|
+
private dispatchEvent;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationsService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Principal } from "@sinequa/atomic";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PrincipalService {
|
|
4
|
+
principal: Principal;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrincipalService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PrincipalService>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import { LogLevel, HubConnection, MessageHeaders, HttpTransportType, ITransport } from '@microsoft/signalr';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ConnectionOptions {
|
|
5
|
+
withCredentials?: boolean;
|
|
6
|
+
headers?: MessageHeaders;
|
|
7
|
+
transport?: HttpTransportType | ITransport;
|
|
8
|
+
accessTokenFactory?: () => string | Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
/** A token that is used to inject the transports allowed to use by hub connection.
|
|
11
|
+
*
|
|
12
|
+
* Expects a {@link HttpTransportType} value.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SIGNAL_R_TRANSPORTS: InjectionToken<HttpTransportType>;
|
|
15
|
+
/** A token that is used to inject the log level for the hub connection.
|
|
16
|
+
*
|
|
17
|
+
* Expects a {@link LogLevel} value.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SIGNAL_R_LOG_LEVEL: InjectionToken<LogLevel>;
|
|
20
|
+
/**
|
|
21
|
+
* A service to connect the Sinequa server to the client via SignalR
|
|
22
|
+
*/
|
|
23
|
+
export declare class SignalRWebService {
|
|
24
|
+
/**
|
|
25
|
+
* Builds a SignalR connection to the given endpoint
|
|
26
|
+
* @param endpointName Name of the endpoint to connect to
|
|
27
|
+
* @param options Options for the connection. It must overrides the default options
|
|
28
|
+
* @param logLevel The log level for the connection
|
|
29
|
+
* @param automaticReconnect Whether the connection should automatically attempt to reconnect
|
|
30
|
+
* @returns A SignalR connection
|
|
31
|
+
*/
|
|
32
|
+
buildConnection(endpointName: string, options: ConnectionOptions, logLevel?: LogLevel, automaticReconnect?: boolean): HubConnection;
|
|
33
|
+
/**
|
|
34
|
+
* Starts a SignalR connection.
|
|
35
|
+
* @param connection A SignalR connection
|
|
36
|
+
*/
|
|
37
|
+
startConnection(connection: HubConnection | undefined): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Stops a SignalR connection.
|
|
40
|
+
* @param connection A SignalR connection
|
|
41
|
+
*/
|
|
42
|
+
stopConnection(connection: HubConnection | undefined): Promise<void>;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignalRWebService, never>;
|
|
44
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SignalRWebService>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Clipboard } from "@angular/cdk/clipboard";
|
|
2
|
+
import { NotificationsService } from "./notification.service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class UIService {
|
|
5
|
+
notificationsService: NotificationsService;
|
|
6
|
+
clipboard: Clipboard;
|
|
7
|
+
private readonly transloco;
|
|
8
|
+
copyToClipboard(data: string, maxLength?: number): void;
|
|
9
|
+
copyToClipboardCdk(data: string, maxLength?: number): void;
|
|
10
|
+
notifySuccess(message: string, maxLength?: number): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UIService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class UserSettingsWebService {
|
|
3
|
+
userSettings: {};
|
|
4
|
+
patch(data: any): import("rxjs").Observable<unknown>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserSettingsWebService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserSettingsWebService>;
|
|
7
|
+
}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TokenProgressBarComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TokenProgressBarComponent, "sq-token-progress-bar", never, { "instanceId": "instanceId"; }, {}, never, never, true>;
|
|
27
|
-
}
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
3
|
+
import { ChatService } from '../chat.service';
|
|
4
|
+
import { InstanceManagerService } from '../instance-manager.service';
|
|
5
|
+
import { ChatConfig } from '../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class TokenProgressBarComponent implements OnInit, OnDestroy {
|
|
8
|
+
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
9
|
+
instanceId: string;
|
|
10
|
+
chatService: ChatService;
|
|
11
|
+
config: ChatConfig;
|
|
12
|
+
subscription: Subscription;
|
|
13
|
+
userPercentage?: number;
|
|
14
|
+
userTokensResetDate?: string;
|
|
15
|
+
chatPercentage?: number;
|
|
16
|
+
instanceManagerService: InstanceManagerService;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
instantiateChatService(): void;
|
|
20
|
+
onUserTokensConsumption(): void;
|
|
21
|
+
onChatTokensConsumption(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TokenProgressBarComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TokenProgressBarComponent, "sq-token-progress-bar", never, { "instanceId": { "alias": "instanceId"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Internal component that wraps the tooltip's content
|
|
5
|
+
*/
|
|
6
|
+
export declare class TooltipComponent<T = string> {
|
|
7
|
+
data?: T;
|
|
8
|
+
template?: TemplateRef<any>;
|
|
9
|
+
tooltipClass?: string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent<any>, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent<any>, "sqx-tooltip", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|