@epam/ai-dial-chat-hooks 1.3.0-dev.288 → 1.3.0-dev.289
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.d.ts +2 -0
- package/api-error/api-error.d.ts.map +1 -1
- package/api-error/api-error.js +31 -23
- package/catalog/map-skill-to-catalog-item.js +19 -19
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +2 -4
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +94 -112
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +32 -29
- package/catalog.js +11 -10
- package/conversation/conversation-title-stream.d.ts +33 -0
- package/conversation/conversation-title-stream.d.ts.map +1 -0
- package/conversation/conversation-title-stream.js +103 -0
- package/conversation/useConversationExport/useConversationExport.js +46 -46
- package/conversation/useConversationHandlers/useConversationHandlers.js +39 -39
- package/conversation/useConversationStream/useConversationStream.js +93 -93
- package/conversation.js +5 -4
- package/entry-points/catalog.d.ts +1 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/conversation.d.ts +1 -0
- package/entry-points/conversation.d.ts.map +1 -1
- package/files/dial-file-manager-copy-move.util.js +16 -16
- package/files/dial-file-manager-mapping.util.js +17 -17
- package/files/useDialFileListing/useDialFileListing.js +113 -113
- package/files/useDialFileMutations/useDialFileMutations.js +47 -47
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +213 -211
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.js +40 -21
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +10 -10
- package/package.json +18 -18
- package/project/project-mapping.js +12 -12
- package/project/use-project-actions.js +12 -12
- package/project/use-project-watch.js +12 -12
- package/prompt/prompt.d.ts +11 -0
- package/prompt/prompt.d.ts.map +1 -1
- package/prompt/prompt.js +7 -3
- package/scheduled-task/use-scheduled-task-runs.js +13 -13
- package/usage/map-user-usage-to-model-limits.js +21 -21
- package/useShareLink/useShareLink.js +18 -18
- package/utils.js +21 -21
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ShareLinkResponseDtoAccessEnum as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
3
3
|
import { ShareLinkAccess as a } from "@epam/ai-dial-share";
|
|
4
4
|
//#region src/useShareLink/useShareLink.ts
|
|
5
|
-
var o = (
|
|
5
|
+
var o = (t) => t.map((t) => t === e.Edit ? a.Edit : a.View), s = (e, t) => {
|
|
6
6
|
let n = new URL(e, t);
|
|
7
7
|
return `${t}${n.pathname}${n.search}${n.hash}`;
|
|
8
|
-
}, c = (
|
|
9
|
-
let [u, d] =
|
|
10
|
-
let
|
|
8
|
+
}, c = (e, c, l = window.location.origin) => {
|
|
9
|
+
let [u, d] = i(), [f, p] = i(!0), [m, h] = i(null), g = r(0), _ = t(async (t = [a.View]) => {
|
|
10
|
+
let n = ++g.current;
|
|
11
11
|
p(!0), h(null);
|
|
12
12
|
try {
|
|
13
|
-
let
|
|
13
|
+
let r = await e.createShareLink({ createShareLinkDto: {
|
|
14
14
|
itemId: c,
|
|
15
|
-
access:
|
|
15
|
+
access: t
|
|
16
16
|
} });
|
|
17
|
-
g.current ===
|
|
18
|
-
url: s(
|
|
19
|
-
expiresInDays:
|
|
20
|
-
expiresInHours:
|
|
21
|
-
access: o(
|
|
17
|
+
g.current === n && d({
|
|
18
|
+
url: s(r.url, l),
|
|
19
|
+
expiresInDays: r.expiresInDays,
|
|
20
|
+
expiresInHours: r.expiresInHours,
|
|
21
|
+
access: o(r.access)
|
|
22
22
|
});
|
|
23
23
|
} catch (e) {
|
|
24
|
-
g.current ===
|
|
24
|
+
g.current === n && h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create share link"));
|
|
25
25
|
} finally {
|
|
26
|
-
g.current ===
|
|
26
|
+
g.current === n && p(!1);
|
|
27
27
|
}
|
|
28
28
|
}, [
|
|
29
29
|
c,
|
|
30
30
|
l,
|
|
31
|
-
|
|
31
|
+
e
|
|
32
32
|
]);
|
|
33
|
-
return
|
|
33
|
+
return n(() => {
|
|
34
34
|
d(void 0), _();
|
|
35
35
|
}, [c, _]), {
|
|
36
36
|
data: u,
|
|
37
37
|
isLoading: f,
|
|
38
38
|
error: m,
|
|
39
|
-
setAccess:
|
|
39
|
+
setAccess: t((e) => {
|
|
40
40
|
_(e);
|
|
41
41
|
}, [_])
|
|
42
42
|
};
|
package/utils.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createCsrfMiddleware as
|
|
3
|
-
import { createUnauthorizedMiddleware as
|
|
4
|
-
import { includesIgnoreCase as
|
|
5
|
-
import { appendLocaleCode as
|
|
6
|
-
import { formatCalendarDate as
|
|
7
|
-
import { PromptSource as
|
|
8
|
-
import { getRunnerSchemas as
|
|
9
|
-
import { buildExternalServiceScopeId as
|
|
10
|
-
import { buildPromptExportEnvelope as
|
|
11
|
-
import { PROMPT_CONTENT_MAX_LENGTH as
|
|
12
|
-
import { usePromptsState as
|
|
13
|
-
import { apSchedulerDayToJsDay as
|
|
14
|
-
import { getBrowserTimezone as
|
|
15
|
-
import { isValidAbsoluteUrl as
|
|
16
|
-
import { EXTERNAL_SERVICE_SIGNIN_METHOD as
|
|
17
|
-
import { ColorScheme as
|
|
18
|
-
import { useUsageData as
|
|
19
|
-
import { triggerBrowserDownload as
|
|
20
|
-
import { usePersistedState as
|
|
21
|
-
export {
|
|
1
|
+
import { getAcceptInvitationErrorItemName as e, getApiErrorDetails as t, getApiErrorMessage as n, getApiErrorStatus as r, isConversationNotFoundError as i } from "./api-error/api-error.js";
|
|
2
|
+
import { createCsrfMiddleware as a } from "./api-transport/create-csrf-middleware.js";
|
|
3
|
+
import { createUnauthorizedMiddleware as o } from "./api-transport/create-unauthorized-middleware.js";
|
|
4
|
+
import { includesIgnoreCase as s, safeDecodeURI as c, safeDecodeURIComponent as l, stripSurroundingSlashes as u, stripTrailingSlashes as d } from "./shared/string-utils.js";
|
|
5
|
+
import { appendLocaleCode as f, buildAdditionalLocaleOptions as p, composeLocalePayload as m, decomposeLocalizedFields as h, resolveLocalizedText as g, toBaseLocale as _ } from "./shared/locale.js";
|
|
6
|
+
import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.js";
|
|
7
|
+
import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
|
|
8
|
+
import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
|
|
9
|
+
import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
|
|
10
|
+
import { buildPromptExportEnvelope as O, buildPromptExportFileName as k, serializePromptExport as A } from "./prompt/export-prompt.js";
|
|
11
|
+
import { PROMPT_CONTENT_MAX_LENGTH as j, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as M, PROMPT_DESCRIPTION_MAX_LENGTH as N, PROMPT_FIELD_VALIDATORS as P, PROMPT_NAME_MAX_LENGTH as F, PromptFieldError as I, buildPromptPath as L, getRemainingCharacters as R, validatePromptContent as z, validatePromptDescription as B, validatePromptName as V } from "./prompt/prompt.js";
|
|
12
|
+
import { usePromptsState as H } from "./prompt/usePromptsState/usePromptsState.js";
|
|
13
|
+
import { apSchedulerDayToJsDay as U, jsDayToApSchedulerDay as W } from "./shared/cron-weekday.js";
|
|
14
|
+
import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
|
|
15
|
+
import { isValidAbsoluteUrl as K, isValidFeaturesData as q, parseFeaturesData as J } from "./shared/custom-apps.js";
|
|
16
|
+
import { EXTERNAL_SERVICE_SIGNIN_METHOD as Y, PendingSigninEventKind as X, TOOLSET_SIGNIN_METHOD as Z } from "./shared/client-channel.js";
|
|
17
|
+
import { ColorScheme as Q, applyThemeColors as $, getOsPreferredTheme as ee } from "./shared/theme-colors.js";
|
|
18
|
+
import { useUsageData as te } from "./usage/useUsageData/useUsageData.js";
|
|
19
|
+
import { triggerBrowserDownload as ne } from "./files/browser-download.js";
|
|
20
|
+
import { usePersistedState as re } from "./shared/usePersistedState/usePersistedState.js";
|
|
21
|
+
export { Q as ColorScheme, Y as EXTERNAL_SERVICE_SIGNIN_METHOD, j as PROMPT_CONTENT_MAX_LENGTH, M as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, N as PROMPT_DESCRIPTION_MAX_LENGTH, P as PROMPT_FIELD_VALIDATORS, F as PROMPT_NAME_MAX_LENGTH, X as PendingSigninEventKind, I as PromptFieldError, b as PromptSource, Z as TOOLSET_SIGNIN_METHOD, U as apSchedulerDayToJsDay, f as appendLocaleCode, $ as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, O as buildPromptExportEnvelope, k as buildPromptExportFileName, L as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, E as getExternalServiceFallbackName, ee as getOsPreferredTheme, R as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, K as isValidAbsoluteUrl, q as isValidFeaturesData, W as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, J as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, A as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, ne as triggerBrowserDownload, re as usePersistedState, H as usePromptsState, te as useUsageData, z as validatePromptContent, B as validatePromptDescription, V as validatePromptName };
|