@sinequa/assistant 3.10.10 → 3.10.13
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/i18n/ja.json +11 -0
- package/chat/chat-settings-v3/i18n/ja.json +14 -0
- package/chat/custom-elements/components/i18n/ja.json +5 -0
- package/chat/debug-message/i18n/ja.json +3 -0
- package/chat/dialogs/i18n/ja.json +19 -0
- package/chat/documents-upload/i18n/ja.json +24 -0
- package/chat/i18n/ja.json +42 -0
- package/chat/references/i18n/ja.json +6 -0
- package/chat/saved-chats/i18n/ja.json +7 -0
- package/chat/token-progress-bar/i18n/ja.json +4 -0
- package/fesm2022/sinequa-assistant-chat.mjs +30 -7
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -1
- package/node_modules/zod/README.md +1 -18
- package/node_modules/zod/locales/package.json +2 -1
- package/node_modules/zod/mini/package.json +2 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/object.test.ts +5 -5
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/errors.ts +2 -2
- package/node_modules/zod/src/v4/classic/external.ts +1 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +39 -23
- package/node_modules/zod/src/v4/classic/parse.ts +6 -6
- package/node_modules/zod/src/v4/classic/schemas.ts +414 -151
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +50 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +142 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +34 -1
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +214 -2
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +161 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +6 -6
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +55 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +83 -6
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +114 -4
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +24 -1
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +69 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +85 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +49 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +50 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +4 -4
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +150 -15
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +17 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +315 -2
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +54 -0
- package/node_modules/zod/src/v4/core/api.ts +31 -6
- package/node_modules/zod/src/v4/core/checks.ts +1 -1
- package/node_modules/zod/src/v4/core/core.ts +17 -2
- package/node_modules/zod/src/v4/core/errors.ts +31 -24
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +17 -18
- package/node_modules/zod/src/v4/core/parse.ts +7 -7
- package/node_modules/zod/src/v4/core/regexes.ts +8 -1
- package/node_modules/zod/src/v4/core/schemas.ts +263 -71
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +58 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -1
- package/node_modules/zod/src/v4/core/util.ts +52 -35
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +4 -0
- package/node_modules/zod/src/v4/locales/fr.ts +24 -8
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/index.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -1
- package/node_modules/zod/src/v4/locales/ka.ts +8 -8
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/mini/external.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +56 -25
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +19 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +32 -2
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +9 -9
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +51 -1
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +5 -0
- package/node_modules/zod/v3/package.json +2 -1
- package/node_modules/zod/v4/classic/errors.js +2 -2
- package/node_modules/zod/v4/classic/external.d.cts +1 -0
- package/node_modules/zod/v4/classic/external.d.ts +1 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
- package/node_modules/zod/v4/classic/from-json-schema.js +31 -16
- package/node_modules/zod/v4/classic/package.json +2 -1
- package/node_modules/zod/v4/classic/schemas.cjs +358 -119
- package/node_modules/zod/v4/classic/schemas.d.cts +42 -14
- package/node_modules/zod/v4/classic/schemas.d.ts +42 -14
- package/node_modules/zod/v4/classic/schemas.js +356 -118
- package/node_modules/zod/v4/core/api.cjs +7 -2
- package/node_modules/zod/v4/core/api.d.cts +26 -5
- package/node_modules/zod/v4/core/api.d.ts +26 -5
- package/node_modules/zod/v4/core/api.js +7 -2
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/node_modules/zod/v4/core/core.cjs +3 -1
- package/node_modules/zod/v4/core/core.js +4 -2
- package/node_modules/zod/v4/core/errors.cjs +26 -23
- package/node_modules/zod/v4/core/errors.d.cts +1 -0
- package/node_modules/zod/v4/core/errors.d.ts +1 -0
- package/node_modules/zod/v4/core/errors.js +26 -23
- package/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
- package/node_modules/zod/v4/core/json-schema-processors.js +16 -20
- package/node_modules/zod/v4/core/package.json +2 -1
- package/node_modules/zod/v4/core/parse.cjs +7 -7
- package/node_modules/zod/v4/core/parse.js +7 -7
- package/node_modules/zod/v4/core/regexes.cjs +9 -3
- package/node_modules/zod/v4/core/regexes.d.cts +6 -0
- package/node_modules/zod/v4/core/regexes.d.ts +6 -0
- package/node_modules/zod/v4/core/regexes.js +7 -1
- package/node_modules/zod/v4/core/schemas.cjs +211 -65
- package/node_modules/zod/v4/core/schemas.d.cts +39 -1
- package/node_modules/zod/v4/core/schemas.d.ts +39 -1
- package/node_modules/zod/v4/core/schemas.js +210 -64
- package/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
- package/node_modules/zod/v4/core/to-json-schema.js +12 -1
- package/node_modules/zod/v4/core/util.cjs +54 -30
- package/node_modules/zod/v4/core/util.d.cts +1 -0
- package/node_modules/zod/v4/core/util.d.ts +1 -0
- package/node_modules/zod/v4/core/util.js +55 -32
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +4 -0
- package/node_modules/zod/v4/locales/en.js +4 -0
- package/node_modules/zod/v4/locales/fr.cjs +24 -7
- package/node_modules/zod/v4/locales/fr.js +24 -7
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/index.cjs +8 -1
- package/node_modules/zod/v4/locales/index.d.cts +3 -0
- package/node_modules/zod/v4/locales/index.d.ts +3 -0
- package/node_modules/zod/v4/locales/index.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -1
- package/node_modules/zod/v4/locales/it.js +1 -1
- package/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/node_modules/zod/v4/locales/ka.js +8 -8
- package/node_modules/zod/v4/locales/package.json +2 -1
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/mini/external.d.cts +1 -0
- package/node_modules/zod/v4/mini/external.d.ts +1 -0
- package/node_modules/zod/v4/mini/package.json +2 -1
- package/node_modules/zod/v4/mini/schemas.cjs +41 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +28 -10
- package/node_modules/zod/v4/mini/schemas.d.ts +28 -10
- package/node_modules/zod/v4/mini/schemas.js +40 -4
- package/node_modules/zod/v4/package.json +2 -1
- package/node_modules/zod/v4-mini/package.json +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"model": "モデル",
|
|
3
|
+
"functions": "機能",
|
|
4
|
+
"debug": "デバッグ",
|
|
5
|
+
"advancedParameters": "詳細パラメータ",
|
|
6
|
+
"temperature": "温度",
|
|
7
|
+
"topP": "トップP",
|
|
8
|
+
"MaxGeneratedTokens": "回答ごとの最大生成トークン数",
|
|
9
|
+
"Prompts": "プロンプト",
|
|
10
|
+
"systemPrompt": "システムプロンプト(非表示)",
|
|
11
|
+
"initialUserPrompt": "初期ユーザープロンプト",
|
|
12
|
+
"cancel": "キャンセル",
|
|
13
|
+
"save": "保存"
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deleteSavedDiscussion": "会話を削除",
|
|
3
|
+
"deleteSavedDiscussionText": "次の会話を削除しようとしています",
|
|
4
|
+
"deleteSavedDiscussionConfirm": "続行しますか?",
|
|
5
|
+
"cancel": "キャンセル",
|
|
6
|
+
"confirm": "確認",
|
|
7
|
+
"deleteSavedDiscussionSuccess": "会話「{{title}}」が正常に削除されました。",
|
|
8
|
+
"deleteSavedDiscussionError": "会話「{{title}}」の削除中にエラーが発生しました。",
|
|
9
|
+
"renameSavedDiscussion": "会話の名前を変更",
|
|
10
|
+
"renameSavedDiscussionText": "会話の新しい名前を入力してください",
|
|
11
|
+
"rename": "名前を変更",
|
|
12
|
+
"renameSavedDiscussionSuccess": "会話「{{currentTitle}}」が「{{title}}」に正常に名前変更されました。",
|
|
13
|
+
"renameSavedDiscussionError": "会話「{{currentTitle}}」の名前変更中にエラーが発生しました。",
|
|
14
|
+
"availableUpdates": "利用可能な更新があります!",
|
|
15
|
+
"availableUpdatesText": "デフォルト設定に変更が加えられました。自分のバージョンを更新しますか?",
|
|
16
|
+
"seeNoMore": "表示しない",
|
|
17
|
+
"remindMeLater": "後で通知",
|
|
18
|
+
"update": "更新"
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cancel": "キャンセル",
|
|
3
|
+
"confirm": "確認",
|
|
4
|
+
"delete": "削除",
|
|
5
|
+
"deleteDocumentText": "ドキュメント「{{title}}」を削除しようとしています。続行しますか?",
|
|
6
|
+
"deleteDocumentSuccess": "ドキュメント「{{title}}」が正常に削除されました。",
|
|
7
|
+
"deleteDocumentError": "ドキュメント「{{title}}」の削除中にエラーが発生しました。",
|
|
8
|
+
"deleteAllDocumentsText": "すべてのドキュメントを削除しようとしています。続行しますか?",
|
|
9
|
+
"deleteAllDocumentsSuccess": "すべてのドキュメントが正常に削除されました。",
|
|
10
|
+
"deleteAllDocumentsError": "すべてのドキュメントの削除中にエラーが発生しました。",
|
|
11
|
+
"uploadedDocuments": "{count, plural,=0 {ドキュメントなし} other {# 件のドキュメントがアップロードされました}}",
|
|
12
|
+
"uploadToSources": "ソースにアップロード",
|
|
13
|
+
"dragAndDrop": "ここにファイルをドラッグ&ドロップするか、",
|
|
14
|
+
"clickToBrowse": "クリックして参照",
|
|
15
|
+
"dropFiles": "ここにファイルをドロップ",
|
|
16
|
+
"uploadingFiles": "{count, plural, other {# 件のファイルをアップロード中}}",
|
|
17
|
+
"indexingFiles": "{count, plural, other {# 件のファイルをインデックス中}}",
|
|
18
|
+
"upload": "アップロード",
|
|
19
|
+
"filesNumberLimitExceeded": "ファイル数が許可された上限を超えています。最大{{max}}ファイルまでアップロードできます。",
|
|
20
|
+
"filesSizeLimitExceeded": "ファイルの合計サイズが許可された上限を超えています。最大{{max}} MBまでアップロードできます。",
|
|
21
|
+
"fileExtensionUnsupported": "ファイル拡張子{{extension}}はサポートされていません。",
|
|
22
|
+
"errorUploadingFiles": "ファイルのアップロード中にエラーが発生しました。",
|
|
23
|
+
"errorIndexingStatus": "インデックス作成ステータスの取得中にエラーが発生しました。"
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tryAgain": "再試行",
|
|
3
|
+
"loading": "読み込み中…",
|
|
4
|
+
"askSomething": "質問してください",
|
|
5
|
+
"sendMessage": "メッセージを送信",
|
|
6
|
+
"cancelEdition": "編集をキャンセル",
|
|
7
|
+
"generating": "生成中",
|
|
8
|
+
"stopping": "停止中",
|
|
9
|
+
"stopGeneration": "生成を停止",
|
|
10
|
+
"issueType": "問題の種類",
|
|
11
|
+
"chooseIssueType": "問題の種類を選択",
|
|
12
|
+
"askUnlikeReasons": "この回答について何が不満でしたか?(任意)",
|
|
13
|
+
"askLikeReasons": "この回答について何が良かったですか?(任意)",
|
|
14
|
+
"writeComment": "コメントを入力",
|
|
15
|
+
"send": "送信",
|
|
16
|
+
"doNotSend": "レポートを送信しない",
|
|
17
|
+
"userInterfaceBug": "ユーザーインターフェースのバグ",
|
|
18
|
+
"incorrectResponse": "不正確または誤解を招く回答",
|
|
19
|
+
"incompleteResponse": "不完全な回答",
|
|
20
|
+
"technicalIssue": "技術的な問題",
|
|
21
|
+
"privacyDataSecurityIssue": "プライバシーまたはデータセキュリティの問題",
|
|
22
|
+
"otherIssue": "その他の問題",
|
|
23
|
+
"sendReportNotification": "レポートが正常に送信されました",
|
|
24
|
+
"today": "今日",
|
|
25
|
+
"yesterday": "昨日",
|
|
26
|
+
"thisWeek": "今週",
|
|
27
|
+
"lastWeek": "先週",
|
|
28
|
+
"thisMonth": "今月",
|
|
29
|
+
"lastMonth": "先月",
|
|
30
|
+
"thisQuarter": "今四半期",
|
|
31
|
+
"lastQuarter": "前四半期",
|
|
32
|
+
"thisYear": "今年",
|
|
33
|
+
"lastYear": "昨年",
|
|
34
|
+
"clipboard": {
|
|
35
|
+
"success": "「{{value}}」がクリップボードにコピーされました。",
|
|
36
|
+
"fail": "コピーに失敗しました。"
|
|
37
|
+
},
|
|
38
|
+
"saveChatConfig": {
|
|
39
|
+
"success": "アシスタント{{value}}インスタンスの設定が正常に更新されました。",
|
|
40
|
+
"fail": "アシスタント{{value}}インスタンスの設定の更新に失敗しました。"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { Injectable, EventEmitter, inject, Output, Input, Component, Pipe, InjectionToken, input, signal, effect, ChangeDetectionStrategy, HostListener, Directive, ViewEncapsulation, output, viewChild, computed, LOCALE_ID, ElementRef, createComponent, ChangeDetectorRef, DestroyRef, ContentChild, ViewChild, Injector } from '@angular/core';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { Subscription, of, tap, switchMap, filter, delay, from, throwError, Subject, fromEvent, merge, Observable, BehaviorSubject, defer, take as take$1, forkJoin, map as map$1, catchError as catchError$1, finalize as finalize$1, combineLatest, debounceTime, distinctUntilChanged,
|
|
7
|
+
import { Subscription, of, tap, switchMap, filter, delay, from, throwError, Subject, fromEvent, merge, Observable, BehaviorSubject, defer, take as take$1, forkJoin, map as map$1, catchError as catchError$1, finalize as finalize$1, EMPTY, combineLatest, debounceTime, distinctUntilChanged, interval, startWith, takeWhile } from 'rxjs';
|
|
8
8
|
import { TranslocoPipe, provideTranslocoScope, TranslocoService } from '@jsverse/transloco';
|
|
9
9
|
import { fetchApp, isAuthenticated, sha512, patchUserSettings, get, post, globalConfig, getToken, fetchUserSettings, fetchPrincipal, guid, Audit, setGlobalConfig, fetchQuery } from '@sinequa/atomic';
|
|
10
10
|
import { LogLevel, HubConnectionBuilder, HttpTransportType, HubConnectionState } from '@microsoft/signalr';
|
|
@@ -864,11 +864,11 @@ class FormatIconComponent {
|
|
|
864
864
|
this.icon = icon?.icon || this._formatIcons.file.icon;
|
|
865
865
|
}
|
|
866
866
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormatIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
867
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
867
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormatIconComponent, isStandalone: true, selector: "sq-format-icon", inputs: { extension: "extension" }, usesOnChanges: true, ngImport: i0, template: "@if (icon) {\n <i [class]=\"icon\"></i>\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
868
868
|
}
|
|
869
869
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormatIconComponent, decorators: [{
|
|
870
870
|
type: Component,
|
|
871
|
-
args: [{ selector: 'sq-format-icon', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], template: "
|
|
871
|
+
args: [{ selector: 'sq-format-icon', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], template: "@if (icon) {\n <i [class]=\"icon\"></i>\n}" }]
|
|
872
872
|
}], propDecorators: { extension: [{
|
|
873
873
|
type: Input
|
|
874
874
|
}] } });
|
|
@@ -1682,6 +1682,7 @@ class SignalRConnectionService {
|
|
|
1682
1682
|
operationConfig;
|
|
1683
1683
|
signalRWebService = inject(SignalRWebService);
|
|
1684
1684
|
assistantUtils = inject(AssistantUtils);
|
|
1685
|
+
_stoppingIntentionally = false;
|
|
1685
1686
|
init(config) {
|
|
1686
1687
|
this.operationConfig = config;
|
|
1687
1688
|
}
|
|
@@ -1759,10 +1760,20 @@ class SignalRConnectionService {
|
|
|
1759
1760
|
startConnection() {
|
|
1760
1761
|
this.ensureInitialized();
|
|
1761
1762
|
const connection = this.operationConfig.getHubConnection();
|
|
1762
|
-
return this.signalRWebService.startConnection(connection)
|
|
1763
|
+
return this.signalRWebService.startConnection(connection)
|
|
1764
|
+
.catch(error => {
|
|
1765
|
+
if (this._stoppingIntentionally) {
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1768
|
+
throw error;
|
|
1769
|
+
})
|
|
1770
|
+
.finally(() => {
|
|
1771
|
+
this._stoppingIntentionally = false;
|
|
1772
|
+
});
|
|
1763
1773
|
}
|
|
1764
1774
|
stopConnection() {
|
|
1765
1775
|
this.ensureInitialized();
|
|
1776
|
+
this._stoppingIntentionally = true;
|
|
1766
1777
|
const connection = this.operationConfig.getHubConnection();
|
|
1767
1778
|
return this.signalRWebService.stopConnection(connection);
|
|
1768
1779
|
}
|
|
@@ -2613,7 +2624,9 @@ class AssistantWsFramesService {
|
|
|
2613
2624
|
context.setStoppingGenerationStatus(true);
|
|
2614
2625
|
// Create a Subject to hold the result of the CancelTasks method
|
|
2615
2626
|
const stopGenerationSubject$ = new Subject();
|
|
2616
|
-
|
|
2627
|
+
// Use a named handler so it can be removed after firing, preventing listener accumulation across multiple stop operations
|
|
2628
|
+
const cancelHandler = (res) => {
|
|
2629
|
+
connection.off('CancelTasks', cancelHandler);
|
|
2617
2630
|
// When the generation is stopped before streaming any VISIBLE assistant message, this means that $progress, $attachment and $debug properties will be lost.
|
|
2618
2631
|
// However, the "ContextMessage" frames will be persisted in the chatHistory and the assistant may reference them in the next generation.
|
|
2619
2632
|
// This leads to the problem of referencing undisplayed attachments in the next generation.
|
|
@@ -2637,11 +2650,13 @@ class AssistantWsFramesService {
|
|
|
2637
2650
|
stopGenerationSubject$.complete();
|
|
2638
2651
|
// Complete stopping generation
|
|
2639
2652
|
context.setStoppingGenerationStatus(false);
|
|
2640
|
-
}
|
|
2653
|
+
};
|
|
2654
|
+
connection.on('CancelTasks', cancelHandler);
|
|
2641
2655
|
// Invoke the CancelTasks method and handle errors
|
|
2642
2656
|
connection.invoke('CancelTasks')
|
|
2643
2657
|
.catch(error => {
|
|
2644
2658
|
console.error('Error invoking CancelTasks:', error);
|
|
2659
|
+
connection.off('CancelTasks', cancelHandler);
|
|
2645
2660
|
stopGenerationSubject$.error(new Error(error));
|
|
2646
2661
|
context.setStoppingGenerationStatus(false);
|
|
2647
2662
|
return Promise.resolve();
|
|
@@ -2701,7 +2716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2701
2716
|
}], ctorParameters: () => [] });
|
|
2702
2717
|
|
|
2703
2718
|
// Auto-generated
|
|
2704
|
-
const LIB_VERSION = '3.10.
|
|
2719
|
+
const LIB_VERSION = '3.10.13';
|
|
2705
2720
|
|
|
2706
2721
|
class ChatService {
|
|
2707
2722
|
/** Name of the assistant websocket endpoint. */
|
|
@@ -3125,6 +3140,10 @@ class ChatService {
|
|
|
3125
3140
|
this.userOverride$.next(false);
|
|
3126
3141
|
return;
|
|
3127
3142
|
}
|
|
3143
|
+
if (!this.connection || this.connection.state !== HubConnectionState.Connected) {
|
|
3144
|
+
this.userOverride$.next(false);
|
|
3145
|
+
return;
|
|
3146
|
+
}
|
|
3128
3147
|
// Prepare the payload to send to the OverrideUser method
|
|
3129
3148
|
const data = {
|
|
3130
3149
|
instanceId: this.chatInstanceId,
|
|
@@ -3136,6 +3155,7 @@ class ChatService {
|
|
|
3136
3155
|
.then((res) => this.userOverride$.next(!!res))
|
|
3137
3156
|
.catch(error => {
|
|
3138
3157
|
console.error('Error invoking OverrideUser:', error);
|
|
3158
|
+
this.userOverride$.next(false);
|
|
3139
3159
|
return Promise.resolve(); // Return a resolved promise to handle the error and prevent unhandled promise rejection when no further error handling exists downstream
|
|
3140
3160
|
});
|
|
3141
3161
|
}
|
|
@@ -3614,6 +3634,9 @@ class ChatComponent {
|
|
|
3614
3634
|
this.initializationError = true;
|
|
3615
3635
|
throw error;
|
|
3616
3636
|
}
|
|
3637
|
+
}), catchError$1((err) => {
|
|
3638
|
+
console.error(`ChatComponent [${this.instanceId}] init failed:`, err);
|
|
3639
|
+
return EMPTY;
|
|
3617
3640
|
})).subscribe();
|
|
3618
3641
|
// Example of listening to custom events from the web element and handling them in the Angular component
|
|
3619
3642
|
addEventListener('onOpenPreview', (event) => {
|