@epam/ai-dial-chat-hooks 1.3.0-dev.304 → 1.3.0-dev.309

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/catalog/use-publish-history.d.ts +19 -0
  2. package/catalog/use-publish-history.d.ts.map +1 -0
  3. package/catalog/use-publish-history.js +25 -0
  4. package/catalog.js +19 -18
  5. package/conversation/conversation-data-source.d.ts +47 -0
  6. package/conversation/conversation-data-source.d.ts.map +1 -0
  7. package/conversation/conversation-data-source.js +11 -0
  8. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
  9. package/conversation/useConversationExport/useConversationExport.js +76 -84
  10. package/conversation.js +33 -32
  11. package/entry-points/catalog.d.ts +1 -0
  12. package/entry-points/catalog.d.ts.map +1 -1
  13. package/entry-points/conversation.d.ts +1 -0
  14. package/entry-points/conversation.d.ts.map +1 -1
  15. package/entry-points/project.d.ts +5 -0
  16. package/entry-points/project.d.ts.map +1 -1
  17. package/entry-points/scheduled-tasks.d.ts +2 -0
  18. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  19. package/index.d.ts +9 -0
  20. package/index.d.ts.map +1 -1
  21. package/index.js +191 -182
  22. package/package.json +18 -18
  23. package/project/create-project-chat.d.ts +34 -0
  24. package/project/create-project-chat.d.ts.map +1 -0
  25. package/project/create-project-chat.js +27 -0
  26. package/project/project-conversation-data-source.d.ts +36 -0
  27. package/project/project-conversation-data-source.d.ts.map +1 -0
  28. package/project/project-conversation-data-source.js +67 -0
  29. package/project/project-file-preview.d.ts +28 -0
  30. package/project/project-file-preview.d.ts.map +1 -0
  31. package/project/project-file-preview.js +20 -0
  32. package/project/use-project-draft.d.ts +46 -0
  33. package/project/use-project-draft.d.ts.map +1 -0
  34. package/project/use-project-draft.js +54 -0
  35. package/project/use-project-file-preview.d.ts +42 -0
  36. package/project/use-project-file-preview.d.ts.map +1 -0
  37. package/project/use-project-file-preview.js +46 -0
  38. package/project.js +15 -10
  39. package/scheduled-task/scheduled-task-display.d.ts +108 -0
  40. package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
  41. package/scheduled-task/scheduled-task-display.js +70 -0
  42. package/scheduled-task/useStartScheduledTask.d.ts +41 -0
  43. package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
  44. package/scheduled-task/useStartScheduledTask.js +169 -0
  45. package/scheduled-tasks.js +13 -11
  46. package/shared/sleep.d.ts +3 -0
  47. package/shared/sleep.d.ts.map +1 -0
  48. package/shared/sleep.js +13 -0
@@ -0,0 +1,19 @@
1
+ import { PublishHistoryEntry } from '@epam/ai-dial-publish-panel';
2
+ /** Host inputs of {@link usePublishHistory}. */
3
+ export interface UsePublishHistoryOptions {
4
+ /** Whether the publish panel is open; the history is read each time it opens. */
5
+ isOpen: boolean;
6
+ /** Id of the entity being published; a change reads its history again. */
7
+ entityId: string;
8
+ /** Reads the entity's publication history, already mapped to the panel's entries; the host owns the request. */
9
+ loadHistory: (entityId: string) => Promise<PublishHistoryEntry[]>;
10
+ }
11
+ /**
12
+ * Returns the publication history of an entity for a publish panel, read again
13
+ * on every open so a publication requested since the last one already blocks its
14
+ * folder. A failed read leaves the history empty (the backend still refuses a
15
+ * duplicate publication), a read that finishes after the panel closed or the
16
+ * entity changed is ignored, and another entity's history is never returned.
17
+ */
18
+ export declare const usePublishHistory: ({ isOpen, entityId, loadHistory, }: UsePublishHistoryOptions) => PublishHistoryEntry[];
19
+ //# sourceMappingURL=use-publish-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-publish-history.d.ts","sourceRoot":"","sources":["../../src/catalog/use-publish-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAKvE,gDAAgD;AAChD,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,MAAM,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,gHAAgH;IAChH,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;CACnE;AASD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,oCAI/B,wBAAwB,KAAG,mBAAmB,EA2BhD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ //#region src/catalog/use-publish-history.ts
3
+ var r = [], i = ({ isOpen: i, entityId: a, loadHistory: o }) => {
4
+ let [s, c] = n(), l = t(o);
5
+ return e(() => {
6
+ l.current = o;
7
+ }, [o]), e(() => {
8
+ if (!i) return;
9
+ let e = !1;
10
+ return (async () => {
11
+ let t = r;
12
+ try {
13
+ t = await l.current(a);
14
+ } catch {}
15
+ e || c({
16
+ entityId: a,
17
+ entries: t
18
+ });
19
+ })(), () => {
20
+ e = !0;
21
+ };
22
+ }, [i, a]), s?.entityId === a ? s.entries : r;
23
+ };
24
+ //#endregion
25
+ export { i as usePublishHistory };
package/catalog.js CHANGED
@@ -11,21 +11,22 @@ import { PUBLIC_SKILL_BUCKET as E, SKILL_LISTING_MAX_PAGES as D, SKILL_LISTING_P
11
11
  import { buildSkillContentTree as M, buildSkillOverview as N, mapSkillToCatalogItem as P, readSkillFileBytes as F, readSkillFilePreviewBytes as I, readSkillManifest as L, resolveSkillFileDownloadPath as R, resolveSkillManifestFileId as z } from "./catalog/map-skill-to-catalog-item.js";
12
12
  import { McpResourceKind as B, buildApplicationMcpUrl as V, buildConnectApi as H, buildToolsetMcpUrl as U, resolveMcpResourceKind as W } from "./catalog/mcp-endpoint-url.js";
13
13
  import { getPublicCatalogEntityFolderPath as G, isPublicCatalogEntityId as K, mapPublishConversationResultDto as q, mapPublishHistoryEntryDto as J, toPublishEntityType as Y } from "./catalog/publish.js";
14
- import { canEditShareAccess as X, deriveAvailableTabIds as Z, deriveFavoriteItems as Q, filterCatalogItemsBySelector as $, filterHiddenOwnedItems as ee, reconcileFilterTopics as te } from "./catalog/catalog-derivations.js";
15
- import { CatalogEntityKind as ne, findSchemaDisplayName as re, resolveCatalogEntityKind as ie } from "./catalog/catalog-entity-kind.js";
16
- import { FavoriteEntityType as ae, useFavoriteEntitiesState as oe } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
17
- import { resolveFavoriteEntityType as se } from "./catalog/favorite-entity-type.js";
18
- import { parseCatalogFilterTopics as ce, resolveCatalogActiveTab as le, resolveCatalogSortKey as ue } from "./catalog/catalog-preferences.js";
19
- import { findWorstCappedRow as de } from "./catalog/usage-limit-rows.js";
20
- import { CatalogPrimaryActionType as fe, resolveCatalogPrimaryAction as pe } from "./catalog/catalog-primary-action.js";
21
- import { useCatalogItemDelete as me } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
22
- import { useCatalogEditNavigation as he } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
23
- import { useSkillItemDetails as ge } from "./catalog/useSkillItemDetails.js";
24
- import { useCatalogItemDetails as _e } from "./catalog/useCatalogItemDetails.js";
25
- import { useCatalogToolsetCredentials as ve } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
26
- import { buildApplicationCredentialLoginParams as ye, mapApplicationCredentials as be } from "./catalog/application-credentials.js";
27
- import { useApplicationCredentials as xe } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
28
- import { useSkillDetailsPanelData as Se } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
29
- import { hasPublishFolderWriteAccess as Ce, rememberPublishFolderKey as we, usePublishFolders as Te } from "./catalog/usePublishFolders/usePublishFolders.js";
30
- import { SkillPreviewErrorKind as Ee, useSkillFilePreview as De } from "./skill/useSkillFilePreview.js";
31
- export { u as AuthenticationType, ne as CatalogEntityKind, fe as CatalogPrimaryActionType, m as DEFAULT_ENTITY_DETAILS_LABELS, ae as FavoriteEntityType, B as McpResourceKind, E as PUBLIC_SKILL_BUCKET, D as SKILL_LISTING_MAX_PAGES, O as SKILL_LISTING_PAGE_SIZE, k as SKILL_MANIFEST_MAX_BYTES, Ee as SkillPreviewErrorKind, A as SkillSource, ye as buildApplicationCredentialLoginParams, V as buildApplicationMcpUrl, n as buildChatCompletionsUrl, H as buildConnectApi, r as buildDeploymentConnectApi, C as buildPromptOverview, d as buildResetFields, i as buildResponsesUrl, M as buildSkillContentTree, N as buildSkillOverview, U as buildToolsetMcpUrl, X as canEditShareAccess, a as createDeploymentLookup, e as createPublishApiClient, o as decodeDeploymentId, Z as deriveAvailableTabIds, Q as deriveFavoriteItems, s as encodeDeploymentId, $ as filterCatalogItemsBySelector, ee as filterHiddenOwnedItems, c as findDeploymentByIdOrReference, re as findSchemaDisplayName, de as findWorstCappedRow, G as getPublicCatalogEntityFolderPath, Ce as hasPublishFolderWriteAccess, w as isOrganisationPromptItem, K as isPublicCatalogEntityId, be as mapApplicationCredentials, h as mapDeploymentDetailsDtoToEntityDetails, p as mapDeploymentLimitsDtoToCatalogLimits, f as mapDeploymentLimitsToInput, v as mapDeploymentToCatalogItem, y as mapDeploymentToolsetCredentials, g as mapEntityDetailsToCatalogDetails, T as mapPromptToCatalogItem, q as mapPublishConversationResultDto, J as mapPublishHistoryEntryDto, P as mapSkillToCatalogItem, _ as mapToolsetCredentials, b as mapToolsetToCatalogItem, l as normalizeDeploymentId, ce as parseCatalogFilterTopics, j as parseSkillResourceUrl, F as readSkillFileBytes, I as readSkillFilePreviewBytes, L as readSkillManifest, te as reconcileFilterTopics, we as rememberPublishFolderKey, le as resolveCatalogActiveTab, ie as resolveCatalogEntityKind, pe as resolveCatalogPrimaryAction, ue as resolveCatalogSortKey, x as resolveDeploymentFolder, se as resolveFavoriteEntityType, W as resolveMcpResourceKind, R as resolveSkillFileDownloadPath, z as resolveSkillManifestFileId, S as supportsChatInterface, Y as toPublishEntityType, t as toPublishRuleDto, xe as useApplicationCredentials, he as useCatalogEditNavigation, me as useCatalogItemDelete, _e as useCatalogItemDetails, ve as useCatalogToolsetCredentials, oe as useFavoriteEntitiesState, Te as usePublishFolders, Se as useSkillDetailsPanelData, De as useSkillFilePreview, ge as useSkillItemDetails };
14
+ import { usePublishHistory as X } from "./catalog/use-publish-history.js";
15
+ import { canEditShareAccess as Z, deriveAvailableTabIds as Q, deriveFavoriteItems as $, filterCatalogItemsBySelector as ee, filterHiddenOwnedItems as te, reconcileFilterTopics as ne } from "./catalog/catalog-derivations.js";
16
+ import { CatalogEntityKind as re, findSchemaDisplayName as ie, resolveCatalogEntityKind as ae } from "./catalog/catalog-entity-kind.js";
17
+ import { FavoriteEntityType as oe, useFavoriteEntitiesState as se } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
18
+ import { resolveFavoriteEntityType as ce } from "./catalog/favorite-entity-type.js";
19
+ import { parseCatalogFilterTopics as le, resolveCatalogActiveTab as ue, resolveCatalogSortKey as de } from "./catalog/catalog-preferences.js";
20
+ import { findWorstCappedRow as fe } from "./catalog/usage-limit-rows.js";
21
+ import { CatalogPrimaryActionType as pe, resolveCatalogPrimaryAction as me } from "./catalog/catalog-primary-action.js";
22
+ import { useCatalogItemDelete as he } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
23
+ import { useCatalogEditNavigation as ge } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
24
+ import { useSkillItemDetails as _e } from "./catalog/useSkillItemDetails.js";
25
+ import { useCatalogItemDetails as ve } from "./catalog/useCatalogItemDetails.js";
26
+ import { useCatalogToolsetCredentials as ye } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
27
+ import { buildApplicationCredentialLoginParams as be, mapApplicationCredentials as xe } from "./catalog/application-credentials.js";
28
+ import { useApplicationCredentials as Se } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
29
+ import { useSkillDetailsPanelData as Ce } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
30
+ import { hasPublishFolderWriteAccess as we, rememberPublishFolderKey as Te, usePublishFolders as Ee } from "./catalog/usePublishFolders/usePublishFolders.js";
31
+ import { SkillPreviewErrorKind as De, useSkillFilePreview as Oe } from "./skill/useSkillFilePreview.js";
32
+ export { u as AuthenticationType, re as CatalogEntityKind, pe as CatalogPrimaryActionType, m as DEFAULT_ENTITY_DETAILS_LABELS, oe as FavoriteEntityType, B as McpResourceKind, E as PUBLIC_SKILL_BUCKET, D as SKILL_LISTING_MAX_PAGES, O as SKILL_LISTING_PAGE_SIZE, k as SKILL_MANIFEST_MAX_BYTES, De as SkillPreviewErrorKind, A as SkillSource, be as buildApplicationCredentialLoginParams, V as buildApplicationMcpUrl, n as buildChatCompletionsUrl, H as buildConnectApi, r as buildDeploymentConnectApi, C as buildPromptOverview, d as buildResetFields, i as buildResponsesUrl, M as buildSkillContentTree, N as buildSkillOverview, U as buildToolsetMcpUrl, Z as canEditShareAccess, a as createDeploymentLookup, e as createPublishApiClient, o as decodeDeploymentId, Q as deriveAvailableTabIds, $ as deriveFavoriteItems, s as encodeDeploymentId, ee as filterCatalogItemsBySelector, te as filterHiddenOwnedItems, c as findDeploymentByIdOrReference, ie as findSchemaDisplayName, fe as findWorstCappedRow, G as getPublicCatalogEntityFolderPath, we as hasPublishFolderWriteAccess, w as isOrganisationPromptItem, K as isPublicCatalogEntityId, xe as mapApplicationCredentials, h as mapDeploymentDetailsDtoToEntityDetails, p as mapDeploymentLimitsDtoToCatalogLimits, f as mapDeploymentLimitsToInput, v as mapDeploymentToCatalogItem, y as mapDeploymentToolsetCredentials, g as mapEntityDetailsToCatalogDetails, T as mapPromptToCatalogItem, q as mapPublishConversationResultDto, J as mapPublishHistoryEntryDto, P as mapSkillToCatalogItem, _ as mapToolsetCredentials, b as mapToolsetToCatalogItem, l as normalizeDeploymentId, le as parseCatalogFilterTopics, j as parseSkillResourceUrl, F as readSkillFileBytes, I as readSkillFilePreviewBytes, L as readSkillManifest, ne as reconcileFilterTopics, Te as rememberPublishFolderKey, ue as resolveCatalogActiveTab, ae as resolveCatalogEntityKind, me as resolveCatalogPrimaryAction, de as resolveCatalogSortKey, x as resolveDeploymentFolder, ce as resolveFavoriteEntityType, W as resolveMcpResourceKind, R as resolveSkillFileDownloadPath, z as resolveSkillManifestFileId, S as supportsChatInterface, Y as toPublishEntityType, t as toPublishRuleDto, Se as useApplicationCredentials, ge as useCatalogEditNavigation, he as useCatalogItemDelete, ve as useCatalogItemDetails, ye as useCatalogToolsetCredentials, se as useFavoriteEntitiesState, Ee as usePublishFolders, X as usePublishHistory, Ce as useSkillDetailsPanelData, Oe as useSkillFilePreview, _e as useSkillItemDetails };
@@ -0,0 +1,47 @@
1
+ import { ConversationResponseDto, ConversationsApi } from '@epam/ai-dial-chat-api-client';
2
+ import { ConversationStreamTransport } from './useConversationStream/useConversationStream';
3
+ /** The sidebar list side effects of a conversation page; a conversation outside the sidebar has none. */
4
+ export interface ConversationListSync {
5
+ /** Shows a new title on the conversation's row. */
6
+ updateTitle: (id: string, title: string) => void;
7
+ /** Moves the conversation's row up after activity. */
8
+ bumpActivity: (id: string) => void;
9
+ /** Shows the unread indicator until the conversation is viewed. */
10
+ markUnread: (id: string) => void;
11
+ /** Records that the conversation was seen and clears its unread indicator. */
12
+ markViewed: (id: string) => Promise<void>;
13
+ /** Removes the conversation's row. */
14
+ remove: (id: string) => void;
15
+ /** Re-reads the list, optionally waiting until the given ids appear in it. */
16
+ refresh: (expectedIds?: readonly string[]) => Promise<void>;
17
+ /** The open chat is marked viewed without a sidebar row saying it is unread; a project chat has no row. */
18
+ shouldMarkOpenChatViewed?: boolean;
19
+ }
20
+ /** Where a conversation page reads and writes its conversation, and where it navigates. */
21
+ export interface ConversationDataSource {
22
+ /** Stream, stop, attach, get and save for `useConversationStream`. */
23
+ transport: ConversationStreamTransport;
24
+ /** Loads a conversation by its id (also the custom-viewer reload). */
25
+ getConversation: (id: string, signal?: AbortSignal) => Promise<ConversationResponseDto>;
26
+ /** Saves a conversation by its stream path (model changes, status messages). */
27
+ saveConversation: (path: string, conversation: ConversationResponseDto) => Promise<ConversationResponseDto>;
28
+ /** Save and delete for `useConversationHandlers`. */
29
+ handlersApi: Pick<ConversationsApi, 'saveConversation' | 'deleteConversation'>;
30
+ /** Watches for the title the first reply produces; returns a cleanup. */
31
+ watchTitle: (id: string, previousName: string, onUpdated: (title: string) => void) => () => void;
32
+ /** The route of a conversation (after duplicate or a custom-viewer create). */
33
+ getConversationRoute: (id: string) => string;
34
+ /** Where a deleted or missing conversation navigates. */
35
+ getExitRoute: () => string;
36
+ /** Whether the conversation opens read-only. */
37
+ isReadOnly: (id: string) => boolean;
38
+ /** Sidebar list side effects; {@link NO_CONVERSATION_LIST_SYNC} when the conversation is not in the sidebar. */
39
+ listSync: ConversationListSync;
40
+ /** Whether a read-only conversation offers Duplicate. */
41
+ canDuplicate: boolean;
42
+ /** Translation key of the toast shown when the conversation cannot be loaded; the page's own when unset. The host resolves it. */
43
+ notFoundMessageKey?: string;
44
+ }
45
+ /** List side effects of a conversation that is not in the sidebar: each one does nothing. */
46
+ export declare const NO_CONVERSATION_LIST_SYNC: ConversationListSync;
47
+ //# sourceMappingURL=conversation-data-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-data-source.d.ts","sourceRoot":"","sources":["../../src/conversation/conversation-data-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAEjG,yGAAyG;AACzG,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,sDAAsD;IACtD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mEAAmE;IACnE,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,8EAA8E;IAC9E,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,sCAAsC;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,8EAA8E;IAC9E,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,2GAA2G;IAC3G,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,2FAA2F;AAC3F,MAAM,WAAW,sBAAsB;IACrC,sEAAsE;IACtE,SAAS,EAAE,2BAA2B,CAAC;IACvC,sEAAsE;IACtE,eAAe,EAAE,CACf,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,gFAAgF;IAChF,gBAAgB,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,uBAAuB,KAClC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,qDAAqD;IACrD,WAAW,EAAE,IAAI,CACf,gBAAgB,EAChB,kBAAkB,GAAG,oBAAoB,CAC1C,CAAC;IACF,yEAAyE;IACzE,UAAU,EAAE,CACV,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAC/B,MAAM,IAAI,CAAC;IAChB,+EAA+E;IAC/E,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,yDAAyD;IACzD,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,gDAAgD;IAChD,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,gHAAgH;IAChH,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,yDAAyD;IACzD,YAAY,EAAE,OAAO,CAAC;IACtB,kIAAkI;IAClI,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB,EAAE,oBAOvC,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/conversation/conversation-data-source.ts
2
+ var e = {
3
+ updateTitle: () => void 0,
4
+ bumpActivity: () => void 0,
5
+ markUnread: () => void 0,
6
+ markViewed: async () => void 0,
7
+ remove: () => void 0,
8
+ refresh: async () => void 0
9
+ };
10
+ //#endregion
11
+ export { e as NO_CONVERSATION_LIST_SYNC };
@@ -1 +1 @@
1
- {"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;AAqBnC,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EAEtC,MAAM,gCAAgC,CAAC;AASxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AA2E3D,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsBD,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,gBAAgB,EAAE,IAAI,CACpB,gBAAgB,EAChB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;IACF,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC5C,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,yBAAyB,CAAC;IACtE,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,+BAA+B;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,4FAA4F;IAC5F,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,YAAY,EAAE,CACZ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,sBAAsB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sFAAsF;IACtF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0FAA0F;IAC1F,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,wJAUnC,2BAA2B,KAAG,2BAuchC,CAAC"}
1
+ {"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;AAsBnC,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EAEtC,MAAM,gCAAgC,CAAC;AASxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAyD3D,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsBD,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,gBAAgB,EAAE,IAAI,CACpB,gBAAgB,EAChB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;IACF,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC5C,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,yBAAyB,CAAC;IACtE,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,+BAA+B;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,4FAA4F;IAC5F,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,YAAY,EAAE,CACZ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,sBAAsB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sFAAsF;IACtF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0FAA0F;IAC1F,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,wJAUnC,2BAA2B,KAAG,2BAuchC,CAAC"}
@@ -2,45 +2,37 @@ import { collectAttachmentRefs as e } from "../conversation-transfer/attachment-
2
2
  import { ConversationExportMode as t, ConversationTransferWarningCode as n, ExportFileNameKind as r } from "../conversation-transfer/types.js";
3
3
  import { EXPORT_APP_NAME as i, buildExportEnvelope as a, buildExportFileName as o, serializeExportEnvelope as s, stripConversationAttachments as c } from "../conversation-transfer/export-conversation.js";
4
4
  import { resolveDialFileBucketAndPath as l } from "../conversation-transfer/dial-file-resolve.js";
5
- import { runWithConcurrency as u } from "../conversation-transfer/async.js";
6
- import { ConversationTransferKind as d, ConversationTransferPhase as f, buildTransferProgress as p } from "../conversation-transfer/progress.js";
7
- import { useConversationTransferQueue as m } from "../conversation-transfer/queue.js";
8
- import { buildDialArchive as h } from "../conversation-transfer/zip-export.js";
9
- import { ResponseError as g } from "@epam/ai-dial-chat-api-client";
10
- import { ConversationTransferErrorCode as _, ConversationTransferSubjectKind as v, ConversationTransferUnitKind as y, triggerBlobDownload as b } from "@epam/ai-dial-chat-shared";
11
- import { useCallback as x } from "react";
5
+ import { sleep as u } from "../../shared/sleep.js";
6
+ import { runWithConcurrency as d } from "../conversation-transfer/async.js";
7
+ import { ConversationTransferKind as f, ConversationTransferPhase as p, buildTransferProgress as m } from "../conversation-transfer/progress.js";
8
+ import { useConversationTransferQueue as h } from "../conversation-transfer/queue.js";
9
+ import { buildDialArchive as g } from "../conversation-transfer/zip-export.js";
10
+ import { ResponseError as _ } from "@epam/ai-dial-chat-api-client";
11
+ import { ConversationTransferErrorCode as v, ConversationTransferSubjectKind as y, ConversationTransferUnitKind as b, triggerBlobDownload as x } from "@epam/ai-dial-chat-shared";
12
+ import { useCallback as S } from "react";
12
13
  //#region src/conversation/useConversationExport/useConversationExport.ts
13
- var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g && e.response.status === w, O = (e, t) => {
14
+ var C = 5, w = 536870912, T = 429, E = 5, D = 2e3, O = (e) => e instanceof _ && e.response.status === T, k = (e, t) => {
14
15
  let n = Number(e.response.headers.get("Retry-After"));
15
- return Number.isFinite(n) && n > 0 ? n * 1e3 : E * t;
16
- }, k = (e, t) => new Promise((n) => {
17
- if (t.aborted) {
18
- n();
19
- return;
20
- }
21
- let r = setTimeout(n, e);
22
- t.addEventListener("abort", () => {
23
- clearTimeout(r), n();
24
- }, { once: !0 });
25
- }), A = async (e, t, n) => {
16
+ return Number.isFinite(n) && n > 0 ? n * 1e3 : D * t;
17
+ }, A = async (e, t, n) => {
26
18
  for (let r = 1;; r += 1) try {
27
19
  return await e.getConversation({ path: t }, { signal: n });
28
20
  } catch (e) {
29
- if (n.aborted || !D(e) || r >= T) throw e;
30
- await k(O(e, r), n);
21
+ if (n.aborted || !O(e) || r >= E) throw e;
22
+ await u(k(e, r), n);
31
23
  }
32
- }, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (e) => e === t.WithoutAttachments ? d.ExportSingle : d.ExportSingleWithAttachments, P = ({ conversationsApi: g, filesApi: w, normalizeConversationPath: T, classifyTransferError: E = () => ({}), resolveErrorTraceId: D = async () => void 0, maxArchiveBytes: O = C, onSuccess: k, onWarning: P, onError: F }) => {
33
- let I = m(), L = x(async (e, t, n) => {
24
+ }, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (e) => e === t.WithoutAttachments ? f.ExportSingle : f.ExportSingleWithAttachments, P = ({ conversationsApi: u, filesApi: _, normalizeConversationPath: T, classifyTransferError: E = () => ({}), resolveErrorTraceId: D = async () => void 0, maxArchiveBytes: O = w, onSuccess: k, onWarning: P, onError: F }) => {
25
+ let I = h(), L = S(async (e, t, n) => {
34
26
  let r = !1, i = !1, a = 0, o = () => {
35
27
  a += 1, n(a, e.length);
36
28
  };
37
29
  return {
38
- entries: await u(e, S, async (e) => {
30
+ entries: await d(e, C, async (e) => {
39
31
  if (t.aborted || i) return;
40
32
  let n = l(e.fileId);
41
33
  if (!n) r = !0, o();
42
34
  else try {
43
- let e = await w.downloadFileRaw({
35
+ let e = await _.downloadFileRaw({
44
36
  bucket: n.bucket,
45
37
  path: n.path
46
38
  }, { signal: t }), r = new Uint8Array(await e.raw.arrayBuffer());
@@ -61,88 +53,88 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
61
53
  anySkipped: !t.aborted && !i && r,
62
54
  isUnauthorized: !t.aborted && i
63
55
  };
64
- }, [E, w]), R = x(async (r, i, o, l, u, d) => {
65
- let m = N(l), v;
56
+ }, [E, _]), R = S(async (r, i, o, l, d, f) => {
57
+ let h = N(l), _;
66
58
  try {
67
- v = await A(g, T(i), d);
59
+ _ = await A(u, T(i), f);
68
60
  } catch (e) {
69
- if (d.aborted) return;
61
+ if (f.aborted) return;
70
62
  if (E(e).isUnauthorized) F?.({
71
63
  jobId: r,
72
- code: _.Unauthorized
73
- }), I.failJob(r, _.Unauthorized);
64
+ code: v.Unauthorized
65
+ }), I.failJob(r, v.Unauthorized);
74
66
  else {
75
67
  let t = await D(e);
76
68
  F?.({
77
69
  jobId: r,
78
- code: _.Unknown,
70
+ code: v.Unknown,
79
71
  titles: [o],
80
72
  traceId: t
81
- }), I.failJob(r, _.Unknown);
73
+ }), I.failJob(r, v.Unknown);
82
74
  }
83
75
  console.error("Failed to fetch conversation for export", e);
84
76
  return;
85
77
  }
86
- if (!d.aborted) {
87
- I.setJobProgress(r, p({
88
- kind: m,
89
- phase: f.Prepare
78
+ if (!f.aborted) {
79
+ I.setJobProgress(r, m({
80
+ kind: h,
81
+ phase: p.Prepare
90
82
  }));
91
83
  try {
92
84
  if (l === t.WithoutAttachments) {
93
- let e = a([c(v)], []), t = s(e);
94
- b(t, u), k?.({
85
+ let e = a([c(_)], []), t = s(e);
86
+ x(t, d), k?.({
95
87
  jobId: r,
96
88
  titles: [o]
97
89
  }), I.succeedJob(r);
98
90
  return;
99
91
  }
100
- let i = e(v), { entries: g, anySkipped: x, isUnauthorized: S } = await L(i, d, (e, t) => {
101
- I.setJobProgress(r, p({
102
- kind: m,
103
- phase: f.Transfer,
92
+ let i = e(_), { entries: u, anySkipped: y, isUnauthorized: S } = await L(i, f, (e, t) => {
93
+ I.setJobProgress(r, m({
94
+ kind: h,
95
+ phase: p.Transfer,
104
96
  completed: e,
105
97
  total: t
106
98
  }, {
107
99
  completed: e,
108
100
  total: t,
109
- kind: y.Attachment
101
+ kind: b.Attachment
110
102
  }));
111
103
  });
112
- if (d.aborted) return;
104
+ if (f.aborted) return;
113
105
  if (S) {
114
106
  F?.({
115
107
  jobId: r,
116
- code: _.Unauthorized
117
- }), I.failJob(r, _.Unauthorized);
108
+ code: v.Unauthorized
109
+ }), I.failJob(r, v.Unauthorized);
118
110
  return;
119
111
  }
120
- I.setJobProgress(r, p({
121
- kind: m,
122
- phase: f.Transfer,
112
+ I.setJobProgress(r, m({
113
+ kind: h,
114
+ phase: p.Transfer,
123
115
  completed: i.length,
124
116
  total: i.length
125
117
  }));
126
- let C = g.reduce((e, t) => e + t.data.byteLength, 0);
118
+ let C = u.reduce((e, t) => e + t.data.byteLength, 0);
127
119
  if (C > O) {
128
120
  F?.({
129
121
  jobId: r,
130
- code: _.FileTooLarge,
122
+ code: v.FileTooLarge,
131
123
  titles: [o]
132
- }), I.failJob(r, _.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
124
+ }), I.failJob(r, v.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
133
125
  return;
134
126
  }
135
- let w = a([v], []), { blob: T, skippedPaths: E } = h(w, g), D = x || E.length > 0;
127
+ let w = a([_], []), { blob: T, skippedPaths: E } = g(w, u), D = y || E.length > 0;
136
128
  D && P?.({
137
129
  jobId: r,
138
130
  code: n.AttachmentSkipped
139
- }), b(T, u), k?.({
131
+ }), x(T, d), k?.({
140
132
  jobId: r,
141
133
  titles: [o]
142
134
  }), D ? I.warnJob(r, n.AttachmentSkipped) : I.succeedJob(r);
143
135
  } catch (e) {
144
- if (d.aborted) return;
145
- let t = M(e) ? _.FileTooLarge : _.Unknown, n = await D(e);
136
+ if (f.aborted) return;
137
+ let t = M(e) ? v.FileTooLarge : v.Unknown, n = await D(e);
146
138
  F?.({
147
139
  jobId: r,
148
140
  code: t,
@@ -153,7 +145,7 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
153
145
  }
154
146
  }, [
155
147
  E,
156
- g,
148
+ u,
157
149
  L,
158
150
  O,
159
151
  T,
@@ -162,32 +154,32 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
162
154
  P,
163
155
  I,
164
156
  D
165
- ]), z = x((e, n, a) => {
157
+ ]), z = S((e, n, a) => {
166
158
  let s = o(a === t.WithoutAttachments ? r.SingleConversation : r.SingleConversationWithAttachments, i), c = I.addJob({
167
- kind: v.Single,
159
+ kind: y.Single,
168
160
  title: n
169
161
  }, s);
170
162
  return I.startJob(c, (t) => R(c, e, n, a, s, t));
171
- }, [I, R]), B = x(async (e, t, n) => {
172
- let r = d.ExportAll, i = [], o;
163
+ }, [I, R]), B = S(async (e, t, n) => {
164
+ let r = f.ExportAll, i = [], o;
173
165
  do {
174
166
  if (n.aborted) return;
175
167
  let t;
176
168
  try {
177
- t = await g.listConversations({ nextToken: o }, { signal: n });
169
+ t = await u.listConversations({ nextToken: o }, { signal: n });
178
170
  } catch (t) {
179
171
  if (n.aborted) return;
180
172
  if (E(t).isUnauthorized) F?.({
181
173
  jobId: e,
182
- code: _.Unauthorized
183
- }), I.failJob(e, _.Unauthorized);
174
+ code: v.Unauthorized
175
+ }), I.failJob(e, v.Unauthorized);
184
176
  else {
185
177
  let n = await D(t);
186
178
  F?.({
187
179
  jobId: e,
188
- code: _.Unknown,
180
+ code: v.Unknown,
189
181
  traceId: n
190
- }), I.failJob(e, _.Unknown);
182
+ }), I.failJob(e, v.Unknown);
191
183
  }
192
184
  console.error("Failed to list conversations for export", t);
193
185
  return;
@@ -197,15 +189,15 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
197
189
  title: e.title
198
190
  }))), o = t.nextToken;
199
191
  } while (o);
200
- I.setJobProgress(e, p({
192
+ I.setJobProgress(e, m({
201
193
  kind: r,
202
- phase: f.Prepare
194
+ phase: p.Prepare
203
195
  }));
204
196
  let l = [];
205
197
  for (let t of i) {
206
198
  if (n.aborted) return;
207
199
  try {
208
- let e = await A(g, T(t.id), n);
200
+ let e = await A(u, T(t.id), n);
209
201
  l.push(e);
210
202
  } catch (r) {
211
203
  if (n.aborted) return;
@@ -213,15 +205,15 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
213
205
  if (i.isUnauthorized) {
214
206
  F?.({
215
207
  jobId: e,
216
- code: _.Unauthorized
217
- }), I.failJob(e, _.Unauthorized);
208
+ code: v.Unauthorized
209
+ }), I.failJob(e, v.Unauthorized);
218
210
  return;
219
211
  }
220
212
  if (i.isNotFound) {
221
213
  let n = await D(r);
222
214
  F?.({
223
215
  jobId: e,
224
- code: _.NotFound,
216
+ code: v.NotFound,
225
217
  titles: [t.title],
226
218
  traceId: n
227
219
  }), console.error("Skipped a conversation during export-all: not found", r);
@@ -230,28 +222,28 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
230
222
  let a = await D(r);
231
223
  F?.({
232
224
  jobId: e,
233
- code: _.Unknown,
225
+ code: v.Unknown,
234
226
  traceId: a
235
- }), I.failJob(e, _.Unknown), console.error("Aborted export-all: failed to fetch conversation", r);
227
+ }), I.failJob(e, v.Unknown), console.error("Aborted export-all: failed to fetch conversation", r);
236
228
  return;
237
229
  } finally {
238
- I.setJobProgress(e, p({
230
+ I.setJobProgress(e, m({
239
231
  kind: r,
240
- phase: f.Transfer,
232
+ phase: p.Transfer,
241
233
  completed: l.length,
242
234
  total: i.length
243
235
  }, {
244
236
  completed: l.length,
245
237
  total: i.length,
246
- kind: y.Conversation
238
+ kind: b.Conversation
247
239
  }));
248
240
  }
249
241
  }
250
242
  if (!n.aborted) try {
251
243
  let n = a(l.map(c), []), r = s(n);
252
- b(r, t), k?.({ jobId: e }), I.succeedJob(e);
244
+ x(r, t), k?.({ jobId: e }), I.succeedJob(e);
253
245
  } catch (t) {
254
- let n = M(t) ? _.FileTooLarge : _.Unknown, r = await D(t);
246
+ let n = M(t) ? v.FileTooLarge : v.Unknown, r = await D(t);
255
247
  F?.({
256
248
  jobId: e,
257
249
  code: n,
@@ -260,14 +252,14 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
260
252
  }
261
253
  }, [
262
254
  E,
263
- g,
255
+ u,
264
256
  T,
265
257
  F,
266
258
  k,
267
259
  I,
268
260
  D
269
- ]), V = x(() => {
270
- let e = o(r.AllConversationsHistory, i), t = I.addJob({ kind: v.All }, e);
261
+ ]), V = S(() => {
262
+ let e = o(r.AllConversationsHistory, i), t = I.addJob({ kind: y.All }, e);
271
263
  return I.startJob(t, (n) => B(t, e, n));
272
264
  }, [I, B]);
273
265
  return {
@@ -281,4 +273,4 @@ var S = 5, C = 536870912, w = 429, T = 5, E = 2e3, D = (e) => e instanceof g &&
281
273
  };
282
274
  };
283
275
  //#endregion
284
- export { C as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
276
+ export { w as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
package/conversation.js CHANGED
@@ -10,35 +10,36 @@ import { getEffectiveDeploymentIds as w, getFormSchemaToolSyncKey as T, getLastD
10
10
  import { getQuickAppConversationStarters as N } from "./conversation/quick-app-conversation-starters.js";
11
11
  import { mapStages as P, toStage as F } from "./conversation/stage.js";
12
12
  import { getStarterPopulateText as I, getStartersFromSchema as L } from "./conversation/starter-option.js";
13
- import { deriveConversationRowActionState as R } from "./conversation/deriveConversationRowActionState/deriveConversationRowActionState.js";
14
- import { useActiveConversationSync as z } from "./conversation/useActiveConversationSync/useActiveConversationSync.js";
15
- import { useAsyncConfirmDialog as B } from "./conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
16
- import { useConversationComposerDraft as V } from "./conversation/useConversationComposerDraft/useConversationComposerDraft.js";
17
- import { useConversationLookupMaps as H } from "./conversation/useConversationLookupMaps/useConversationLookupMaps.js";
18
- import { getConversationSource as U, useConversationPanelItems as W } from "./conversation/useConversationPanelItems/useConversationPanelItems.js";
19
- import { useImportFilePicker as G } from "./conversation/useImportFilePicker/useImportFilePicker.js";
20
- import { useMessageSelectionReply as K } from "./conversation/useMessageSelectionReply/useMessageSelectionReply.js";
21
- import { useAttachmentUpload as q } from "./conversation/useAttachmentUpload/useAttachmentUpload.js";
22
- import { AudioTranscriptionError as J, AudioTranscriptionErrorReason as Y } from "./conversation/useTranscribeAudio/audio-transcription-error.js";
23
- import { UploadMimeTypePolicy as X, useTranscribeAudio as Z } from "./conversation/useTranscribeAudio/useTranscribeAudio.js";
24
- import { attachmentToDto as Q, attachmentsToDtos as $ } from "./conversation/useConversationHandlers/attachment-to-dto.js";
25
- import { createMessagePair as ee } from "./conversation/useConversationHandlers/message-factory.js";
26
- import { hasActiveToolConfig as te, isAnswerIncomplete as ne, isMessageChanged as re, shouldRerunGenerationOnEdit as ie } from "./conversation/useConversationHandlers/message-utils.js";
27
- import { getStarterConversationText as ae, getStarterDisplayText as oe, getStarterSubmitText as se } from "./conversation/useConversationHandlers/starter-option.js";
28
- import { getConversationPath as ce } from "./conversation/useConversationStream/conversation-path.js";
29
- import { useConversationHandlers as le } from "./conversation/useConversationHandlers/useConversationHandlers.js";
30
- import { applyChunkToMessages as ue, mergeStages as de } from "./conversation/useConversationStream/apply-chunk.js";
31
- import { isAwaitingGenerationResume as fe } from "./conversation/useConversationStream/generation-resume.js";
32
- import { useConversationStream as pe } from "./conversation/useConversationStream/useConversationStream.js";
33
- import { DEFAULT_CHAT_SETTINGS as me, useChatSettingsFormConfig as he } from "./useChatSettingsFormConfig/useChatSettingsFormConfig.js";
34
- import { useToolsMenu as ge } from "./useToolsMenu/useToolsMenu.js";
35
- import { applyActiveScheduledTaskRun as _e, collapseScheduledTaskConversations as ve, getScheduledTaskRunGroupKey as ye, groupScheduledTaskConversations as be, isScheduledTaskRunCollapsible as xe } from "./conversation/scheduled-task-grouping.js";
36
- import { useConversationDiscovery as Se } from "./conversation/useConversationDiscovery/useConversationDiscovery.js";
37
- import { EntityPreselectionOutcome as Ce, EntityPreselectionSource as we, useEntityPreselection as Te } from "./conversation/useEntityPreselection/useEntityPreselection.js";
38
- import { ClientGenerationStatus as Ee, createGenerationRegistry as De } from "./conversation/generation-registry.js";
39
- import { ConversationTitleRequestEnd as Oe, useConversationTitleEnrichmentController as ke } from "./conversation/useConversationTitleEnrichmentController.js";
40
- import { CONVERSATION_TITLE_STREAM_MAX_FRAME_BYTES as Ae, CONVERSATION_TITLE_STREAM_MAX_IDS as je, CONVERSATION_TITLE_STREAM_MAX_ID_BYTES as Me, ConversationTitleStreamProtocolError as Ne, createSseFrameDecoder as Pe, isConversationTitleStreamUnsupported as Fe, parseConversationTitleStreamEvent as Ie, readConversationTitleStream as Le } from "./conversation/conversation-title-stream.js";
41
- import { useVisibleConversationIdsReporter as Re } from "./conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js";
42
- import { isTotalDeletionFailure as ze, resolveConversationPinChange as Be } from "./conversation/conversation-list.js";
43
- import { useDeploymentChangeTracking as Ve } from "./conversation/useDeploymentChangeTracking.js";
44
- export { J as AudioTranscriptionError, Y as AudioTranscriptionErrorReason, Ae as CONVERSATION_TITLE_STREAM_MAX_FRAME_BYTES, je as CONVERSATION_TITLE_STREAM_MAX_IDS, Me as CONVERSATION_TITLE_STREAM_MAX_ID_BYTES, Ee as ClientGenerationStatus, Oe as ConversationTitleRequestEnd, Ne as ConversationTitleStreamProtocolError, me as DEFAULT_CHAT_SETTINGS, s as DEFAULT_GENERATION_CONFLICT_MESSAGE, c as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, l as DEFAULT_STREAM_IDLE_TIMEOUT_MS, Ce as EntityPreselectionOutcome, we as EntityPreselectionSource, u as GenerationConflictError, d as GenerationPersistenceError, f as StopCompletionError, p as StreamInterruptedError, m as StreamUpstreamError, X as UploadMimeTypePolicy, _e as applyActiveScheduledTaskRun, ue as applyChunkToMessages, Q as attachmentToDto, $ as attachmentsToDtos, e as buildAnnouncementSignature, ve as collapseScheduledTaskConversations, h as createChatStreamApi, C as createDeploymentChangedMessage, De as createGenerationRegistry, a as createMemoryConversationDraftStore, ee as createMessagePair, Pe as createSseFrameDecoder, o as createWebStorageConversationDraftStore, R as deriveConversationRowActionState, y as findDeploymentForConversationId, _ as formatAppVersion, ce as getConversationPath, U as getConversationSource, w as getEffectiveDeploymentIds, T as getFormSchemaToolSyncKey, E as getLastDeploymentId, D as getLastUserMessageToolConfiguration, O as getLatestToolConfiguration, b as getModelIdCandidatesFromConversationId, x as getModelIdFromConversationId, N as getQuickAppConversationStarters, ye as getScheduledTaskRunGroupKey, ae as getStarterConversationText, oe as getStarterDisplayText, I as getStarterPopulateText, se as getStarterSubmitText, L as getStartersFromSchema, S as getTimeOfDayGreeting, k as getToolConfigurationFromFormSchema, be as groupScheduledTaskConversations, te as hasActiveToolConfig, t as hasAnnouncementContent, n as hasStructuredAnnouncement, ne as isAnswerIncomplete, fe as isAwaitingGenerationResume, Fe as isConversationTitleStreamUnsupported, re as isMessageChanged, A as isMessageStreaming, xe as isScheduledTaskRunCollapsible, ze as isTotalDeletionFailure, P as mapStages, de as mergeStages, j as messageHasStages, M as normalizeResponseFormat, Ie as parseConversationTitleStreamEvent, Le as readConversationTitleStream, Be as resolveConversationPinChange, r as sanitizeAnnouncementHtml, i as sanitizeAnnouncementMessageHtml, v as sanitizeFooterHtml, ie as shouldRerunGenerationOnEdit, g as shouldWatchForDisplayNameUpdate, F as toStage, z as useActiveConversationSync, B as useAsyncConfirmDialog, q as useAttachmentUpload, he as useChatSettingsFormConfig, V as useConversationComposerDraft, Se as useConversationDiscovery, le as useConversationHandlers, H as useConversationLookupMaps, W as useConversationPanelItems, pe as useConversationStream, ke as useConversationTitleEnrichmentController, Ve as useDeploymentChangeTracking, Te as useEntityPreselection, G as useImportFilePicker, K as useMessageSelectionReply, ge as useToolsMenu, Z as useTranscribeAudio, Re as useVisibleConversationIdsReporter };
13
+ import { NO_CONVERSATION_LIST_SYNC as R } from "./conversation/conversation-data-source.js";
14
+ import { deriveConversationRowActionState as z } from "./conversation/deriveConversationRowActionState/deriveConversationRowActionState.js";
15
+ import { useActiveConversationSync as B } from "./conversation/useActiveConversationSync/useActiveConversationSync.js";
16
+ import { useAsyncConfirmDialog as V } from "./conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
17
+ import { useConversationComposerDraft as H } from "./conversation/useConversationComposerDraft/useConversationComposerDraft.js";
18
+ import { useConversationLookupMaps as U } from "./conversation/useConversationLookupMaps/useConversationLookupMaps.js";
19
+ import { getConversationSource as W, useConversationPanelItems as G } from "./conversation/useConversationPanelItems/useConversationPanelItems.js";
20
+ import { useImportFilePicker as K } from "./conversation/useImportFilePicker/useImportFilePicker.js";
21
+ import { useMessageSelectionReply as q } from "./conversation/useMessageSelectionReply/useMessageSelectionReply.js";
22
+ import { useAttachmentUpload as J } from "./conversation/useAttachmentUpload/useAttachmentUpload.js";
23
+ import { AudioTranscriptionError as Y, AudioTranscriptionErrorReason as X } from "./conversation/useTranscribeAudio/audio-transcription-error.js";
24
+ import { UploadMimeTypePolicy as Z, useTranscribeAudio as Q } from "./conversation/useTranscribeAudio/useTranscribeAudio.js";
25
+ import { attachmentToDto as $, attachmentsToDtos as ee } from "./conversation/useConversationHandlers/attachment-to-dto.js";
26
+ import { createMessagePair as te } from "./conversation/useConversationHandlers/message-factory.js";
27
+ import { hasActiveToolConfig as ne, isAnswerIncomplete as re, isMessageChanged as ie, shouldRerunGenerationOnEdit as ae } from "./conversation/useConversationHandlers/message-utils.js";
28
+ import { getStarterConversationText as oe, getStarterDisplayText as se, getStarterSubmitText as ce } from "./conversation/useConversationHandlers/starter-option.js";
29
+ import { getConversationPath as le } from "./conversation/useConversationStream/conversation-path.js";
30
+ import { useConversationHandlers as ue } from "./conversation/useConversationHandlers/useConversationHandlers.js";
31
+ import { applyChunkToMessages as de, mergeStages as fe } from "./conversation/useConversationStream/apply-chunk.js";
32
+ import { isAwaitingGenerationResume as pe } from "./conversation/useConversationStream/generation-resume.js";
33
+ import { useConversationStream as me } from "./conversation/useConversationStream/useConversationStream.js";
34
+ import { DEFAULT_CHAT_SETTINGS as he, useChatSettingsFormConfig as ge } from "./useChatSettingsFormConfig/useChatSettingsFormConfig.js";
35
+ import { useToolsMenu as _e } from "./useToolsMenu/useToolsMenu.js";
36
+ import { applyActiveScheduledTaskRun as ve, collapseScheduledTaskConversations as ye, getScheduledTaskRunGroupKey as be, groupScheduledTaskConversations as xe, isScheduledTaskRunCollapsible as Se } from "./conversation/scheduled-task-grouping.js";
37
+ import { useConversationDiscovery as Ce } from "./conversation/useConversationDiscovery/useConversationDiscovery.js";
38
+ import { EntityPreselectionOutcome as we, EntityPreselectionSource as Te, useEntityPreselection as Ee } from "./conversation/useEntityPreselection/useEntityPreselection.js";
39
+ import { ClientGenerationStatus as De, createGenerationRegistry as Oe } from "./conversation/generation-registry.js";
40
+ import { ConversationTitleRequestEnd as ke, useConversationTitleEnrichmentController as Ae } from "./conversation/useConversationTitleEnrichmentController.js";
41
+ import { CONVERSATION_TITLE_STREAM_MAX_FRAME_BYTES as je, CONVERSATION_TITLE_STREAM_MAX_IDS as Me, CONVERSATION_TITLE_STREAM_MAX_ID_BYTES as Ne, ConversationTitleStreamProtocolError as Pe, createSseFrameDecoder as Fe, isConversationTitleStreamUnsupported as Ie, parseConversationTitleStreamEvent as Le, readConversationTitleStream as Re } from "./conversation/conversation-title-stream.js";
42
+ import { useVisibleConversationIdsReporter as ze } from "./conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js";
43
+ import { isTotalDeletionFailure as Be, resolveConversationPinChange as Ve } from "./conversation/conversation-list.js";
44
+ import { useDeploymentChangeTracking as He } from "./conversation/useDeploymentChangeTracking.js";
45
+ export { Y as AudioTranscriptionError, X as AudioTranscriptionErrorReason, je as CONVERSATION_TITLE_STREAM_MAX_FRAME_BYTES, Me as CONVERSATION_TITLE_STREAM_MAX_IDS, Ne as CONVERSATION_TITLE_STREAM_MAX_ID_BYTES, De as ClientGenerationStatus, ke as ConversationTitleRequestEnd, Pe as ConversationTitleStreamProtocolError, he as DEFAULT_CHAT_SETTINGS, s as DEFAULT_GENERATION_CONFLICT_MESSAGE, c as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, l as DEFAULT_STREAM_IDLE_TIMEOUT_MS, we as EntityPreselectionOutcome, Te as EntityPreselectionSource, u as GenerationConflictError, d as GenerationPersistenceError, R as NO_CONVERSATION_LIST_SYNC, f as StopCompletionError, p as StreamInterruptedError, m as StreamUpstreamError, Z as UploadMimeTypePolicy, ve as applyActiveScheduledTaskRun, de as applyChunkToMessages, $ as attachmentToDto, ee as attachmentsToDtos, e as buildAnnouncementSignature, ye as collapseScheduledTaskConversations, h as createChatStreamApi, C as createDeploymentChangedMessage, Oe as createGenerationRegistry, a as createMemoryConversationDraftStore, te as createMessagePair, Fe as createSseFrameDecoder, o as createWebStorageConversationDraftStore, z as deriveConversationRowActionState, y as findDeploymentForConversationId, _ as formatAppVersion, le as getConversationPath, W as getConversationSource, w as getEffectiveDeploymentIds, T as getFormSchemaToolSyncKey, E as getLastDeploymentId, D as getLastUserMessageToolConfiguration, O as getLatestToolConfiguration, b as getModelIdCandidatesFromConversationId, x as getModelIdFromConversationId, N as getQuickAppConversationStarters, be as getScheduledTaskRunGroupKey, oe as getStarterConversationText, se as getStarterDisplayText, I as getStarterPopulateText, ce as getStarterSubmitText, L as getStartersFromSchema, S as getTimeOfDayGreeting, k as getToolConfigurationFromFormSchema, xe as groupScheduledTaskConversations, ne as hasActiveToolConfig, t as hasAnnouncementContent, n as hasStructuredAnnouncement, re as isAnswerIncomplete, pe as isAwaitingGenerationResume, Ie as isConversationTitleStreamUnsupported, ie as isMessageChanged, A as isMessageStreaming, Se as isScheduledTaskRunCollapsible, Be as isTotalDeletionFailure, P as mapStages, fe as mergeStages, j as messageHasStages, M as normalizeResponseFormat, Le as parseConversationTitleStreamEvent, Re as readConversationTitleStream, Ve as resolveConversationPinChange, r as sanitizeAnnouncementHtml, i as sanitizeAnnouncementMessageHtml, v as sanitizeFooterHtml, ae as shouldRerunGenerationOnEdit, g as shouldWatchForDisplayNameUpdate, F as toStage, B as useActiveConversationSync, V as useAsyncConfirmDialog, J as useAttachmentUpload, ge as useChatSettingsFormConfig, H as useConversationComposerDraft, Ce as useConversationDiscovery, ue as useConversationHandlers, U as useConversationLookupMaps, G as useConversationPanelItems, me as useConversationStream, Ae as useConversationTitleEnrichmentController, He as useDeploymentChangeTracking, Ee as useEntityPreselection, K as useImportFilePicker, q as useMessageSelectionReply, _e as useToolsMenu, Q as useTranscribeAudio, ze as useVisibleConversationIdsReporter };
@@ -10,6 +10,7 @@ export * from '../catalog/map-prompt-to-catalog-item';
10
10
  export * from '../catalog/map-skill-to-catalog-item';
11
11
  export * from '../catalog/mcp-endpoint-url';
12
12
  export * from '../catalog/publish';
13
+ export * from '../catalog/use-publish-history';
13
14
  export * from '../catalog/catalog-derivations';
14
15
  export * from '../catalog/catalog-entity-kind';
15
16
  export * from '../catalog/favorite-entity-type';