@sinequa/assistant 3.7.7 → 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.
Files changed (149) hide show
  1. package/chat/charts/chart/chart.component.d.ts +13 -13
  2. package/chat/chat-message/chat-message.component.d.ts +85 -81
  3. package/chat/chat-message/i18n/en.json +11 -0
  4. package/chat/chat-message/i18n/fr.json +11 -0
  5. package/chat/chat-reference/chat-reference.component.d.ts +14 -14
  6. package/chat/chat-reference/i18n/en.json +4 -0
  7. package/chat/chat-reference/i18n/fr.json +4 -0
  8. package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +48 -49
  9. package/chat/chat-settings-v3/i18n/en.json +14 -0
  10. package/chat/chat-settings-v3/i18n/fr.json +14 -0
  11. package/chat/chat.component.d.ts +388 -1410
  12. package/chat/chat.service.d.ts +247 -228
  13. package/chat/debug-message/debug-message.component.d.ts +17 -17
  14. package/chat/debug-message/i18n/en.json +3 -0
  15. package/chat/debug-message/i18n/fr.json +3 -0
  16. package/chat/dialogs/delete-saved-chat.component.d.ts +22 -0
  17. package/chat/dialogs/i18n/en.json +19 -0
  18. package/chat/dialogs/i18n/fr.json +19 -0
  19. package/chat/dialogs/rename-saved-chat.component.d.ts +21 -0
  20. package/chat/dialogs/updates.component.d.ts +15 -0
  21. package/chat/documents-upload/document-list/document-list.component.d.ts +68 -0
  22. package/chat/documents-upload/document-overview/document-overview.component.d.ts +31 -0
  23. package/chat/documents-upload/document-upload/document-upload.component.d.ts +96 -0
  24. package/chat/documents-upload/documents-upload.model.d.ts +66 -0
  25. package/chat/documents-upload/documents-upload.service.d.ts +170 -0
  26. package/chat/documents-upload/i18n/en.json +24 -0
  27. package/chat/documents-upload/i18n/fr.json +24 -0
  28. package/chat/format-icon/format-icon.component.d.ts +10 -10
  29. package/chat/format-icon/icons.d.ts +5 -5
  30. package/chat/i18n/en.json +42 -0
  31. package/chat/i18n/fr.json +42 -0
  32. package/chat/index.d.ts +5 -5
  33. package/chat/initials-avatar/initials-avatar.component.d.ts +35 -35
  34. package/chat/instance-manager.service.d.ts +28 -28
  35. package/chat/pipes/message-content.pipe.d.ts +16 -0
  36. package/chat/prompt.component.d.ts +25 -21
  37. package/chat/public-api.d.ts +17 -12
  38. package/chat/references/i18n/en.json +6 -0
  39. package/chat/references/i18n/fr.json +6 -0
  40. package/chat/references/inline-image-reference.d.ts +21 -0
  41. package/chat/references/inline-page-reference.d.ts +21 -0
  42. package/chat/rest-chat.service.d.ts +31 -33
  43. package/chat/saved-chats/i18n/en.json +4 -0
  44. package/chat/saved-chats/i18n/fr.json +4 -0
  45. package/chat/saved-chats/saved-chats.component.d.ts +30 -36
  46. package/chat/services/app.service.d.ts +8 -0
  47. package/chat/services/dialog.service.d.ts +12 -0
  48. package/chat/services/notification.service.d.ts +10 -0
  49. package/chat/services/principal.service.d.ts +7 -0
  50. package/chat/services/search.service.d.ts +7 -0
  51. package/chat/services/signalR.web.service.d.ts +45 -0
  52. package/chat/services/ui.service.d.ts +13 -0
  53. package/chat/services/user-settings.service.d.ts +7 -0
  54. package/chat/styles/assistant.scss +2 -0
  55. package/chat/token-progress-bar/i18n/en.json +4 -0
  56. package/chat/token-progress-bar/i18n/fr.json +4 -0
  57. package/chat/token-progress-bar/token-progress-bar.component.d.ts +24 -27
  58. package/chat/tooltip/tooltip.component.d.ts +12 -0
  59. package/chat/tooltip/tooltip.directive.d.ts +81 -0
  60. package/chat/types/message-content.types.d.ts +54 -0
  61. package/chat/types/message-reference.types.d.ts +11 -0
  62. package/chat/types.d.ts +913 -817
  63. package/chat/unified-plugins/embedded-image-reference.plugin.d.ts +3 -0
  64. package/chat/unified-plugins/embedded-page-reference.plugin.d.ts +3 -0
  65. package/chat/utils/assistant-json.d.ts +2 -0
  66. package/chat/websocket-chat.service.d.ts +102 -103
  67. package/esm2022/chat/charts/chart/chart.component.mjs +40 -0
  68. package/esm2022/chat/chat-message/chat-message.component.mjs +351 -0
  69. package/esm2022/chat/chat-reference/chat-reference.component.mjs +40 -0
  70. package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +118 -0
  71. package/esm2022/chat/chat.component.mjs +1090 -0
  72. package/esm2022/chat/chat.service.mjs +417 -0
  73. package/esm2022/chat/debug-message/debug-message.component.mjs +43 -0
  74. package/esm2022/chat/dialogs/delete-saved-chat.component.mjs +81 -0
  75. package/esm2022/chat/dialogs/rename-saved-chat.component.mjs +84 -0
  76. package/esm2022/chat/dialogs/updates.component.mjs +61 -0
  77. package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +140 -0
  78. package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +65 -0
  79. package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +256 -0
  80. package/esm2022/chat/documents-upload/documents-upload.model.mjs +2 -0
  81. package/esm2022/chat/documents-upload/documents-upload.service.mjs +291 -0
  82. package/{esm2020 → esm2022}/chat/format-icon/format-icon.component.mjs +23 -23
  83. package/{esm2020 → esm2022}/chat/format-icon/icons.mjs +137 -137
  84. package/{esm2020 → esm2022}/chat/initials-avatar/initials-avatar.component.mjs +60 -60
  85. package/esm2022/chat/instance-manager.service.mjs +46 -0
  86. package/esm2022/chat/pipes/message-content.pipe.mjs +34 -0
  87. package/esm2022/chat/prompt.component.mjs +88 -0
  88. package/esm2022/chat/public-api.mjs +18 -0
  89. package/esm2022/chat/references/inline-image-reference.mjs +110 -0
  90. package/esm2022/chat/references/inline-page-reference.mjs +110 -0
  91. package/esm2022/chat/rest-chat.service.mjs +296 -0
  92. package/esm2022/chat/saved-chats/saved-chats.component.mjs +82 -0
  93. package/esm2022/chat/services/app.service.mjs +19 -0
  94. package/esm2022/chat/services/dialog.service.mjs +40 -0
  95. package/esm2022/chat/services/notification.service.mjs +25 -0
  96. package/esm2022/chat/services/principal.service.mjs +16 -0
  97. package/esm2022/chat/services/search.service.mjs +13 -0
  98. package/esm2022/chat/services/signalR.web.service.mjs +79 -0
  99. package/esm2022/chat/services/ui.service.mjs +61 -0
  100. package/esm2022/chat/services/user-settings.service.mjs +22 -0
  101. package/{esm2020 → esm2022}/chat/sinequa-assistant-chat.mjs +4 -4
  102. package/esm2022/chat/token-progress-bar/token-progress-bar.component.mjs +52 -0
  103. package/esm2022/chat/tooltip/tooltip.component.mjs +44 -0
  104. package/esm2022/chat/tooltip/tooltip.directive.mjs +203 -0
  105. package/esm2022/chat/types/message-content.types.mjs +2 -0
  106. package/esm2022/chat/types/message-reference.types.mjs +2 -0
  107. package/esm2022/chat/types.mjs +130 -0
  108. package/esm2022/chat/unified-plugins/embedded-image-reference.plugin.mjs +57 -0
  109. package/esm2022/chat/unified-plugins/embedded-page-reference.plugin.mjs +57 -0
  110. package/esm2022/chat/utils/assistant-json.mjs +12 -0
  111. package/esm2022/chat/websocket-chat.service.mjs +654 -0
  112. package/{esm2020 → esm2022}/public-api.mjs +2 -2
  113. package/{esm2020 → esm2022}/sinequa-assistant.mjs +4 -4
  114. package/fesm2022/sinequa-assistant-chat.mjs +5340 -0
  115. package/fesm2022/sinequa-assistant-chat.mjs.map +1 -0
  116. package/{fesm2015 → fesm2022}/sinequa-assistant.mjs +3 -3
  117. package/index.d.ts +5 -5
  118. package/package.json +51 -22
  119. package/public-api.d.ts +1 -1
  120. package/chat/messages/de.d.ts +0 -4
  121. package/chat/messages/en.d.ts +0 -4
  122. package/chat/messages/fr.d.ts +0 -4
  123. package/chat/messages/index.d.ts +0 -4
  124. package/esm2020/chat/charts/chart/chart.component.mjs +0 -40
  125. package/esm2020/chat/chat-message/chat-message.component.mjs +0 -263
  126. package/esm2020/chat/chat-reference/chat-reference.component.mjs +0 -40
  127. package/esm2020/chat/chat-settings-v3/chat-settings-v3.component.mjs +0 -114
  128. package/esm2020/chat/chat.component.mjs +0 -1072
  129. package/esm2020/chat/chat.service.mjs +0 -333
  130. package/esm2020/chat/debug-message/debug-message.component.mjs +0 -43
  131. package/esm2020/chat/instance-manager.service.mjs +0 -46
  132. package/esm2020/chat/messages/de.mjs +0 -4
  133. package/esm2020/chat/messages/en.mjs +0 -4
  134. package/esm2020/chat/messages/fr.mjs +0 -4
  135. package/esm2020/chat/messages/index.mjs +0 -9
  136. package/esm2020/chat/prompt.component.mjs +0 -88
  137. package/esm2020/chat/public-api.mjs +0 -13
  138. package/esm2020/chat/rest-chat.service.mjs +0 -241
  139. package/esm2020/chat/saved-chats/saved-chats.component.mjs +0 -175
  140. package/esm2020/chat/token-progress-bar/token-progress-bar.component.mjs +0 -54
  141. package/esm2020/chat/types.mjs +0 -101
  142. package/esm2020/chat/websocket-chat.service.mjs +0 -641
  143. package/fesm2015/sinequa-assistant-chat.mjs +0 -3416
  144. package/fesm2015/sinequa-assistant-chat.mjs.map +0 -1
  145. package/fesm2020/sinequa-assistant-chat.mjs +0 -3388
  146. package/fesm2020/sinequa-assistant-chat.mjs.map +0 -1
  147. package/fesm2020/sinequa-assistant.mjs +0 -9
  148. package/fesm2020/sinequa-assistant.mjs.map +0 -1
  149. /package/{fesm2015 → fesm2022}/sinequa-assistant.mjs.map +0 -0
@@ -1,35 +1,35 @@
1
- import * as i0 from "@angular/core";
2
- export declare class InitialsAvatarComponent {
3
- fullName: string;
4
- size: number;
5
- /**
6
- * Gives initials of a name and a safe color background to use,
7
- * assuming text color will be white
8
- * @param fullName full name to evaluate intials for
9
- * @param split string to use has splitter for `fullName`
10
- * @returns an `object` containing initials and color
11
- */
12
- getInitialsAndColorFromFullName(fullName: string, split?: string): {
13
- initials: string;
14
- color: string;
15
- };
16
- /**
17
- * Gives initials of a name, ie:
18
- * ```
19
- * getInitialForFullName('John Snow') => 'JS'
20
- * getInitialForFullName('Geralt of Rivia', ' of ') => 'GR'
21
- * ```
22
- * @param fullName full name to evaluate intial for
23
- * @param split string to use has splitter
24
- * @returns string containg the first letter of splitted name
25
- */
26
- getInitialsFromFullName(fullName: string, split?: string): string;
27
- /**
28
- * Gets a random color using text as seed
29
- * @param text string to use for color generation
30
- * @returns string formatted like `rgb(xxx, xxx, xxx)`
31
- */
32
- getColorFromName(text: string): string;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<InitialsAvatarComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<InitialsAvatarComponent, "sq-initials-avatar", never, { "fullName": "fullName"; "size": "size"; }, {}, never, never, true>;
35
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class InitialsAvatarComponent {
3
+ fullName: string;
4
+ size: number;
5
+ /**
6
+ * Gives initials of a name and a safe color background to use,
7
+ * assuming text color will be white
8
+ * @param fullName full name to evaluate intials for
9
+ * @param split string to use has splitter for `fullName`
10
+ * @returns an `object` containing initials and color
11
+ */
12
+ getInitialsAndColorFromFullName(fullName: string, split?: string): {
13
+ initials: string;
14
+ color: string;
15
+ };
16
+ /**
17
+ * Gives initials of a name, ie:
18
+ * ```
19
+ * getInitialForFullName('John Snow') => 'JS'
20
+ * getInitialForFullName('Geralt of Rivia', ' of ') => 'GR'
21
+ * ```
22
+ * @param fullName full name to evaluate intial for
23
+ * @param split string to use has splitter
24
+ * @returns string containg the first letter of splitted name
25
+ */
26
+ getInitialsFromFullName(fullName: string, split?: string): string;
27
+ /**
28
+ * Gets a random color using text as seed
29
+ * @param text string to use for color generation
30
+ * @returns string formatted like `rgb(xxx, xxx, xxx)`
31
+ */
32
+ getColorFromName(text: string): string;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<InitialsAvatarComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<InitialsAvatarComponent, "sq-initials-avatar", never, { "fullName": { "alias": "fullName"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
35
+ }
@@ -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 { UntypedFormControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
3
- import { Subscription } from 'rxjs';
4
- import { PromptOptions, ModalRef, ModalButton } from "@sinequa/core/modal";
5
- import * as i0 from "@angular/core";
6
- export declare class ChatPrompt implements OnInit, OnDestroy {
7
- model: PromptOptions;
8
- protected modalRef: ModalRef;
9
- protected formBuilder: UntypedFormBuilder;
10
- inputControl: UntypedFormControl;
11
- form: UntypedFormGroup;
12
- formChanges: Subscription;
13
- defaultButtons: ModalButton[];
14
- constructor(model: PromptOptions, modalRef: ModalRef, formBuilder: UntypedFormBuilder);
15
- ngOnInit(): void;
16
- ngOnDestroy(): void;
17
- get title(): string;
18
- get buttons(): ModalButton[];
19
- static ɵfac: i0.ɵɵFactoryDeclaration<ChatPrompt, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatPrompt, "sq-chat-prompt", never, {}, {}, never, never, true>;
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
+ }
@@ -1,12 +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 './messages/index';
9
- export * from './websocket-chat.service';
10
- export * from './rest-chat.service';
11
- export * from './instance-manager.service';
12
- export * from './prompt.component';
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,6 @@
1
+ {
2
+ "untitledImage": "Untitled image",
3
+ "openDocumentPreview": "Open document preview",
4
+ "openDocument": "Open document",
5
+ "untitledPAge": "Untitled page"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "untitledImage": "Image sans titre",
3
+ "openDocumentPreview": "Aperçu du document",
4
+ "openDocument": "Ouvrir le document",
5
+ "untitledPAge": "Page sans titre"
6
+ }
@@ -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 { ChatService } from './chat.service';
2
- import { Observable } from 'rxjs';
3
- import { ChatMessage, ChatResponse, GllmFunction, GllmModelDescription, SavedChat, SavedChatHistory } from './types';
4
- import { JsonMethodPluginService } from '@sinequa/core/web-services';
5
- import { Query } from "@sinequa/core/app-utils";
6
- import * as i0 from "@angular/core";
7
- export declare class RestChatService extends ChatService {
8
- jsonMethodWebService: JsonMethodPluginService;
9
- constructor();
10
- /**
11
- * Initialize the chat process after the login is complete.
12
- * It listens for the 'login-complete' event, initializes necessary URL, and performs parallel requests for models, functions and quota data.
13
- * @returns An Observable<boolean> indicating the success of the initialization process.
14
- */
15
- init(): Observable<boolean>;
16
- /**
17
- * Define the GLLM plugin to use for the http requests
18
- * It can be overridden by the app config
19
- */
20
- getRequestsUrl(): void;
21
- overrideUser(): void;
22
- listModels(): Observable<GllmModelDescription[] | undefined>;
23
- listFunctions(): Observable<GllmFunction[] | undefined>;
24
- fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;
25
- stopGeneration(): Observable<any>;
26
- listSavedChat(): void;
27
- addSavedChat(messages: ChatMessage[]): Observable<SavedChat>;
28
- getSavedChat(id: string): Observable<SavedChatHistory | undefined>;
29
- updateSavedChat(id: string, name?: string, messages?: ChatMessage[]): Observable<SavedChat>;
30
- deleteSavedChat(ids: string[]): Observable<number>;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<RestChatService, never>;
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
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "rename": "Rename",
3
+ "delete": "Delete"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "rename": "Renommer",
3
+ "delete": "Supprimer"
4
+ }
@@ -1,36 +1,30 @@
1
- import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
2
- import { Subscription, BehaviorSubject } from "rxjs";
3
- import { LoginService } from "@sinequa/core/login";
4
- import { ModalService } from "@sinequa/core/modal";
5
- import { NotificationsService } from "@sinequa/core/notification";
6
- import { ChatService } from "../chat.service";
7
- import { SavedChat } from "../types";
8
- import { InstanceManagerService } from "../instance-manager.service";
9
- import * as i0 from "@angular/core";
10
- export declare class SavedChatsComponent implements OnInit, OnDestroy {
11
- /** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
12
- instanceId: string;
13
- load: EventEmitter<SavedChat>;
14
- delete: EventEmitter<SavedChat>;
15
- chatService: ChatService;
16
- subscription: Subscription;
17
- groupedSavedChats$: BehaviorSubject<{
18
- key: string;
19
- value: SavedChat[];
20
- }[]>;
21
- loginService: LoginService;
22
- instanceManagerService: InstanceManagerService;
23
- modalService: ModalService;
24
- notificationsService: NotificationsService;
25
- ngOnInit(): void;
26
- ngOnDestroy(): void;
27
- instantiateChatService(): void;
28
- onListSavedChat(): void;
29
- onLoad(savedChat: SavedChat): void;
30
- onRename(event: Event, savedChat: SavedChat): void;
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,7 @@
1
+ import { Query } from "@sinequa/atomic";
2
+ import * as i0 from "@angular/core";
3
+ export declare class SearchService {
4
+ query: Query;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<SearchService>;
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
+ }
@@ -30,6 +30,7 @@ $ast-error-color: var(--ast-error-color, rgba(249, 58, 55, 0.7));
30
30
  $ast-warning-bg: var(--ast-warning-bg, #fff1b8);
31
31
  $ast-warning-color: var(--ast-warning-color, #fed86f);
32
32
  $ast-saved-chat-hover-background: var(--ast-saved-chat-hover-background, #FFF8F1);
33
+ $ast-uploaded-doc-hover-background: var(--ast-uploaded-doc-hover-background, #f2f8fe);
33
34
  $ast-input-bg: var(--ast-input-bg, #F8F8F8);
34
35
  $ast-input-color: var(--ast-input-color, #B0B0B0);
35
36
  $ast-muted-color: var(--ast-muted-color, rgba(33, 37, 41, 0.75));
@@ -86,6 +87,7 @@ $ast-report-bg: var(--ast-report-bg, white);
86
87
  --ast-input-color: rgba(222, 218, 218, 0.75);
87
88
  --ast-muted-color: rgba(222, 218, 218, 0.75);
88
89
  --ast-saved-chat-hover-background: #262421;
90
+ --ast-uploaded-doc-hover-background: #262421;
89
91
  --ast-message-table-border-color: #333333;
90
92
  --ast-message-table-tr-bg: #070707;
91
93
  --ast-message-table-tr-border-color: #222222;
@@ -0,0 +1,4 @@
1
+ {
2
+ "userConsumptionTitle": "Max generation allowed: {{percentage}}% consumed. Resets at {{time}}.",
3
+ "chatConsumptionTitle": "Max length of conversation:{ {percentage}}% reached."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "userConsumptionTitle": "Génération maximale autorisée : {{percentage}}% consommé. Réinitialisation à {{time}}.",
3
+ "chatConsumptionTitle": "Longueur maximale de la conversation : {{percentage}}% atteinte."
4
+ }