@epam/ai-dial-chat-hooks 1.1.15 → 1.1.17
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/api-error/api-error.js +3 -4
- package/api-transport/create-csrf-middleware.js +1 -2
- package/api-transport/create-unauthorized-middleware.js +5 -3
- package/attachment/useAttachmentAction/useAttachmentAction.js +6 -10
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +1 -2
- package/catalog/catalog-derivations.js +1 -2
- package/catalog/catalog-primary-action.js +1 -2
- package/catalog/create-publish-api.js +1 -2
- package/catalog/deployment-endpoint-url.js +1 -2
- package/catalog/deployment-id.js +6 -3
- package/catalog/entity-details.js +1 -2
- package/catalog/map-deployment-limits-to-catalog.js +1 -2
- package/catalog/map-deployment-limits-to-input.js +1 -2
- package/catalog/map-deployment-to-catalog-item.js +1 -2
- package/catalog/map-entity-details-to-catalog.js +2 -3
- package/catalog/map-prompt-to-catalog-item.js +1 -2
- package/catalog/map-skill-to-catalog-item.js +1 -2
- package/catalog/mcp-endpoint-url.js +1 -2
- package/catalog/publish.js +1 -2
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +2 -7
- package/catalog/useCatalogItemDetails.js +1 -2
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +1 -2
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +2 -3
- package/catalog/usePublishFolders/usePublishFolders.js +2 -3
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +1 -2
- package/catalog/useSkillItemDetails.js +4 -5
- package/catalog.d.ts +7 -4
- package/conversation/announcement-message.js +1 -2
- package/conversation/conversation-transfer/async.js +1 -2
- package/conversation/conversation-transfer/attachment-refs.js +1 -2
- package/conversation/conversation-transfer/build-upload-path.js +1 -2
- package/conversation/conversation-transfer/date.js +1 -2
- package/conversation/conversation-transfer/dial-file-resolve.js +1 -2
- package/conversation/conversation-transfer/export-conversation.js +1 -2
- package/conversation/conversation-transfer/import-conversation.js +7 -9
- package/conversation/conversation-transfer/progress.js +2 -3
- package/conversation/conversation-transfer/queue.js +1 -2
- package/conversation/conversation-transfer/types.js +1 -2
- package/conversation/conversation-transfer/zip-export.js +2 -9
- package/conversation/conversation-transfer/zip-import.js +2 -3
- package/conversation/create-chat-stream-api.js +2 -7
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.js +1 -2
- package/conversation/display-name-watch.js +1 -2
- package/conversation/footer-message.js +1 -2
- package/conversation/get-model-id-from-conversation-id.js +12 -13
- package/conversation/greeting.js +1 -2
- package/conversation/message-factory.js +1 -2
- package/conversation/message-utils.js +1 -2
- package/conversation/overlay-messages.js +1 -2
- package/conversation/quick-app-conversation-starters.js +1 -2
- package/conversation/starter-option.js +1 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +1 -2
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js +1 -2
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +5 -3
- package/conversation/useConversationExport/useConversationExport.js +12 -14
- package/conversation/useConversationHandlers/attachment-to-dto.js +1 -2
- package/conversation/useConversationHandlers/message-factory.js +1 -2
- package/conversation/useConversationHandlers/message-utils.js +3 -4
- package/conversation/useConversationHandlers/starter-option.js +1 -2
- package/conversation/useConversationHandlers/useConversationHandlers.js +3 -4
- package/conversation/useConversationImport/useConversationImport.js +29 -30
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.js +1 -2
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +1 -2
- package/conversation/useConversationScroll/useConversationScroll.js +3 -8
- package/conversation/useConversationStream/apply-chunk.js +1 -2
- package/conversation/useConversationStream/buffered-generation.js +1 -2
- package/conversation/useConversationStream/conversation-path.js +3 -4
- package/conversation/useConversationStream/generation-resume.js +13 -17
- package/conversation/useConversationStream/useConversationStream.js +10 -22
- package/conversation/useImportFilePicker/useImportFilePicker.js +1 -2
- package/conversation/useTranscribeAudio/audio-transcription-error.js +1 -2
- package/conversation/useTranscribeAudio/transcription-retry.js +1 -2
- package/conversation/useTranscribeAudio/useTranscribeAudio.js +1 -2
- package/conversation-overlay.js +1 -2
- package/conversation-sources/useConversationSources/useConversationSources.js +1 -2
- package/conversation-sources.js +1 -2
- package/file-manager-canvas.js +1 -2
- package/files/annotation.js +1 -2
- package/files/attachment-canvas.js +1 -2
- package/files/attachment-dto-to-display.js +1 -2
- package/files/attachment-types.js +2 -3
- package/files/create-files-api.js +1 -2
- package/files/create-upload-file-with-progress.js +6 -14
- package/files/dial-file-manager-copy-move.util.js +1 -2
- package/files/dial-file-manager-mapping.util.js +4 -5
- package/files/dial-file-manager-path.util.js +1 -2
- package/files/dial-file-manager.model.js +1 -2
- package/files/dial-file-manager.types.js +1 -2
- package/files/dial-file-to-attachment.js +4 -5
- package/files/dial-file.js +1 -2
- package/files/dial-files-api.js +1 -2
- package/files/download-destination.js +1 -2
- package/files/file-manager-variant.js +1 -2
- package/files/file-name.js +1 -2
- package/files/prepare-download-destination.js +1 -2
- package/files/resolve-dial-file-api-path.js +1 -2
- package/files/source-content.js +2 -3
- package/files/useDialFileListing/useDialFileListing.js +38 -46
- package/files/useDialFileManager/useDialFileManager.js +1 -2
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -2
- package/files/useDialFileMetadata/useDialFileMetadata.js +4 -5
- package/files/useDialFileMutations/useDialFileMutations.js +1 -2
- package/files/useDialFileSharing/useDialFileSharing.js +1 -2
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +17 -16
- package/index.d.ts +7 -4
- package/mcp-apps/mcp-apps-api-client.js +1 -2
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +1 -2
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -2
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +4 -8
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +1 -2
- package/oauth/authorize-url.js +2 -3
- package/oauth/handshake.js +4 -12
- package/oauth/popup.js +1 -2
- package/oauth/toolset-id.js +4 -5
- package/oauth/types.js +1 -2
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +3 -7
- package/oauth/useToolsetLogin/useToolsetLogin.js +1 -2
- package/package.json +17 -17
- package/prompt/export-prompt.js +1 -2
- package/prompt/prompt-resource.js +1 -2
- package/prompt/prompt.js +1 -2
- package/prompt/usePromptsState/usePromptsState.js +1 -2
- package/scheduled-task/scheduled-task-mapping.js +1 -2
- package/scheduled-task/scheduled-task-trigger.js +2 -3
- package/scroll-anchoring.js +1 -2
- package/shared/application-schema.js +3 -4
- package/shared/browser-timezone.js +1 -2
- package/shared/cron-weekday.js +1 -2
- package/shared/custom-apps.js +1 -2
- package/shared/external-services.js +1 -2
- package/shared/formatting.js +1 -2
- package/shared/locale.js +3 -4
- package/shared/string-utils.js +1 -2
- package/shared/toolset-login-events.js +1 -2
- package/skill/skill-file-batch-validation.js +19 -19
- package/skill/skill-file-preview.js +1 -2
- package/skill/skill-manifest.js +1 -2
- package/skill/skill-types.js +2 -3
- package/skill/skill.js +11 -9
- package/skill/useSkillEditorLoad.js +1 -2
- package/skill/useSkillEditorSubmit.js +2 -7
- package/skill/useSkillFileActions.js +1 -2
- package/skill/useSkillFilePreview.js +1 -2
- package/skill/useSkillsState/useSkillsState.js +1 -2
- package/skills-state.js +1 -2
- package/source-content.js +1 -2
- package/usage/map-usage-data-to-dashboard.js +1 -2
- package/usage/map-user-usage-to-model-limits.js +1 -2
- package/usage/useUsageData/useUsageData.js +1 -2
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +1 -2
- package/usePageFileDrag/usePageFileDrag.js +4 -5
- package/usePanelMaxWidth/usePanelMaxWidth.js +1 -2
- package/useShareLink/useShareLink.js +1 -2
- package/useShareRecipientsCount/useShareRecipientsCount.js +1 -2
- package/useToolsMenu/useToolsMenu.js +1 -2
- package/useViewportWidth/useViewportWidth.js +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { collectAttachmentRefs as e, splitFileIdAnchor as t } from "./attachment-refs.js";
|
|
2
2
|
import { resolveDialFileBucketAndPath as n } from "./dial-file-resolve.js";
|
|
3
3
|
import { generateUUID as r, sanitizeConversationName as i, stripTrailingDots as a, truncateToUtf8Bytes as o } from "@epam/ai-dial-chat-shared";
|
|
4
|
-
|
|
4
|
+
// src/conversation/conversation-transfer/import-conversation.ts
|
|
5
5
|
var s = class extends Error {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
super(e), this.name = "UnsupportedImportFormatError";
|
|
@@ -20,7 +20,10 @@ var s = class extends Error {
|
|
|
20
20
|
history: t.history,
|
|
21
21
|
folders: n
|
|
22
22
|
};
|
|
23
|
-
}, d = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, f = "__", p = 255, m = "applications", h = /[-+]/, g = /^\d+$/, _ = (e) => e ? e.split(h)[0].split(".").every((e) => g.test(e)) : !1, v = (e) =>
|
|
23
|
+
}, d = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, f = "__", p = 255, m = "applications", h = /[-+]/, g = /^\d+$/, _ = (e) => e ? e.split(h)[0].split(".").every((e) => g.test(e)) : !1, v = (e) => {
|
|
24
|
+
let t = e.replace(/\r\n|\r/g, "\n").split("\n").map((e) => i(e).trim()).filter(Boolean)[0] ?? "";
|
|
25
|
+
return a(o(t, p)).trimEnd();
|
|
26
|
+
}, y = (e, t, n) => {
|
|
24
27
|
let i = e.split(f);
|
|
25
28
|
if (i.length < 2) return [e, r()].join(f);
|
|
26
29
|
let a = n && _(i[1]) ? i.slice(0, 2) : i.slice(0, 1), o = a.length > 1 ? d.test(i[i.length - 1]) : i.length >= 3, s = i.slice(a.length, o ? -1 : void 0).join(f);
|
|
@@ -116,21 +119,16 @@ var s = class extends Error {
|
|
|
116
119
|
continue;
|
|
117
120
|
}
|
|
118
121
|
let t = e.path.split("/").pop() ?? e.path, c = r.get(e.path);
|
|
119
|
-
|
|
120
|
-
o.push(t);
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
a.push({
|
|
122
|
+
c ? a.push({
|
|
124
123
|
fileId: s.fileId,
|
|
125
124
|
bytes: c,
|
|
126
125
|
originalFileName: t,
|
|
127
126
|
allocated: i.allocate(t)
|
|
128
|
-
});
|
|
127
|
+
}) : o.push(t);
|
|
129
128
|
}
|
|
130
129
|
return {
|
|
131
130
|
plan: a,
|
|
132
131
|
skippedNames: o
|
|
133
132
|
};
|
|
134
133
|
};
|
|
135
|
-
//#endregion
|
|
136
134
|
export { s as UnsupportedImportFormatError, w as formatQuotedNameList, C as getFolderBreadcrumb, u as parseImportEnvelope, j as planAttachmentUploads, S as rebaseConversationId, k as rewriteAttachmentUrls };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/conversation-transfer/progress.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
3
|
return e.Prepare = "prepare", e.Transfer = "transfer", e.Finalize = "finalize", e;
|
|
4
4
|
}({}), t = /* @__PURE__ */ function(e) {
|
|
@@ -35,5 +35,4 @@ var e = /* @__PURE__ */ function(e) {
|
|
|
35
35
|
percent: a(e),
|
|
36
36
|
units: t
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
export { t as ConversationTransferKind, e as ConversationTransferPhase, o as buildTransferProgress };
|
|
38
|
+
export { t as ConversationTransferKind, e as ConversationTransferPhase, n as TRANSFER_PHASE_WEIGHTS, o as buildTransferProgress, a as computeTransferPercent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConversationTransferJobStatus as e, generateUUID as t } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
|
-
|
|
3
|
+
// src/conversation/conversation-transfer/queue.ts
|
|
4
4
|
var o = () => {
|
|
5
5
|
let [o, s] = a([]), c = i(/* @__PURE__ */ new Map()), l = i(/* @__PURE__ */ new Map()), u = n((e, t) => {
|
|
6
6
|
s((n) => n.map((n) => n.id === e ? {
|
|
@@ -80,5 +80,4 @@ var o = () => {
|
|
|
80
80
|
startJob: b
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
-
//#endregion
|
|
84
83
|
export { o as useConversationTransferQueue };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ConversationTransferErrorCode as e, ConversationTransferWarningCode as t } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/conversation/conversation-transfer/types.ts
|
|
3
3
|
var n = /* @__PURE__ */ function(e) {
|
|
4
4
|
return e.WithAttachments = "withAttachments", e.WithoutAttachments = "withoutAttachments", e;
|
|
5
5
|
}({}), r = /* @__PURE__ */ function(e) {
|
|
6
6
|
return e.SingleConversation = "chat_conversation", e.SingleConversationWithAttachments = "chat_with_attachments", e.AllConversationsHistory = "chat_conversations_history", e;
|
|
7
7
|
}({});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as ConversationExportMode, e as ConversationTransferErrorCode, t as ConversationTransferWarningCode, r as ExportFileNameKind };
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { strToU8 as e, zipSync as t } from "fflate";
|
|
2
|
-
|
|
2
|
+
// src/conversation/conversation-transfer/zip-export.ts
|
|
3
3
|
var n = e("", !0).constructor, r = (e) => e instanceof n ? e : new n(e), i = (e) => e.length > 0 && e.split("/").every((e) => e !== "" && e !== "." && e !== ".."), a = (n, a) => {
|
|
4
4
|
let o = [], s = { "conversation.json": r(e(JSON.stringify(n, null, 2))) };
|
|
5
|
-
for (let e of a) {
|
|
6
|
-
if (!i(e.path)) {
|
|
7
|
-
o.push(e.path);
|
|
8
|
-
continue;
|
|
9
|
-
}
|
|
10
|
-
s[`res/${e.path}`] = r(e.data);
|
|
11
|
-
}
|
|
5
|
+
for (let e of a) i(e.path) ? s[`res/${e.path}`] = r(e.data) : o.push(e.path);
|
|
12
6
|
let c = t(s);
|
|
13
7
|
return {
|
|
14
8
|
blob: new Blob([new Uint8Array(c)], { type: "application/zip" }),
|
|
15
9
|
skippedPaths: o
|
|
16
10
|
};
|
|
17
11
|
};
|
|
18
|
-
//#endregion
|
|
19
12
|
export { a as buildDialArchive, i as isValidArchivePath };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UnsupportedImportFormatError as e, parseImportEnvelope as t } from "./import-conversation.js";
|
|
2
2
|
import { isValidArchivePath as n } from "./zip-export.js";
|
|
3
3
|
import { strFromU8 as r, unzipSync as i } from "fflate";
|
|
4
|
-
|
|
4
|
+
// src/conversation/conversation-transfer/zip-import.ts
|
|
5
5
|
var a = "conversation.json", o = /^conversations\/.*\.json$/, s = "res/", c = (e) => e.find((e) => e === a) ?? e.find((e) => o.test(e)) ?? e.find((e) => !e.includes("/") && e.toLowerCase().endsWith(".json")), l = (e) => new Promise((t, n) => {
|
|
6
6
|
let r = new FileReader();
|
|
7
7
|
r.onload = () => t(new Uint8Array(r.result)), r.onerror = () => n(r.error), r.readAsArrayBuffer(e);
|
|
@@ -18,12 +18,11 @@ var a = "conversation.json", o = /^conversations\/.*\.json$/, s = "res/", c = (e
|
|
|
18
18
|
for (let e of d) {
|
|
19
19
|
if (e.endsWith("/") || !e.startsWith(s)) continue;
|
|
20
20
|
let t = e.slice(4);
|
|
21
|
-
|
|
21
|
+
t && n(t) && m.set(t, u[e]);
|
|
22
22
|
}
|
|
23
23
|
return {
|
|
24
24
|
envelope: p,
|
|
25
25
|
attachments: m
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { u as parseDialArchive };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/create-chat-stream-api.ts
|
|
2
2
|
var e = { "Content-Type": "application/json" }, t = 409, n = "The response could not be saved. It is still shown here, but may be lost if you reload or leave this page. Copy it before continuing.", r = class extends Error {
|
|
3
3
|
static type = "conversation_save_failed";
|
|
4
4
|
constructor() {
|
|
@@ -20,11 +20,7 @@ var e = { "Content-Type": "application/json" }, t = 409, n = "The response could
|
|
|
20
20
|
let n = Date.now(), r, i = !1, a = () => {
|
|
21
21
|
if (i) return;
|
|
22
22
|
let o = Date.now() - n;
|
|
23
|
-
|
|
24
|
-
t();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
clearTimeout(r), r = setTimeout(a, e - o);
|
|
23
|
+
o >= e ? t() : (clearTimeout(r), r = setTimeout(a, e - o));
|
|
28
24
|
}, o = () => {
|
|
29
25
|
document.visibilityState === "visible" && a();
|
|
30
26
|
}, s = typeof window < "u" && typeof document < "u";
|
|
@@ -136,5 +132,4 @@ var e = { "Content-Type": "application/json" }, t = 409, n = "The response could
|
|
|
136
132
|
}
|
|
137
133
|
};
|
|
138
134
|
};
|
|
139
|
-
//#endregion
|
|
140
135
|
export { i as DEFAULT_GENERATION_CONFLICT_MESSAGE, n as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, c as DEFAULT_STREAM_IDLE_TIMEOUT_MS, a as GenerationConflictError, r as GenerationPersistenceError, s as StreamInterruptedError, o as StreamUpstreamError, f as createChatStreamApi };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RecipientsCountStatus as e } from "../../useShareRecipientsCount/useShareRecipientsCount.js";
|
|
2
|
-
|
|
2
|
+
// src/conversation/deriveConversationRowActionState/deriveConversationRowActionState.ts
|
|
3
3
|
var t = (t, n, r) => {
|
|
4
4
|
let i = !!(t.isReadonly || t.sharedWithMe || t.publishedWithMe), a = !i && n != null ? [...new Set(n.map((e) => e.folderPath.join("/")))] : [];
|
|
5
5
|
return {
|
|
@@ -10,5 +10,4 @@ var t = (t, n, r) => {
|
|
|
10
10
|
isUnpublishApplicable: a.length > 0
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { t as deriveConversationRowActionState };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MessageRole as e } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/conversation/display-name-watch.ts
|
|
3
3
|
var t = (t) => t.messages.filter((t) => t.role !== e.Status).length < 2 ? !1 : t.llmNamingDone !== !0;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as shouldWatchForDisplayNameUpdate };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "dompurify";
|
|
2
|
-
|
|
2
|
+
// src/conversation/footer-message.ts
|
|
3
3
|
var t = {
|
|
4
4
|
ALLOWED_TAGS: [
|
|
5
5
|
"a",
|
|
@@ -19,5 +19,4 @@ var t = {
|
|
|
19
19
|
let t = e.trim();
|
|
20
20
|
return /^v/i.test(t) ? t : `v${t}`;
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { r as formatAppVersion, n as sanitizeFooterHtml };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
var e =
|
|
3
|
-
let [r, i] =
|
|
4
|
-
return
|
|
5
|
-
},
|
|
6
|
-
let
|
|
7
|
-
if (
|
|
8
|
-
let
|
|
9
|
-
if (
|
|
10
|
-
let
|
|
11
|
-
return
|
|
1
|
+
// src/conversation/get-model-id-from-conversation-id.ts
|
|
2
|
+
var e = /[-+]/, t = /^\d+$/, n = (n) => n ? n.split(e)[0].split(".").every((e) => t.test(e)) : !1, r = (e, t) => {
|
|
3
|
+
let [r, i] = e.split("__");
|
|
4
|
+
return t && n(i) ? [r, i].join("__") : r;
|
|
5
|
+
}, i = (e) => {
|
|
6
|
+
let t = e.split("/");
|
|
7
|
+
if (t.length < 3) return;
|
|
8
|
+
let n = t.slice(2), i = n[0] === ".scheduler" ? n.slice(2) : n, a = i.findIndex((e) => e.includes("__"));
|
|
9
|
+
if (a === -1) return;
|
|
10
|
+
let o = i[a], s = i.slice(0, a).filter(Boolean), c = r(o, s[0] === "applications"), l = [...s, c].filter(Boolean);
|
|
11
|
+
return l.length > 0 ? l.join("/") : void 0;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export { s as getModelIdFromConversationId };
|
|
13
|
+
export { i as getModelIdFromConversationId };
|
package/conversation/greeting.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/greeting.ts
|
|
2
2
|
var e = (e, t, n) => {
|
|
3
3
|
let r = n != null && n.length > 0;
|
|
4
4
|
return e >= 5 && e <= 11 ? r ? t.morningWithName : t.morningNoName : e >= 12 && e <= 16 ? r ? t.afternoonWithName : t.afternoonNoName : e >= 17 && e <= 20 ? r ? t.eveningWithName : t.eveningNoName : r ? t.nightWithName : t.nightNoName;
|
|
5
5
|
};
|
|
6
|
-
//#endregion
|
|
7
6
|
export { e as getTimeOfDayGreeting };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageRole as e, StatusEvent as t, generateUUID as n } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/conversation/message-factory.ts
|
|
3
3
|
var r = (r, i) => {
|
|
4
4
|
let a = {
|
|
5
5
|
event_type: t.ModelChanged,
|
|
@@ -15,5 +15,4 @@ var r = (r, i) => {
|
|
|
15
15
|
custom_content: a
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { r as createDeploymentChangedMessage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageRole as e, ResponseFormat as t, StatusEvent as n, isStatusMessage as r } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/conversation/message-utils.ts
|
|
3
3
|
var i = (t, n, r, i) => i && n === r - 1 && t.role === e.Assistant, a = (e) => {
|
|
4
4
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
5
5
|
let i = e[t];
|
|
@@ -52,5 +52,4 @@ var i = (t, n, r, i) => i && n === r - 1 && t.role === e.Assistant, a = (e) => {
|
|
|
52
52
|
values: s
|
|
53
53
|
};
|
|
54
54
|
}, f = (e) => (e ?? "").toLowerCase().replace(/[^a-z]/g, "") === "plaintext" ? t.PlainText : t.Markdown;
|
|
55
|
-
//#endregion
|
|
56
55
|
export { d as getFormSchemaToolSyncKey, a as getLastDeploymentId, s as getLastUserMessageToolConfiguration, u as getLatestToolConfiguration, l as getToolConfigurationFromFormSchema, i as isMessageStreaming, o as messageHasStages, f as normalizeResponseFormat };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StageStatus as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { OverlayStageStatus as t } from "@epam/ai-dial-chat-overlay";
|
|
3
|
-
|
|
3
|
+
// src/conversation/overlay-messages.ts
|
|
4
4
|
var n = (n) => {
|
|
5
5
|
switch (n) {
|
|
6
6
|
case e.Completed: return t.Completed;
|
|
@@ -22,5 +22,4 @@ var n = (n) => {
|
|
|
22
22
|
...n ? { stages: n } : {}
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
-
//#endregion
|
|
26
25
|
export { i as toOverlayMessages };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/quick-app-conversation-starters.ts
|
|
2
2
|
var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (e) => {
|
|
3
3
|
if (typeof e == "string") return e.trim() || void 0;
|
|
4
4
|
}, n = (n) => {
|
|
@@ -25,5 +25,4 @@ var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (e) => {
|
|
|
25
25
|
isChatMessageInputDisabled: n.chatMessageInputDisabled === !0
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { n as getQuickAppConversationStarters };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/starter-option.ts
|
|
2
2
|
var e = (e) => e["dial:widgetOptions"].populateText || e.title, t = (e) => {
|
|
3
3
|
let t = e?.properties;
|
|
4
4
|
if (!t) return {
|
|
@@ -23,5 +23,4 @@ var e = (e) => e["dial:widgetOptions"].populateText || e.title, t = (e) => {
|
|
|
23
23
|
description: a
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { e as getStarterPopulateText, t as getStartersFromSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect as e, useMemo as t } from "react";
|
|
2
|
-
|
|
2
|
+
// src/conversation/useActiveConversationSync/useActiveConversationSync.ts
|
|
3
3
|
var n = ({ activeConversationId: n, items: r, refreshConversations: i, markConversationViewed: a, conversationIdsMatch: o, toPanelConversationId: s }) => {
|
|
4
4
|
let c = t(() => n ? s(n) : void 0, [n, s]);
|
|
5
5
|
return e(() => {
|
|
@@ -15,5 +15,4 @@ var n = ({ activeConversationId: n, items: r, refreshConversations: i, markConve
|
|
|
15
15
|
o
|
|
16
16
|
]), c;
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { n as useActiveConversationSync };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
-
|
|
2
|
+
// src/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.ts
|
|
3
3
|
var i = () => {
|
|
4
4
|
let [i, a] = r(null), [o, s] = r(!1), [c, l] = r(null), u = n(null), d = n(!1), f = n(0), p = n(null), m = e((e, t) => {
|
|
5
5
|
let { activeElement: n } = document;
|
|
@@ -35,5 +35,4 @@ var i = () => {
|
|
|
35
35
|
confirm: g
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { i as useAsyncConfirmDialog };
|
|
@@ -3,8 +3,11 @@ import { sanitizeFileName as t } from "../../files/file-name.js";
|
|
|
3
3
|
import { createUploadPathAllocator as n } from "../conversation-transfer/build-upload-path.js";
|
|
4
4
|
import { AttachmentErrorReason as r } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { useCallback as i, useRef as a } from "react";
|
|
6
|
-
|
|
7
|
-
var o = 700, s = 5, c = (e) =>
|
|
6
|
+
// src/conversation/useAttachmentUpload/useAttachmentUpload.ts
|
|
7
|
+
var o = 700, s = 5, c = (e) => {
|
|
8
|
+
let n = e.split("/").filter(Boolean).pop() ?? "file";
|
|
9
|
+
return t(n).replace(/\.\.+/g, ".").replace(/^\.+/, "") || "file";
|
|
10
|
+
}, l = (e) => typeof e == "object" && !!e && "response" in e && e.response?.status === 409, u = ({ filesApi: t, bucket: u, onNetworkError: d, debounceMs: f = o }) => {
|
|
8
11
|
let p = a([]), m = a(null), h = a(null), g = i((t, r) => {
|
|
9
12
|
let i = `${t}|${e(r)}`;
|
|
10
13
|
return h.current?.key !== i && (h.current = {
|
|
@@ -58,5 +61,4 @@ var o = 700, s = 5, c = (e) => t(e.split("/").filter(Boolean).pop() ?? "file").r
|
|
|
58
61
|
d
|
|
59
62
|
]) };
|
|
60
63
|
};
|
|
61
|
-
//#endregion
|
|
62
64
|
export { u as useAttachmentUpload };
|
|
@@ -9,8 +9,8 @@ import { buildDialArchive as h } from "../conversation-transfer/zip-export.js";
|
|
|
9
9
|
import { ConversationTransferErrorCode as g, ConversationTransferSubjectKind as _, ConversationTransferUnitKind as v, triggerBlobDownload as y } from "@epam/ai-dial-chat-shared";
|
|
10
10
|
import { useCallback as b } from "react";
|
|
11
11
|
import { ResponseError as x } from "@epam/ai-dial-chat-api-client";
|
|
12
|
-
|
|
13
|
-
var S = 5, C =
|
|
12
|
+
// src/conversation/useConversationExport/useConversationExport.ts
|
|
13
|
+
var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof x && e.response.status === w, O = (e, t) => {
|
|
14
14
|
let n = Number(e.response.headers.get("Retry-After"));
|
|
15
15
|
return Number.isFinite(n) && n > 0 ? n * 1e3 : E * t;
|
|
16
16
|
}, k = (e, t) => new Promise((n) => {
|
|
@@ -38,11 +38,8 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
38
38
|
entries: await u(e, S, async (e) => {
|
|
39
39
|
if (t.aborted || i) return;
|
|
40
40
|
let n = l(e.fileId);
|
|
41
|
-
if (!n)
|
|
42
|
-
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
41
|
+
if (!n) r = !0, o();
|
|
42
|
+
else try {
|
|
46
43
|
let e = await w.downloadFileRaw({
|
|
47
44
|
bucket: n.bucket,
|
|
48
45
|
path: n.path
|
|
@@ -93,7 +90,8 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
93
90
|
}));
|
|
94
91
|
try {
|
|
95
92
|
if (l === e.WithoutAttachments) {
|
|
96
|
-
|
|
93
|
+
let e = i([s(_)], []), t = o(e);
|
|
94
|
+
y(t, u), k?.({
|
|
97
95
|
jobId: n,
|
|
98
96
|
titles: [a]
|
|
99
97
|
}), I.succeedJob(n);
|
|
@@ -134,14 +132,14 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
134
132
|
}), I.failJob(n, g.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
|
|
135
133
|
return;
|
|
136
134
|
}
|
|
137
|
-
let { blob:
|
|
138
|
-
|
|
135
|
+
let w = i([_], []), { blob: T, skippedPaths: E } = h(w, b), D = x || E.length > 0;
|
|
136
|
+
D && P?.({
|
|
139
137
|
jobId: n,
|
|
140
138
|
code: t.AttachmentSkipped
|
|
141
|
-
}), y(
|
|
139
|
+
}), y(T, u), k?.({
|
|
142
140
|
jobId: n,
|
|
143
141
|
titles: [a]
|
|
144
|
-
}),
|
|
142
|
+
}), D ? I.warnJob(n, t.AttachmentSkipped) : I.succeedJob(n);
|
|
145
143
|
} catch (e) {
|
|
146
144
|
if (d.aborted) return;
|
|
147
145
|
let t = M(e) ? g.FileTooLarge : g.Unknown, r = await D(e);
|
|
@@ -250,7 +248,8 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
250
248
|
}
|
|
251
249
|
}
|
|
252
250
|
if (!n.aborted) try {
|
|
253
|
-
|
|
251
|
+
let n = i(c, []), r = o(n);
|
|
252
|
+
y(r, t), k?.({ jobId: e }), I.succeedJob(e);
|
|
254
253
|
} catch (t) {
|
|
255
254
|
let n = M(t) ? g.FileTooLarge : g.Unknown, r = await D(t);
|
|
256
255
|
F?.({
|
|
@@ -281,5 +280,4 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
281
280
|
dismissAll: I.dismissAll
|
|
282
281
|
};
|
|
283
282
|
};
|
|
284
|
-
//#endregion
|
|
285
283
|
export { C as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/useConversationHandlers/attachment-to-dto.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
if (!e.url) throw Error(`Attachment "${e.name}" has not been uploaded`);
|
|
4
4
|
return {
|
|
@@ -9,5 +9,4 @@ var e = (e) => {
|
|
|
9
9
|
}, t = (t) => {
|
|
10
10
|
if (t.length) return t.map(e);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { e as attachmentToDto, t as attachmentsToDtos };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageRole as e } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/conversation/useConversationHandlers/message-factory.ts
|
|
3
3
|
var t = (t, n, r) => {
|
|
4
4
|
let i = new Date(Date.now()).toISOString();
|
|
5
5
|
return {
|
|
@@ -17,5 +17,4 @@ var t = (t, n, r) => {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { t as createMessagePair };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { MessageRole as e } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
3
|
-
var t = (e) => e != null && Object.keys(e).length > 0, n = (e, t) => (e?.length ?? 0)
|
|
2
|
+
// src/conversation/useConversationHandlers/message-utils.ts
|
|
3
|
+
var t = (e) => e != null && Object.keys(e).length > 0, n = (e, t) => (e?.length ?? 0) !== (t?.length ?? 0) || (e ?? []).some((e, n) => e.url !== t?.[n]?.url), r = (e, t, r, i, a) => {
|
|
4
4
|
if (t !== e.content || i.length > 0) return !0;
|
|
5
5
|
let o = e.custom_content?.attachments?.length ?? 0;
|
|
6
|
-
return r.length
|
|
6
|
+
return r.length !== o || a != null && n(e.custom_content?.skills, a);
|
|
7
7
|
}, i = (t) => t == null || t.role !== e.Assistant || !!t.wasStoppedByUser || t.streamErrorMessage != null, a = (e, t, n, a, o, s) => {
|
|
8
8
|
let c = e[t];
|
|
9
9
|
return c ? r(c, n, a, o, s) || i(e[t + 1]) : !1;
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as hasActiveToolConfig, i as isAnswerIncomplete, r as isMessageChanged, a as shouldRerunGenerationOnEdit };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getStarterPopulateText as e } from "../starter-option.js";
|
|
2
|
-
|
|
2
|
+
// src/conversation/useConversationHandlers/starter-option.ts
|
|
3
3
|
var t = (t, n) => {
|
|
4
4
|
let { populateText: r } = t["dial:widgetOptions"];
|
|
5
5
|
return r == null && n ? n : e(t);
|
|
@@ -7,5 +7,4 @@ var t = (t, n) => {
|
|
|
7
7
|
let { populateText: r, submit: i } = e["dial:widgetOptions"];
|
|
8
8
|
return i && r == null ? "" : t(e, n);
|
|
9
9
|
}, r = (e, t) => n(e, t) || e.title;
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as getStarterConversationText, r as getStarterDisplayText, n as getStarterSubmitText };
|
|
@@ -7,7 +7,7 @@ import { getConversationPath as s } from "../useConversationStream/conversation-
|
|
|
7
7
|
import { MessageRole as c, generateUUID as l } from "@epam/ai-dial-chat-shared";
|
|
8
8
|
import { useCallback as u, useState as d } from "react";
|
|
9
9
|
import { SendCompletionDtoModeEnum as f } from "@epam/ai-dial-chat-api-client";
|
|
10
|
-
|
|
10
|
+
// src/conversation/useConversationHandlers/useConversationHandlers.ts
|
|
11
11
|
var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startStream: _, state: { setConversation: v, conversationRef: y }, filesApi: b, conversationsApi: x, rateApi: S, resolveModelId: C, onConversationDeleted: w, showNetworkError: T, toolConfigurationValue: E }) => {
|
|
12
12
|
let [D, O] = d(null), [k, A] = d(/* @__PURE__ */ new Set()), [j, M] = d(null), { handleUploadAttachment: N } = e({
|
|
13
13
|
filesApi: b,
|
|
@@ -182,7 +182,7 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
182
182
|
handleConfirmDelete: L,
|
|
183
183
|
handleRateMessage: R,
|
|
184
184
|
handleButtonSelect: u((e, t, n) => {
|
|
185
|
-
|
|
185
|
+
m && p && !g && (e["dial:widgetOptions"].confirmationMessage ? M({
|
|
186
186
|
starter: e,
|
|
187
187
|
propertyKey: t,
|
|
188
188
|
description: n
|
|
@@ -199,7 +199,7 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
199
199
|
M(null), z(e, t, n);
|
|
200
200
|
}, [j, z]),
|
|
201
201
|
handleStartEdit: u((e) => {
|
|
202
|
-
A((t) => new Set([...t, e]));
|
|
202
|
+
A((t) => /* @__PURE__ */ new Set([...t, e]));
|
|
203
203
|
}, []),
|
|
204
204
|
handleCancelEdit: u((e) => {
|
|
205
205
|
A((t) => {
|
|
@@ -263,5 +263,4 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
263
263
|
setPendingStarterContext: M
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
|
-
//#endregion
|
|
267
266
|
export { p as useConversationHandlers };
|
|
@@ -8,7 +8,7 @@ import { useConversationTransferQueue as p } from "../conversation-transfer/queu
|
|
|
8
8
|
import { parseDialArchive as m } from "../conversation-transfer/zip-import.js";
|
|
9
9
|
import { ConversationTransferErrorCode as h, ConversationTransferSubjectKind as g, ConversationTransferUnitKind as _, generateUUID as v } from "@epam/ai-dial-chat-shared";
|
|
10
10
|
import { useCallback as y } from "react";
|
|
11
|
-
|
|
11
|
+
// src/conversation/useConversationImport/useConversationImport.ts
|
|
12
12
|
var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promise((t, n) => {
|
|
13
13
|
let r = new FileReader();
|
|
14
14
|
r.onload = () => t(r.result), r.onerror = () => n(r.error), r.readAsText(e);
|
|
@@ -21,8 +21,9 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
|
|
|
21
21
|
isArchive: !0
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
+
let t = await C(e);
|
|
24
25
|
return {
|
|
25
|
-
history: i(
|
|
26
|
+
history: i(t).history,
|
|
26
27
|
attachments: /* @__PURE__ */ new Map(),
|
|
27
28
|
isArchive: !1
|
|
28
29
|
};
|
|
@@ -146,15 +147,15 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
|
|
|
146
147
|
for (let e of n.skippedNames) j.add(e);
|
|
147
148
|
t = n.targetMap;
|
|
148
149
|
}
|
|
149
|
-
let { conversation:
|
|
150
|
+
let n = s(e, t), { conversation: c, subPath: u } = o(n, l);
|
|
150
151
|
if (await i.saveConversation({
|
|
151
|
-
path:
|
|
152
|
+
path: u,
|
|
152
153
|
saveConversationBodyDto: { conversation: {
|
|
153
|
-
...
|
|
154
|
+
...c,
|
|
154
155
|
llmNamingDone: !0
|
|
155
156
|
} }
|
|
156
157
|
}, { signal: p }), p.aborted) return;
|
|
157
|
-
k.push(
|
|
158
|
+
k.push(c.name);
|
|
158
159
|
} catch (t) {
|
|
159
160
|
if (p.aborted) return;
|
|
160
161
|
if (F(t)) {
|
|
@@ -166,32 +167,31 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
|
|
|
166
167
|
O(k.length + A.length);
|
|
167
168
|
}
|
|
168
169
|
if (!p.aborted) {
|
|
169
|
-
if (M) {
|
|
170
|
-
|
|
170
|
+
if (M) E?.({
|
|
171
|
+
jobId: n,
|
|
172
|
+
code: h.Unauthorized
|
|
173
|
+
}), D.failJob(n, h.Unauthorized);
|
|
174
|
+
else {
|
|
175
|
+
if (k.length > 0) {
|
|
176
|
+
try {
|
|
177
|
+
await m?.();
|
|
178
|
+
} catch {}
|
|
179
|
+
S?.({
|
|
180
|
+
jobId: n,
|
|
181
|
+
titles: k
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
A.length > 0 && E?.({
|
|
171
185
|
jobId: n,
|
|
172
|
-
code: h.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (k.length > 0) {
|
|
177
|
-
try {
|
|
178
|
-
await m?.();
|
|
179
|
-
} catch {}
|
|
180
|
-
S?.({
|
|
186
|
+
code: h.Unknown,
|
|
187
|
+
titles: A,
|
|
188
|
+
traceId: N
|
|
189
|
+
}), j.size > 0 && C?.({
|
|
181
190
|
jobId: n,
|
|
182
|
-
|
|
183
|
-
|
|
191
|
+
code: t.AttachmentSkipped,
|
|
192
|
+
names: [...j]
|
|
193
|
+
}), A.length > 0 ? D.failJob(n, h.Unknown) : j.size > 0 ? D.warnJob(n, t.AttachmentSkipped) : D.succeedJob(n);
|
|
184
194
|
}
|
|
185
|
-
A.length > 0 && E?.({
|
|
186
|
-
jobId: n,
|
|
187
|
-
code: h.Unknown,
|
|
188
|
-
titles: A,
|
|
189
|
-
traceId: N
|
|
190
|
-
}), j.size > 0 && C?.({
|
|
191
|
-
jobId: n,
|
|
192
|
-
code: t.AttachmentSkipped,
|
|
193
|
-
names: [...j]
|
|
194
|
-
}), A.length > 0 ? D.failJob(n, h.Unknown) : j.size > 0 ? D.warnJob(n, t.AttachmentSkipped) : D.succeedJob(n);
|
|
195
195
|
}
|
|
196
196
|
}, [
|
|
197
197
|
l,
|
|
@@ -235,5 +235,4 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
|
|
|
235
235
|
dismissAll: D.dismissAll
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
|
-
//#endregion
|
|
239
238
|
export { E as useConversationImport };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo as e } from "react";
|
|
2
|
-
|
|
2
|
+
// src/conversation/useConversationLookupMaps/useConversationLookupMaps.ts
|
|
3
3
|
var t = ({ items: t, toPanelConversationId: n }) => e(() => {
|
|
4
4
|
let e = new Map(t.map((e) => [n(e.id), e.id])), r = new Map(t.map((e) => [n(e.id), e]));
|
|
5
5
|
return {
|
|
@@ -7,5 +7,4 @@ var t = ({ items: t, toPanelConversationId: n }) => e(() => {
|
|
|
7
7
|
getRawItem: (e) => r.get(e)
|
|
8
8
|
};
|
|
9
9
|
}, [t, n]);
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as useConversationLookupMaps };
|
|
@@ -3,7 +3,7 @@ import { findDeploymentByIdOrReference as t } from "../../catalog/deployment-id.
|
|
|
3
3
|
import { getModelIdFromConversationId as n } from "../get-model-id-from-conversation-id.js";
|
|
4
4
|
import { FilterTab as r } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { useMemo as i } from "react";
|
|
6
|
-
|
|
6
|
+
// src/conversation/useConversationPanelItems/useConversationPanelItems.ts
|
|
7
7
|
var a = (e) => e.sharedWithMe ? r.Shared : e.publishedWithMe ? r.Organization : r.MyChats, o = ({ items: r, deployments: o, isDeploymentsLoading: s, toPanelConversationId: c, resolveIconUrl: l, resolveIconTooltip: u, resolveHref: d, resolveTaskBadge: f }) => i(() => r.map((r) => {
|
|
8
8
|
let i = c(r.id), p = n(r.id), m = p ? t(o, p) : void 0, h = p ? e(p.split("/").pop() ?? p) : "", g = f?.(r);
|
|
9
9
|
return {
|
|
@@ -31,5 +31,4 @@ var a = (e) => e.sharedWithMe ? r.Shared : e.publishedWithMe ? r.Organization :
|
|
|
31
31
|
d,
|
|
32
32
|
f
|
|
33
33
|
]);
|
|
34
|
-
//#endregion
|
|
35
34
|
export { a as getConversationSource, o as useConversationPanelItems };
|