@epam/ai-dial-chat-hooks 1.1.16 → 1.1.18
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 +1 -2
- 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/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/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
package/api-error/api-error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api-error/api-error.ts
|
|
2
2
|
var e = (e) => typeof e == "object" && !!e, t = (t) => {
|
|
3
3
|
if (!e(t)) return !1;
|
|
4
4
|
let { message: n, error: r } = t;
|
|
@@ -8,11 +8,11 @@ var e = (e) => typeof e == "object" && !!e, t = (t) => {
|
|
|
8
8
|
let t = r.exec(e);
|
|
9
9
|
if (!t) return;
|
|
10
10
|
let [, n, o] = t;
|
|
11
|
-
if (
|
|
11
|
+
if (n !== i && o !== a) return n;
|
|
12
12
|
}, s = (t) => {
|
|
13
13
|
if (!e(t)) return;
|
|
14
14
|
let n = t.response;
|
|
15
|
-
if (
|
|
15
|
+
if (e(n) && typeof n.json == "function") return n;
|
|
16
16
|
}, c = (e) => {
|
|
17
17
|
let t = s(e);
|
|
18
18
|
return t?.status ? t.status === 404 : !1;
|
|
@@ -41,5 +41,4 @@ var e = (e) => typeof e == "object" && !!e, t = (t) => {
|
|
|
41
41
|
traceId: u
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { d as getApiErrorDetails, u as getApiErrorMessage, l as getApiErrorStatus, c as isConversationNotFoundError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api-transport/create-csrf-middleware.ts
|
|
2
2
|
var e = (e) => ({
|
|
3
3
|
pre: async (t) => {
|
|
4
4
|
let n = e.getCsrfToken();
|
|
@@ -17,5 +17,4 @@ var e = (e) => ({
|
|
|
17
17
|
return n && e.setCsrfToken(n), t.response;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
//#endregion
|
|
21
20
|
export { e as createCsrfMiddleware };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api-transport/create-unauthorized-middleware.ts
|
|
2
2
|
var e = async (e) => {
|
|
3
3
|
try {
|
|
4
4
|
return await e.clone().text();
|
|
@@ -32,10 +32,12 @@ var e = async (e) => {
|
|
|
32
32
|
if (t.response.status === 401) throw r.notifyUnauthorized(t.url), r.createUnauthorizedError(t.url);
|
|
33
33
|
if (t.response.status === 403) {
|
|
34
34
|
let n = await e(t.response);
|
|
35
|
-
if (r.isInvalidCsrfErrorBody(n))
|
|
35
|
+
if (r.isInvalidCsrfErrorBody(n)) {
|
|
36
|
+
let e = await i(t);
|
|
37
|
+
return a(t, e);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
return t.response;
|
|
38
41
|
} };
|
|
39
42
|
};
|
|
40
|
-
//#endregion
|
|
41
43
|
export { r as createUnauthorizedMiddleware };
|
|
@@ -3,14 +3,14 @@ import { AttachmentContentType as t, useAttachmentCanvas as n } from "@epam/ai-d
|
|
|
3
3
|
import { MIMEType as r, base64ToBlob as i, ensureDownloadFilename as a, triggerAnchorDownload as o, triggerBlobDownload as s } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { parsePdfPageReference as c } from "@epam/ai-dial-quotations";
|
|
5
5
|
import { useCallback as l } from "react";
|
|
6
|
-
|
|
6
|
+
// src/attachment/useAttachmentAction/useAttachmentAction.ts
|
|
7
7
|
var u = (t) => t.url != null && e(t.url) || t.data != null, d = (t, n) => {
|
|
8
8
|
let { url: c, name: l, contentType: u, data: d } = t;
|
|
9
9
|
if (c != null && e(c)) {
|
|
10
10
|
let e = n(c);
|
|
11
|
-
return e
|
|
11
|
+
return e != null && (o(e, a(l, c, u)), !0);
|
|
12
12
|
}
|
|
13
|
-
return d
|
|
13
|
+
return d != null && (s(i(d, u || r.Plain), a(l, c, u)), !0);
|
|
14
14
|
}, f = (t, n) => {
|
|
15
15
|
let { url: r } = t;
|
|
16
16
|
if (r == null) return;
|
|
@@ -18,7 +18,8 @@ var u = (t) => t.url != null && e(t.url) || t.data != null, d = (t, n) => {
|
|
|
18
18
|
if (e(i)) {
|
|
19
19
|
let e = n(i);
|
|
20
20
|
if (e == null) return;
|
|
21
|
-
|
|
21
|
+
let r = t.title ?? i.split("/").pop() ?? "";
|
|
22
|
+
o(e, a(r, i, t.type));
|
|
22
23
|
} else window.open(r, "_blank", "noopener,noreferrer");
|
|
23
24
|
}, p = (n, r) => {
|
|
24
25
|
let i = c(n.url);
|
|
@@ -63,12 +64,7 @@ var u = (t) => t.url != null && e(t.url) || t.data != null, d = (t, n) => {
|
|
|
63
64
|
url: i,
|
|
64
65
|
title: o
|
|
65
66
|
}, c = p(s, e);
|
|
66
|
-
|
|
67
|
-
t(c, o);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
f(s, e);
|
|
67
|
+
c ? t(c, o) : f(s, e);
|
|
71
68
|
}, [t, e]) };
|
|
72
69
|
};
|
|
73
|
-
//#endregion
|
|
74
70
|
export { d as downloadAttachment, u as isDownloadableAttachment, m as useAttachmentAction };
|
|
@@ -2,7 +2,7 @@ import { mimeTypesToFileAccept as e } from "../../files/attachment-types.js";
|
|
|
2
2
|
import { AttachmentErrorReason as t } from "@epam/ai-dial-chat-shared";
|
|
3
3
|
import { useCallback as n, useEffect as r, useMemo as i, useRef as a } from "react";
|
|
4
4
|
import { isMimeTypeAllowed as o, mimeTypesToExtensionLabels as s } from "@epam/ai-dial-attachment-input";
|
|
5
|
-
|
|
5
|
+
// src/attachment/useAttachmentValidation/useAttachmentValidation.ts
|
|
6
6
|
var c = 100, l = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.NoTypesAllowed = "noTypesAllowed", e.UnsupportedType = "unsupportedType", e;
|
|
8
8
|
}({}), u = ({ allowedMimeTypes: l, onValidationError: u, debounceMs: d = c }) => {
|
|
@@ -31,5 +31,4 @@ var c = 100, l = /* @__PURE__ */ function(e) {
|
|
|
31
31
|
fileAccept: h
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { l as AttachmentValidationErrorReason, u as useAttachmentValidation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/catalog/catalog-derivations.ts
|
|
2
2
|
var e = (e, t) => e.filter((e) => t.has(e.type)), t = (e, t) => t ? e.filter((e) => !e.isMyApp) : [...e], n = (e) => e.filter((e) => e.isUserFavorite && !e.isHidden), r = (e, t) => {
|
|
3
3
|
let n = new Set(e.map((e) => e.type));
|
|
4
4
|
return t.filter((e) => n.has(e));
|
|
@@ -6,5 +6,4 @@ var e = (e, t) => e.filter((e) => t.has(e.type)), t = (e, t) => t ? e.filter((e)
|
|
|
6
6
|
let n = new Set(t.flatMap((e) => e.topics));
|
|
7
7
|
return new Set(Array.from(e).filter((e) => n.has(e)));
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { r as deriveAvailableTabIds, n as deriveFavoriteItems, e as filterCatalogItemsBySelector, t as filterHiddenOwnedItems, i as reconcileFilterTopics };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CatalogEntityType as e, extractPromptParams as t } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
|
|
2
|
+
// src/catalog/catalog-primary-action.ts
|
|
3
3
|
var n = /* @__PURE__ */ function(e) {
|
|
4
4
|
return e.Deployment = "deployment", e.Prompt = "prompt", e;
|
|
5
5
|
}({}), r = async (n, r) => {
|
|
@@ -17,5 +17,4 @@ var n = /* @__PURE__ */ function(e) {
|
|
|
17
17
|
hasParameters: t(i).length > 0
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { n as CatalogPrimaryActionType, r as resolveCatalogPrimaryAction };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/catalog/create-publish-api.ts
|
|
2
2
|
var e = (e) => ({
|
|
3
3
|
source: e.source,
|
|
4
4
|
targets: e.targets,
|
|
@@ -23,5 +23,4 @@ var e = (e) => ({
|
|
|
23
23
|
function: e
|
|
24
24
|
}))
|
|
25
25
|
});
|
|
26
|
-
//#endregion
|
|
27
26
|
export { t as createPublishApiClient, e as toPublishRuleDto };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
|
|
2
2
|
import { CodeLanguage as t } from "@epam/ai-dial-catalog";
|
|
3
|
-
|
|
3
|
+
// src/catalog/deployment-endpoint-url.ts
|
|
4
4
|
var n = (e) => e.endsWith("/") ? e.slice(0, -1) : e, r = (t) => t.split("/").map((t) => encodeURIComponent(e(t))).join("/"), i = (t) => t.split("/").map(e).join("/"), a = (e, t) => `${n(e)}/openai/deployments/${r(t)}/chat/completions`, o = (e) => `${n(e)}/openai/v1/responses`, s = (e, n, { hasChatCompletion: r, hasResponsesApi: s }) => {
|
|
5
5
|
let c = [];
|
|
6
6
|
if (r) {
|
|
@@ -30,5 +30,4 @@ var n = (e) => e.endsWith("/") ? e.slice(0, -1) : e, r = (t) => t.split("/").map
|
|
|
30
30
|
endpoints: c
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
//#endregion
|
|
34
33
|
export { a as buildChatCompletionsUrl, s as buildDeploymentConnectApi, o as buildResponsesUrl };
|
package/catalog/deployment-id.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/catalog/deployment-id.ts
|
|
2
2
|
var e = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), t = (e) => e.split("/").map((e) => {
|
|
3
3
|
try {
|
|
4
4
|
return decodeURIComponent(e);
|
|
@@ -12,5 +12,4 @@ var e = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), t = (e)
|
|
|
12
12
|
let i = n(t);
|
|
13
13
|
return e.find((e) => n(e.id) === i);
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { t as decodeDeploymentId, e as encodeDeploymentId, r as findDeploymentByIdOrReference, n as normalizeDeploymentId };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatCost as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { CatalogLimitStatus as t } from "@epam/ai-dial-catalog";
|
|
3
|
-
|
|
3
|
+
// src/catalog/map-deployment-limits-to-catalog.ts
|
|
4
4
|
var n = [
|
|
5
5
|
{
|
|
6
6
|
key: "dayTokenStats",
|
|
@@ -69,5 +69,4 @@ var n = [
|
|
|
69
69
|
status: h(r)
|
|
70
70
|
} : void 0;
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { g as mapDeploymentLimitsDtoToCatalogLimits };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatCost as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { CatalogLimitStatus as t } from "@epam/ai-dial-catalog";
|
|
3
|
-
|
|
3
|
+
// src/catalog/map-deployment-limits-to-input.ts
|
|
4
4
|
var n = [
|
|
5
5
|
{
|
|
6
6
|
key: "dayTokenStats",
|
|
@@ -82,5 +82,4 @@ var n = [
|
|
|
82
82
|
status: g(o)
|
|
83
83
|
} : void 0;
|
|
84
84
|
};
|
|
85
|
-
//#endregion
|
|
86
85
|
export { v as mapDeploymentLimitsToInput };
|
|
@@ -4,7 +4,7 @@ import { resolveLocalizedText as n } from "../shared/locale.js";
|
|
|
4
4
|
import { mapEntityDetailsToCatalogDetails as r } from "./map-entity-details-to-catalog.js";
|
|
5
5
|
import { CatalogEntityType as i, formatLastUsed as a } from "@epam/ai-dial-chat-shared";
|
|
6
6
|
import { CredentialStatus as o, ToolsetAuthenticationType as s } from "@epam/ai-dial-catalog";
|
|
7
|
-
|
|
7
|
+
// src/catalog/map-deployment-to-catalog-item.ts
|
|
8
8
|
var c = {
|
|
9
9
|
NONE: s.None,
|
|
10
10
|
API_KEY: s.ApiKey,
|
|
@@ -88,5 +88,4 @@ var c = {
|
|
|
88
88
|
details: f.length > 0 ? { tools: { tools: f.map((e) => ({ name: e })) } } : void 0
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
//#endregion
|
|
92
91
|
export { v as mapDeploymentToCatalogItem, u as mapDeploymentToolsetCredentials, y as mapToolsetToCatalogItem, g as resolveDeploymentFolder };
|
|
@@ -4,7 +4,7 @@ import { formatCalendarDate as n } from "../shared/formatting.js";
|
|
|
4
4
|
import { formatUnitPrice as r } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { mimeTypesToExtensionLabels as i } from "@epam/ai-dial-attachment-input";
|
|
6
6
|
import { CredentialStatus as a, ToolsetAuthenticationType as o } from "@epam/ai-dial-catalog";
|
|
7
|
-
|
|
7
|
+
// src/catalog/map-entity-details-to-catalog.ts
|
|
8
8
|
var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens` : `${e} tokens`, c = (e) => {
|
|
9
9
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
10
10
|
if (t == null) return e;
|
|
@@ -309,7 +309,7 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
|
|
|
309
309
|
}, O = (t) => t === e.None || t === e.ApiKey || t === e.OAuth, k = (e) => {
|
|
310
310
|
if (e == null) return;
|
|
311
311
|
let { globalAuthStatus: t, appLevelAuthStatus: n, userLevelAuthStatus: r, scopesSupported: i, authorizationEndpoint: a, tokenEndpoint: o, apiKeyHeader: s } = e;
|
|
312
|
-
if (
|
|
312
|
+
if (t != null || n != null || r != null || a != null || o != null || s != null || i?.length) return {
|
|
313
313
|
global: t,
|
|
314
314
|
appLevel: n,
|
|
315
315
|
userLevel: r,
|
|
@@ -346,5 +346,4 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
|
|
|
346
346
|
case "toolset": return A(e);
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
|
-
//#endregion
|
|
350
349
|
export { j as mapDeploymentDetailsDtoToEntityDetails, C as mapEntityDetailsToCatalogDetails, b as mapToolsetCredentials };
|
|
@@ -2,7 +2,7 @@ import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
|
|
|
2
2
|
import { formatCalendarDate as t } from "../shared/formatting.js";
|
|
3
3
|
import { PromptSource as n } from "../prompt/prompt-resource.js";
|
|
4
4
|
import { CatalogEntityType as r, formatLastUsed as i } from "@epam/ai-dial-chat-shared";
|
|
5
|
-
|
|
5
|
+
// src/catalog/map-prompt-to-catalog-item.ts
|
|
6
6
|
var a = {
|
|
7
7
|
[n.Personal]: "personal",
|
|
8
8
|
[n.SharedWithMe]: "shared",
|
|
@@ -45,5 +45,4 @@ var a = {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { s as buildPromptOverview, c as isOrganisationPromptItem, l as mapPromptToCatalogItem };
|
|
@@ -5,7 +5,7 @@ import { SkillSource as r } from "../skill/skill-types.js";
|
|
|
5
5
|
import { CatalogEntityType as i, formatLastUsed as a } from "@epam/ai-dial-chat-shared";
|
|
6
6
|
import { CatalogContentNodeType as o } from "@epam/ai-dial-catalog";
|
|
7
7
|
import { SkillMetadataItemDtoNodeTypeEnum as s } from "@epam/ai-dial-chat-api-client";
|
|
8
|
-
|
|
8
|
+
// src/catalog/map-skill-to-catalog-item.ts
|
|
9
9
|
var c = {
|
|
10
10
|
[r.Personal]: "personal",
|
|
11
11
|
[r.SharedWithMe]: "shared",
|
|
@@ -119,5 +119,4 @@ var c = {
|
|
|
119
119
|
let t = await x(e);
|
|
120
120
|
return t == null ? null : new TextDecoder().decode(t);
|
|
121
121
|
};
|
|
122
|
-
//#endregion
|
|
123
122
|
export { b as buildSkillContentTree, _ as buildSkillOverview, u as mapSkillToCatalogItem, x as readSkillFileBytes, S as readSkillFilePreviewBytes, C as readSkillManifest, g as resolveSkillFileDownloadPath, m as resolveSkillManifestFileId };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CatalogEntityType as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { CodeLanguage as t } from "@epam/ai-dial-catalog";
|
|
3
|
-
|
|
3
|
+
// src/catalog/mcp-endpoint-url.ts
|
|
4
4
|
var n = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.Toolset = "toolset", e.Application = "application", e;
|
|
6
6
|
}({}), r = (e) => {
|
|
@@ -22,5 +22,4 @@ var n = /* @__PURE__ */ function(e) {
|
|
|
22
22
|
}]
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { n as McpResourceKind, s as buildApplicationMcpUrl, u as buildConnectApi, o as buildToolsetMcpUrl, l as resolveMcpResourceKind };
|
package/catalog/publish.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
|
|
2
2
|
import { CatalogEntityType as t } from "@epam/ai-dial-chat-shared";
|
|
3
|
-
|
|
3
|
+
// src/catalog/publish.ts
|
|
4
4
|
var n = {
|
|
5
5
|
[t.Model]: "model",
|
|
6
6
|
[t.Toolset]: "toolset",
|
|
@@ -15,5 +15,4 @@ var n = {
|
|
|
15
15
|
publishedAt: Date.parse(e.publishedAt),
|
|
16
16
|
folderPath: e.folderPath.split("/").filter(Boolean)
|
|
17
17
|
});
|
|
18
|
-
//#endregion
|
|
19
18
|
export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto, r as toPublishEntityType };
|
|
@@ -3,7 +3,7 @@ import { findDeploymentByIdOrReference as t } from "../deployment-id.js";
|
|
|
3
3
|
import { parseSkillResourceUrl as n } from "../../skill/skill-types.js";
|
|
4
4
|
import { CatalogEntityType as r } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { useCallback as i, useMemo as a } from "react";
|
|
6
|
-
|
|
6
|
+
// src/catalog/useCatalogEditNavigation/useCatalogEditNavigation.ts
|
|
7
7
|
var o = ({ deployments: o, isCustomAppsEnabled: s, isSchemaAppsEnabled: c, isHideCustomAppCreationEnabled: l, isToolsetsEnabled: u, isPromptsEnabled: d, quickAppSchemaId: f, urls: p, onNavigate: m, deletePrompt: h, deleteToolset: g, deleteSkill: _, deleteApplication: v, refetchPrompts: y, refetchToolsets: b, refetchSkills: x, refetchDeployments: S, onDeleteSuccess: C, labels: w, onNotify: T, onSkillUploadClick: E }) => ({
|
|
8
8
|
handleEdit: i((e) => {
|
|
9
9
|
if (e.type === r.Prompt) {
|
|
@@ -19,11 +19,7 @@ var o = ({ deployments: o, isCustomAppsEnabled: s, isSchemaAppsEnabled: c, isHid
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
let n = t(o, e.id);
|
|
22
|
-
|
|
23
|
-
m(p.buildCustomAppEditUrl(e.id));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
f && m(p.buildQuickAppEditUrl(f, e.id));
|
|
22
|
+
s && n != null && !n.applicationTypeSchemaId ? m(p.buildCustomAppEditUrl(e.id)) : f && m(p.buildQuickAppEditUrl(f, e.id));
|
|
27
23
|
}, [
|
|
28
24
|
o,
|
|
29
25
|
s,
|
|
@@ -105,5 +101,4 @@ var o = ({ deployments: o, isCustomAppsEnabled: s, isSchemaAppsEnabled: c, isHid
|
|
|
105
101
|
E
|
|
106
102
|
])
|
|
107
103
|
});
|
|
108
|
-
//#endregion
|
|
109
104
|
export { o as useCatalogEditNavigation };
|
|
@@ -7,7 +7,7 @@ import { buildConnectApi as c, resolveMcpResourceKind as l } from "./mcp-endpoin
|
|
|
7
7
|
import { useSkillItemDetails as u } from "./useSkillItemDetails.js";
|
|
8
8
|
import { CatalogEntityType as d } from "@epam/ai-dial-chat-shared";
|
|
9
9
|
import { useCallback as f } from "react";
|
|
10
|
-
|
|
10
|
+
// src/catalog/useCatalogItemDetails.ts
|
|
11
11
|
var p = (e) => (t) => {
|
|
12
12
|
if (!s(t)) return e.getPrompt(t.id);
|
|
13
13
|
let n = a(t.id);
|
|
@@ -56,5 +56,4 @@ var p = (e) => (t) => {
|
|
|
56
56
|
onLoadSkillDetailsFile: x
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { m as useCatalogItemDetails };
|
|
@@ -4,7 +4,7 @@ import { ToolsetLoginOutcomeType as r, useToolsetLogin as i } from "../../oauth/
|
|
|
4
4
|
import { useCallback as a } from "react";
|
|
5
5
|
import { CredentialStatus as o, CredentialsLevel as s, ToolsetAuthenticationType as c } from "@epam/ai-dial-catalog";
|
|
6
6
|
import { NotificationVariant as l } from "@epam/ai-dial-ui-kit";
|
|
7
|
-
|
|
7
|
+
// src/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.ts
|
|
8
8
|
var u = (e, t, n) => e === s.User ? n.user : t ? n.org : n.global, d = (e) => {
|
|
9
9
|
switch (e) {
|
|
10
10
|
case c.ApiKey: return t.ApiKey;
|
|
@@ -142,5 +142,4 @@ var u = (e, t, n) => e === s.User ? n.user : t ? n.org : n.global, d = (e) => {
|
|
|
142
142
|
])
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
|
-
//#endregion
|
|
146
145
|
export { f as useCatalogToolsetCredentials };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useMemo as n, useState as r } from "react";
|
|
2
|
-
|
|
2
|
+
// src/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.ts
|
|
3
3
|
var i = /* @__PURE__ */ function(e) {
|
|
4
4
|
return e.Deployment = "deployment", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e;
|
|
5
5
|
}({}), a = ({ loadFavorites: i, updateFavorite: a }) => {
|
|
@@ -9,7 +9,7 @@ var i = /* @__PURE__ */ function(e) {
|
|
|
9
9
|
return (async () => {
|
|
10
10
|
try {
|
|
11
11
|
let t = await i();
|
|
12
|
-
e.value || s(new Set([
|
|
12
|
+
e.value || s(/* @__PURE__ */ new Set([
|
|
13
13
|
...t.deployments,
|
|
14
14
|
...t.toolsets,
|
|
15
15
|
...t.prompts,
|
|
@@ -46,5 +46,4 @@ var i = /* @__PURE__ */ function(e) {
|
|
|
46
46
|
u
|
|
47
47
|
]);
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
export { i as FavoriteEntityType, a as useFavoriteEntitiesState };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useMemo as n, useState as r } from "react";
|
|
2
2
|
import { ListFilesItemDtoNodeTypeEnum as i } from "@epam/ai-dial-chat-api-client";
|
|
3
3
|
import { fromFolderPathKey as a, mergeFolderPaths as o, toFolderPathKey as s } from "@epam/ai-dial-publish-panel";
|
|
4
|
-
|
|
4
|
+
// src/catalog/usePublishFolders/usePublishFolders.ts
|
|
5
5
|
var c = "Production", l = 50, u = (e, t, n) => {
|
|
6
6
|
let r = e.get(t);
|
|
7
7
|
return r == null ? [] : r.filter((e) => e.nodeType === i.Folder).map((r) => {
|
|
@@ -48,7 +48,7 @@ var c = "Production", l = 50, u = (e, t, n) => {
|
|
|
48
48
|
return b((e) => e.includes(n) ? e : [...e, n]), Promise.resolve();
|
|
49
49
|
}, []), T = e((e) => {
|
|
50
50
|
let t = s(e), n = Array.isArray(d) ? d : [];
|
|
51
|
-
|
|
51
|
+
t && !n.includes(t) && f?.([t, ...n].slice(0, l));
|
|
52
52
|
}, [d, f]), E = e((e) => !e.includes(c), []);
|
|
53
53
|
return {
|
|
54
54
|
folderItems: n(() => {
|
|
@@ -68,5 +68,4 @@ var c = "Production", l = 50, u = (e, t, n) => {
|
|
|
68
68
|
hasPublishWriteAccess: E
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
-
//#endregion
|
|
72
71
|
export { d as usePublishFolders };
|
|
@@ -2,7 +2,7 @@ import { SkillSource as e } from "../../skill/skill-types.js";
|
|
|
2
2
|
import { mapSkillToCatalogItem as t } from "../map-skill-to-catalog-item.js";
|
|
3
3
|
import { useSkillItemDetails as n } from "../useSkillItemDetails.js";
|
|
4
4
|
import { useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
5
|
-
|
|
5
|
+
// src/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.ts
|
|
6
6
|
var s = ({ api: s, skills: c, sharedWithMe: l, publicSkills: u, skillId: d, folderLabels: f, skillOverviewLabels: p, favoriteIds: m }) => {
|
|
7
7
|
let h = i(() => [
|
|
8
8
|
...c,
|
|
@@ -55,5 +55,4 @@ var s = ({ api: s, skills: c, sharedWithMe: l, publicSkills: u, skillId: d, fold
|
|
|
55
55
|
onLoadSkillDetailsFile: _
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
export { s as useSkillDetailsPanelData };
|
|
@@ -3,7 +3,7 @@ import { parseSkillResourceUrl as t } from "../skill/skill-types.js";
|
|
|
3
3
|
import { buildSkillContentTree as n, buildSkillOverview as r, readSkillFilePreviewBytes as i, readSkillManifest as a, resolveSkillFileDownloadPath as o, resolveSkillManifestFileId as s } from "./map-skill-to-catalog-item.js";
|
|
4
4
|
import { parseSkillManifestDocument as c } from "../skill/skill-manifest.js";
|
|
5
5
|
import { useCallback as l, useRef as u } from "react";
|
|
6
|
-
|
|
6
|
+
// src/catalog/useSkillItemDetails.ts
|
|
7
7
|
var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
|
|
8
8
|
let m = u(null);
|
|
9
9
|
return {
|
|
@@ -22,7 +22,7 @@ var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
|
|
|
22
22
|
}),
|
|
23
23
|
d.getSkillMetadata(l, u)
|
|
24
24
|
]), v = h.status === "fulfilled" && h.value != null ? c(h.value) : void 0, y = _.status === "fulfilled" ? _.value : f.find((e) => e.url === i.id), b = g.status === "fulfilled" ? r(y, g.value.items, v?.about, p) : void 0, x = g.status === "fulfilled" ? n(g.value.items, u) : [], S = g.status === "fulfilled" ? s(g.value.items, u) : e;
|
|
25
|
-
if (
|
|
25
|
+
if (v != null || b != null) return {
|
|
26
26
|
...v == null ? {} : { promptContent: {
|
|
27
27
|
content: v.body,
|
|
28
28
|
...v.description == null ? {} : { description: v.description },
|
|
@@ -41,8 +41,8 @@ var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
|
|
|
41
41
|
if (t == null) return;
|
|
42
42
|
let n = o(e, t.path);
|
|
43
43
|
if (n == null) return;
|
|
44
|
-
let r = await
|
|
45
|
-
if (
|
|
44
|
+
let r = await d.downloadSkillFile(t.bucket, t.path, n), i = await a(r);
|
|
45
|
+
if (i != null) return n === "SKILL.md" ? c(i).body : i;
|
|
46
46
|
}, [d]),
|
|
47
47
|
onLoadSkillDetailsFile: l(async (e) => {
|
|
48
48
|
let t = m.current;
|
|
@@ -59,5 +59,4 @@ var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
|
|
|
59
59
|
}, [d])
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { d as useSkillItemDetails };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "dompurify";
|
|
2
|
-
|
|
2
|
+
// src/conversation/announcement-message.ts
|
|
3
3
|
var t = {
|
|
4
4
|
ALLOWED_TAGS: [
|
|
5
5
|
"a",
|
|
@@ -49,5 +49,4 @@ var r = (n) => e.sanitize(n, t), i = (t) => e.sanitize(t, n), a = (e) => typeof
|
|
|
49
49
|
}, n = e.items ?? [];
|
|
50
50
|
return n.length > 0 && (t.items = c(n)), JSON.stringify(t);
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { l as buildAnnouncementSignature, s as hasAnnouncementContent, o as hasStructuredAnnouncement, r as sanitizeAnnouncementHtml, i as sanitizeAnnouncementMessageHtml };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/conversation-transfer/async.ts
|
|
2
2
|
var e = async (e, t, n) => {
|
|
3
3
|
let r = [], i = 0, a = async () => {
|
|
4
4
|
let t = i;
|
|
@@ -14,5 +14,4 @@ var e = async (e, t, n) => {
|
|
|
14
14
|
};
|
|
15
15
|
return await Promise.all(Array.from({ length: Math.min(t, e.length) }, a)), r;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { e as runWithConcurrency };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/conversation-transfer/attachment-refs.ts
|
|
2
2
|
var e = (e) => e.startsWith("files/"), t = /^#[\w.=%-]*$/, n = (e) => {
|
|
3
3
|
let n = e.indexOf("#");
|
|
4
4
|
if (n < 0) return {
|
|
@@ -32,5 +32,4 @@ var e = (e) => e.startsWith("files/"), t = /^#[\w.=%-]*$/, n = (e) => {
|
|
|
32
32
|
a(e.url), a(e.reference_url);
|
|
33
33
|
}), Array.from(i, (e) => ({ fileId: e }));
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { i as collectAttachmentRefs, n as splitFileIdAnchor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatDateYM as e } from "./date.js";
|
|
2
|
-
|
|
2
|
+
// src/conversation/conversation-transfer/build-upload-path.ts
|
|
3
3
|
var t = (e) => {
|
|
4
4
|
let t = e.lastIndexOf("."), n = t > 0;
|
|
5
5
|
return {
|
|
@@ -26,5 +26,4 @@ var t = (e) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
export { i as createUploadPathAllocator };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/conversation-transfer/date.ts
|
|
2
2
|
var e = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, t = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
|
|
3
|
-
//#endregion
|
|
4
3
|
export { t as formatDateYM, e as formatDateYMD };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/conversation/conversation-transfer/dial-file-resolve.ts
|
|
2
2
|
var e = (e) => e.startsWith("files/"), t = (t) => {
|
|
3
3
|
if (!e(t)) return;
|
|
4
4
|
let n = t.slice(6), r = n.indexOf("/");
|
|
@@ -14,5 +14,4 @@ var e = (e) => e.startsWith("files/"), t = (t) => {
|
|
|
14
14
|
path: o
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { t as resolveDialFileBucketAndPath };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatDateYMD as e } from "./date.js";
|
|
2
2
|
import { ExportFileNameKind as t } from "./types.js";
|
|
3
|
-
|
|
3
|
+
// src/conversation/conversation-transfer/export-conversation.ts
|
|
4
4
|
var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) => {
|
|
5
5
|
let t = e.custom_content;
|
|
6
6
|
if (!t) return e;
|
|
@@ -28,5 +28,4 @@ var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) =>
|
|
|
28
28
|
[t.SingleConversationWithAttachments]: "dial",
|
|
29
29
|
[t.AllConversationsHistory]: "json"
|
|
30
30
|
}, l = (t, n, r = /* @__PURE__ */ new Date()) => `${e(r)}_${n}_${t}.${c[t]}`;
|
|
31
|
-
//#endregion
|
|
32
31
|
export { n as EXPORT_APP_NAME, o as buildExportEnvelope, l as buildExportFileName, s as serializeExportEnvelope, a as stripConversationAttachments };
|
|
@@ -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 };
|