@epam/ai-dial-chat-hooks 1.1.0-dev.293 → 1.1.0-dev.294

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/index.js CHANGED
@@ -18310,47 +18310,52 @@ var Op = (e) => !Cp.has(e), kp = (e) => e && e === Math.floor(e) && e > 0 && isF
18310
18310
  d(e);
18311
18311
  }, [d])
18312
18312
  };
18313
- }, uh = { deepResearchFallback: "Deep research" }, dh = (e) => {
18314
- let { deepResearchToolId: t, selectedItemId: n, selectedDeploymentConfiguration: r } = e, i = M(() => ({
18315
- ...uh,
18316
- ...e.labels
18317
- }), [e.labels]), a = e.toolIcon, o = M(() => {
18318
- if (t == null || r == null) return null;
18319
- let e = r.properties?.[t];
18320
- return e == null || !(e.type === "boolean" || e.type == null && typeof e.default == "boolean") ? null : e;
18321
- }, [t, r]), s = M(() => typeof o?.default == "boolean" ? o.default : !1, [o]), [c, l] = P(s);
18322
- j(() => {
18323
- l(s);
18324
- }, [n, s]);
18313
+ }, uh = (e) => e.type === "boolean" || e.type == null && typeof e.default == "boolean", dh = (e) => {
18314
+ let t = e.replace(/[_-]+/g, " ").trim();
18315
+ return t.length === 0 ? e : t.charAt(0).toUpperCase() + t.slice(1);
18316
+ }, fh = (e) => {
18317
+ let t = e?.properties;
18318
+ return t == null ? [] : Object.entries(t).filter(([, e]) => uh(e)).map(([e, t]) => ({
18319
+ id: e,
18320
+ label: typeof t.title == "string" && t.title.length > 0 ? t.title : dh(e),
18321
+ defaultValue: t.default === !0
18322
+ }));
18323
+ }, ph = (e) => {
18324
+ let { selectedItemId: t, selectedDeploymentConfiguration: n, toolIcon: r } = e, i = M(() => fh(n), [n]), a = M(() => Object.fromEntries(i.map(({ id: e, defaultValue: t }) => [e, t])), [i]), [o, s] = P(a), c = JSON.stringify(a), l = N(a);
18325
+ l.current = a, j(() => {
18326
+ s(l.current);
18327
+ }, [t, c]);
18325
18328
  let u = A((e) => {
18326
- e === t && l((e) => !e);
18327
- }, [t]), d = A((e) => {
18328
- if (t == null) return;
18329
- let n = e?.[t];
18330
- typeof n == "boolean" && l(n);
18331
- }, [t]);
18329
+ s((t) => e in t ? {
18330
+ ...t,
18331
+ [e]: !t[e]
18332
+ } : t);
18333
+ }, [s]), d = A((e) => {
18334
+ e != null && s((t) => {
18335
+ let n = !1, r = { ...t };
18336
+ for (let i of Object.keys(t)) {
18337
+ let a = e[i];
18338
+ typeof a == "boolean" && a !== t[i] && (r[i] = a, n = !0);
18339
+ }
18340
+ return n ? r : t;
18341
+ });
18342
+ }, [s]);
18332
18343
  return {
18333
- toolsMenuItems: M(() => o == null || t == null ? [] : [{
18334
- id: t,
18335
- label: typeof o.title == "string" && o.title || i.deepResearchFallback,
18336
- icon: a ?? null,
18337
- isSelected: c
18338
- }], [
18339
- o,
18340
- t,
18341
- c,
18344
+ toolsMenuItems: M(() => i.map(({ id: e, label: t }) => ({
18345
+ id: e,
18346
+ label: t,
18347
+ icon: r ?? null,
18348
+ isSelected: o[e] ?? !1
18349
+ })), [
18342
18350
  i,
18343
- a
18344
- ]),
18345
- onToolToggle: u,
18346
- toolConfigurationValue: M(() => t == null || o == null ? {} : { [t]: c }, [
18347
- t,
18348
18351
  o,
18349
- c
18352
+ r
18350
18353
  ]),
18354
+ onToolToggle: u,
18355
+ toolConfigurationValue: M(() => Object.fromEntries(i.map(({ id: e }) => [e, o[e] ?? !1])), [i, o]),
18351
18356
  restoreToolConfiguration: d
18352
18357
  };
18353
- }, fh = (e) => e instanceof Error ? e : Error(String(e)), ph = (e, t = !0) => {
18358
+ }, mh = (e) => e instanceof Error ? e : Error(String(e)), hh = (e, t = !0) => {
18354
18359
  let [n, r] = P(), [i, a] = P(t), [o, s] = P();
18355
18360
  return j(() => {
18356
18361
  if (!t) {
@@ -18365,7 +18370,7 @@ var Op = (e) => !Cp.has(e), kp = (e) => e && e === Math.floor(e) && e > 0 && isF
18365
18370
  r(t);
18366
18371
  } catch (e) {
18367
18372
  if (n) return;
18368
- s(fh(e));
18373
+ s(mh(e));
18369
18374
  } finally {
18370
18375
  n || a(!1);
18371
18376
  }
@@ -18379,4 +18384,4 @@ var Op = (e) => !Cp.has(e), kp = (e) => e && e === Math.floor(e) && e > 0 && isF
18379
18384
  };
18380
18385
  };
18381
18386
  //#endregion
18382
- export { Lt as AttachmentValidationErrorReason, Sn as AuthenticationType, If as COLUMNS_WITHOUT_AUTHOR, Lf as COLUMNS_WITH_AUTHOR, Rf as CORE_PERMISSION_MAP, Vt as ConversationExportMode, H as ConversationTransferErrorCode, c as ConversationTransferJobStatus, u as ConversationTransferSubjectKind, Ut as ConversationTransferWarningCode, Ff as DATE_OPTIONS, Bf as DialFileManagerActionProfile, zf as DialFileManagerVariant, kf as DialFilesApiUploadMode, pm as DownloadDestinationType, Wt as EXPORT_APP_NAME, Ht as ExportFileNameKind, Dc as FavoriteEntityType, $ as FileManagerNotificationReason, Af as FileNameValidationErrorReason, jf as FileOperationKind, ym as FileUploadStatus, mc as McpResourceKind, Pf as PATH_SEPARATOR_REGEXP, g as PROHIBITED_CONVERSATION_NAME_CHARS_RE, Iu as PROMPT_CONTENT_MAX_LENGTH, Lu as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, Fu as PROMPT_DESCRIPTION_MAX_LENGTH, Pu as PROMPT_NAME_MAX_LENGTH, qs as PUBLIC_SKILL_BUCKET, Mu as PromptFieldError, Ar as PromptSource, Nf as RESERVED_MARKER_NAME, xd as RecipientsCountStatus, Os as SKILL_FILE_UPLOAD_MAX_BYTES, Zs as SKILL_LISTING_MAX_PAGES, Xs as SKILL_LISTING_PAGE_SIZE, Ds as SKILL_MANIFEST_FILE, Ys as SKILL_MANIFEST_MAX_BYTES, As as SKILL_UPLOAD_MAX_FILES, ks as SKILL_UPLOAD_MAX_TOTAL_BYTES, ad as SkillEditorLoadState, Ks as SkillSource, Mf as UPLOAD_CONCURRENCY, Wu as UnsupportedTriggerReason, sm as annotationToDisplayAttachment, em as annotationToPdfCanvasContent, Gu as apSchedulerDayToJsDay, Fn as appendLocaleCode, om as attachmentDtoToDisplayAttachment, cm as attachmentDtosToDisplayAttachments, Wd as attachmentToDto, Gd as attachmentsToDtos, Rn as buildAdditionalLocaleOptions, Ql as buildAnnouncementSignature, yc as buildApplicationMcpUrl, _n as buildChatCompletionsUrl, Sc as buildConnectApi, yn as buildDeploymentConnectApi, Jm as buildExternalServiceScopeId, dp as buildFromCache, Ou as buildPromptExportEnvelope, ju as buildPromptExportFileName, Ir as buildPromptOverview, Hu as buildPromptPath, Mr as buildPromptResourceUrl, vn as buildResponsesUrl, $f as buildSharedItemVirtualPath, dc as buildSkillContentTree, Gs as buildSkillFilesPayload, Ls as buildSkillManifest, Ws as buildSkillManifestForSubmit, Rs as buildSkillManifestFromFrontmatter, cc as buildSkillOverview, vc as buildToolsetMcpUrl, Hp as clearAttachmentCache, In as composeLocalePayload, tu as createChatStreamApi, ct as createCsrfMiddleware, hu as createDeploymentChangedMessage, yp as createFilesApiClient, Kd as createMessagePair, ft as createUnauthorizedMiddleware, bp as createUploadFileWithProgress, Ln as decomposeLocalizedFields, Vf as deriveActionProfile, wd as deriveConversationRowActionState, Qf as dialCorePathToRelative, um as dialFileToAttachment, dm as dialFilesToAttachments, fm as dialFolderPathToAttachment, bt as downloadAttachment, Qm as emitToolsetLoginSuccess, bn as encodeDeploymentId, mp as fetchByTab, hp as fetchForSearch, xn as findDeploymentByIdOrReference, Jf as findDialFileByPath, up as findFirstSuccessfulCopyMoveItem, Kf as findFolderByVirtualPath, au as formatAppVersion, Bn as formatCalendarDate, Bt as formatDateYM, zt as formatDateYMD, Gf as formatOperationFolderName, un as formatQuotedNameList, st as getApiErrorDetails, ot as getApiErrorMessage, at as getApiErrorStatus, Vm as getBrowserTimezone, Zd as getConversationPath, Od as getConversationSource, Ym as getExternalServiceFallbackName, _u as getLastDeploymentId, yu as getLastUserMessageToolConfiguration, pu as getModelIdFromConversationId, ip as getParentFolderPath, wu as getQuickAppConversationStarters, Vu as getRemainingCharacters, Yd as getStarterConversationText, Tu as getStarterPopulateText, Xd as getStarterSubmitText, Eu as getStartersFromSchema, mu as getTimeOfDayGreeting, Rp as getUrlFileName, T as getUtf8ByteLength, Wf as getVirtualPathName, qd as hasActiveToolConfig, Zl as hasAnnouncementContent, qp as hasAttachmentTextSource, qf as hasDialFileWritePermission, Hf as hasForbiddenNameSymbols, Xl as hasStructuredAnnouncement, pt as includesIgnoreCase, bf as isAwaitingGenerationResume, it as isConversationNotFoundError, Yf as isCopyMoveDuplicateAllowed, zm as isCustomAppSchema, Mt as isDialFileAcceptType, gt as isDialFileId, yt as isDownloadableAttachment, zp as isExternalSourcePreviewable, hm as isHiddenPath, Jd as isMessageChanged, gu as isMessageStreaming, Lr as isOrganisationPromptItem, Bm as isQuickAppSchema, Xf as isShareActionsAllowed, Hm as isValidAbsoluteUrl, Gm as isValidFeaturesData, Fs as isValidSkillRelativePath, Ku as jsDayToApSchedulerDay, lp as mapCorePermissions, mr as mapDeploymentDetailsDtoToEntityDetails, jn as mapDeploymentLimitsDtoToCatalogLimits, Mn as mapDeploymentLimitsToInput, Or as mapDeploymentToCatalogItem, br as mapDeploymentToolsetCredentials, or as mapEntityDetailsToCatalogDetails, _p as mapFileMetadataToDialFile, Zu as mapFormValuesToCreateBody, Qu as mapFormValuesToUpdateBody, Rr as mapPromptToCatalogItem, Ec as mapPublishConversationResultDto, Tc as mapPublishHistoryEntryDto, nd as mapScheduledTaskDtoToFormValues, gp as mapSearchItem, tc as mapSkillToCatalogItem, rr as mapToolsetCredentials, kr as mapToolsetToCatalogItem, fp as mergeCreatedFolderIntoCache, vu as messageHasStages, Ft as mimeTypesToAttachmentExtensionLabels, Nt as mimeTypesToDialFileAcceptTypes, Pt as mimeTypesToFileAccept, Hs as nameFromPath, bu as normalizeResponseFormat, Is as normalizeSkillName, Uf as normalizeVirtualPath, xp as openAnnotationAttachment, zn as padTwoDigits, qm as parseExternalServiceUrl, Um as parseFeaturesData, Zf as parseNewFolderVirtualPath, Nr as parsePromptResourceUrl, Bs as parseSkillManifest, yd as parseSkillManifestDocument, Qs as parseSkillResourceUrl, sp as prepareCopyItems, mm as prepareDownloadDestination, cp as prepareMoveRenameItems, fc as readSkillFileBytes, pc as readSkillManifest, tm as referenceAttachmentToPdfCanvasContent, Qp as resolveCodeCanvasContent, Er as resolveDeploymentFolder, op as resolveDialFileApiPath, vt as resolveDialFileBucketAndPath, $p as resolveHtmlCanvasContent, Jp as resolveImageCanvasContent, im as resolveJsonCanvasContent, Pn as resolveLocalizedText, Xp as resolveMarkdownCanvasContent, xc as resolveMcpResourceKind, rm as resolveOoxmlCanvasContent, ep as resolveOwnerCoords, nm as resolvePdfCanvasContent, _t as resolveRelativeDialFilePath, sc as resolveSkillFileDownloadPath, ac as resolveSkillManifestFileId, Yp as resolveTextCanvasContent, am as resolveVisualizerCanvasContent, V as safeDecodeURI, mt as safeDecodeURIComponent, Jl as sanitizeAnnouncementHtml, O as sanitizeConversationName, vm as sanitizeFileName, iu as sanitizeFooterHtml, ku as serializePromptExport, nu as shouldWatchForDisplayNameUpdate, Us as skillFileBytesToBlob, id as skillFileToAttachment, gm as splitFileNameExtension, ht as stripSurroundingSlashes, re as stripTrailingDots, $m as subscribeToolsetLoginSuccess, Nn as toBaseLocale, xu as toOverlayMessages, wc as toPublishEntityType, _m as trimFileNameToByteLimit, Vs as unpackSkillArchive, pp as updateEntry, Td as useActiveConversationSync, Ed as useAsyncConfirmDialog, Ct as useAttachmentAction, Pd as useAttachmentUpload, Rt as useAttachmentValidation, nh as useChatSettingsFormConfig, Ud as useConversationExport, Qd as useConversationHandlers, gf as useConversationImport, Dd as useConversationLookupMaps, kd as useConversationPanelItems, yf as useConversationScroll, Of as useConversationSources, Ef as useConversationStream, bm as useDialFileListing, jm as useDialFileManager, Nm as useDialFileManagerTabConfig, xm as useDialFileMetadata, Sm as useDialFileMutations, Cm as useDialFileSharing, Am as useDialFileUploadBatch, Oc as useFavoriteEntitiesState, Lm as useGridEditingScroll, Ad as useImportFilePicker, rh as usePageFileDrag, oh as usePanelMaxWidth, Uu as usePromptsState, lh as useShareLink, Cd as useShareRecipientsCount, ud as useSkillEditorLoad, fd as useSkillEditorSubmit, pd as useSkillFileActions, bd as useSkillsState, dh as useToolsMenu, ph as useUsageData, ah as useViewportWidth, Bu as validatePromptContent, zu as validatePromptDescription, Ru as validatePromptName, rd as validateSkillFileBatch, rp as virtualPathToApiPath };
18387
+ export { Lt as AttachmentValidationErrorReason, Sn as AuthenticationType, If as COLUMNS_WITHOUT_AUTHOR, Lf as COLUMNS_WITH_AUTHOR, Rf as CORE_PERMISSION_MAP, Vt as ConversationExportMode, H as ConversationTransferErrorCode, c as ConversationTransferJobStatus, u as ConversationTransferSubjectKind, Ut as ConversationTransferWarningCode, Ff as DATE_OPTIONS, Bf as DialFileManagerActionProfile, zf as DialFileManagerVariant, kf as DialFilesApiUploadMode, pm as DownloadDestinationType, Wt as EXPORT_APP_NAME, Ht as ExportFileNameKind, Dc as FavoriteEntityType, $ as FileManagerNotificationReason, Af as FileNameValidationErrorReason, jf as FileOperationKind, ym as FileUploadStatus, mc as McpResourceKind, Pf as PATH_SEPARATOR_REGEXP, g as PROHIBITED_CONVERSATION_NAME_CHARS_RE, Iu as PROMPT_CONTENT_MAX_LENGTH, Lu as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, Fu as PROMPT_DESCRIPTION_MAX_LENGTH, Pu as PROMPT_NAME_MAX_LENGTH, qs as PUBLIC_SKILL_BUCKET, Mu as PromptFieldError, Ar as PromptSource, Nf as RESERVED_MARKER_NAME, xd as RecipientsCountStatus, Os as SKILL_FILE_UPLOAD_MAX_BYTES, Zs as SKILL_LISTING_MAX_PAGES, Xs as SKILL_LISTING_PAGE_SIZE, Ds as SKILL_MANIFEST_FILE, Ys as SKILL_MANIFEST_MAX_BYTES, As as SKILL_UPLOAD_MAX_FILES, ks as SKILL_UPLOAD_MAX_TOTAL_BYTES, ad as SkillEditorLoadState, Ks as SkillSource, Mf as UPLOAD_CONCURRENCY, Wu as UnsupportedTriggerReason, sm as annotationToDisplayAttachment, em as annotationToPdfCanvasContent, Gu as apSchedulerDayToJsDay, Fn as appendLocaleCode, om as attachmentDtoToDisplayAttachment, cm as attachmentDtosToDisplayAttachments, Wd as attachmentToDto, Gd as attachmentsToDtos, Rn as buildAdditionalLocaleOptions, Ql as buildAnnouncementSignature, yc as buildApplicationMcpUrl, _n as buildChatCompletionsUrl, Sc as buildConnectApi, yn as buildDeploymentConnectApi, Jm as buildExternalServiceScopeId, dp as buildFromCache, Ou as buildPromptExportEnvelope, ju as buildPromptExportFileName, Ir as buildPromptOverview, Hu as buildPromptPath, Mr as buildPromptResourceUrl, vn as buildResponsesUrl, $f as buildSharedItemVirtualPath, dc as buildSkillContentTree, Gs as buildSkillFilesPayload, Ls as buildSkillManifest, Ws as buildSkillManifestForSubmit, Rs as buildSkillManifestFromFrontmatter, cc as buildSkillOverview, vc as buildToolsetMcpUrl, Hp as clearAttachmentCache, In as composeLocalePayload, tu as createChatStreamApi, ct as createCsrfMiddleware, hu as createDeploymentChangedMessage, yp as createFilesApiClient, Kd as createMessagePair, ft as createUnauthorizedMiddleware, bp as createUploadFileWithProgress, Ln as decomposeLocalizedFields, Vf as deriveActionProfile, wd as deriveConversationRowActionState, Qf as dialCorePathToRelative, um as dialFileToAttachment, dm as dialFilesToAttachments, fm as dialFolderPathToAttachment, bt as downloadAttachment, Qm as emitToolsetLoginSuccess, bn as encodeDeploymentId, mp as fetchByTab, hp as fetchForSearch, xn as findDeploymentByIdOrReference, Jf as findDialFileByPath, up as findFirstSuccessfulCopyMoveItem, Kf as findFolderByVirtualPath, au as formatAppVersion, Bn as formatCalendarDate, Bt as formatDateYM, zt as formatDateYMD, Gf as formatOperationFolderName, un as formatQuotedNameList, st as getApiErrorDetails, ot as getApiErrorMessage, at as getApiErrorStatus, Vm as getBrowserTimezone, Zd as getConversationPath, Od as getConversationSource, Ym as getExternalServiceFallbackName, _u as getLastDeploymentId, yu as getLastUserMessageToolConfiguration, pu as getModelIdFromConversationId, ip as getParentFolderPath, wu as getQuickAppConversationStarters, Vu as getRemainingCharacters, Yd as getStarterConversationText, Tu as getStarterPopulateText, Xd as getStarterSubmitText, Eu as getStartersFromSchema, mu as getTimeOfDayGreeting, Rp as getUrlFileName, T as getUtf8ByteLength, Wf as getVirtualPathName, qd as hasActiveToolConfig, Zl as hasAnnouncementContent, qp as hasAttachmentTextSource, qf as hasDialFileWritePermission, Hf as hasForbiddenNameSymbols, Xl as hasStructuredAnnouncement, pt as includesIgnoreCase, bf as isAwaitingGenerationResume, it as isConversationNotFoundError, Yf as isCopyMoveDuplicateAllowed, zm as isCustomAppSchema, Mt as isDialFileAcceptType, gt as isDialFileId, yt as isDownloadableAttachment, zp as isExternalSourcePreviewable, hm as isHiddenPath, Jd as isMessageChanged, gu as isMessageStreaming, Lr as isOrganisationPromptItem, Bm as isQuickAppSchema, Xf as isShareActionsAllowed, Hm as isValidAbsoluteUrl, Gm as isValidFeaturesData, Fs as isValidSkillRelativePath, Ku as jsDayToApSchedulerDay, lp as mapCorePermissions, mr as mapDeploymentDetailsDtoToEntityDetails, jn as mapDeploymentLimitsDtoToCatalogLimits, Mn as mapDeploymentLimitsToInput, Or as mapDeploymentToCatalogItem, br as mapDeploymentToolsetCredentials, or as mapEntityDetailsToCatalogDetails, _p as mapFileMetadataToDialFile, Zu as mapFormValuesToCreateBody, Qu as mapFormValuesToUpdateBody, Rr as mapPromptToCatalogItem, Ec as mapPublishConversationResultDto, Tc as mapPublishHistoryEntryDto, nd as mapScheduledTaskDtoToFormValues, gp as mapSearchItem, tc as mapSkillToCatalogItem, rr as mapToolsetCredentials, kr as mapToolsetToCatalogItem, fp as mergeCreatedFolderIntoCache, vu as messageHasStages, Ft as mimeTypesToAttachmentExtensionLabels, Nt as mimeTypesToDialFileAcceptTypes, Pt as mimeTypesToFileAccept, Hs as nameFromPath, bu as normalizeResponseFormat, Is as normalizeSkillName, Uf as normalizeVirtualPath, xp as openAnnotationAttachment, zn as padTwoDigits, qm as parseExternalServiceUrl, Um as parseFeaturesData, Zf as parseNewFolderVirtualPath, Nr as parsePromptResourceUrl, Bs as parseSkillManifest, yd as parseSkillManifestDocument, Qs as parseSkillResourceUrl, sp as prepareCopyItems, mm as prepareDownloadDestination, cp as prepareMoveRenameItems, fc as readSkillFileBytes, pc as readSkillManifest, tm as referenceAttachmentToPdfCanvasContent, Qp as resolveCodeCanvasContent, Er as resolveDeploymentFolder, op as resolveDialFileApiPath, vt as resolveDialFileBucketAndPath, $p as resolveHtmlCanvasContent, Jp as resolveImageCanvasContent, im as resolveJsonCanvasContent, Pn as resolveLocalizedText, Xp as resolveMarkdownCanvasContent, xc as resolveMcpResourceKind, rm as resolveOoxmlCanvasContent, ep as resolveOwnerCoords, nm as resolvePdfCanvasContent, _t as resolveRelativeDialFilePath, sc as resolveSkillFileDownloadPath, ac as resolveSkillManifestFileId, Yp as resolveTextCanvasContent, am as resolveVisualizerCanvasContent, V as safeDecodeURI, mt as safeDecodeURIComponent, Jl as sanitizeAnnouncementHtml, O as sanitizeConversationName, vm as sanitizeFileName, iu as sanitizeFooterHtml, ku as serializePromptExport, nu as shouldWatchForDisplayNameUpdate, Us as skillFileBytesToBlob, id as skillFileToAttachment, gm as splitFileNameExtension, ht as stripSurroundingSlashes, re as stripTrailingDots, $m as subscribeToolsetLoginSuccess, Nn as toBaseLocale, xu as toOverlayMessages, wc as toPublishEntityType, _m as trimFileNameToByteLimit, Vs as unpackSkillArchive, pp as updateEntry, Td as useActiveConversationSync, Ed as useAsyncConfirmDialog, Ct as useAttachmentAction, Pd as useAttachmentUpload, Rt as useAttachmentValidation, nh as useChatSettingsFormConfig, Ud as useConversationExport, Qd as useConversationHandlers, gf as useConversationImport, Dd as useConversationLookupMaps, kd as useConversationPanelItems, yf as useConversationScroll, Of as useConversationSources, Ef as useConversationStream, bm as useDialFileListing, jm as useDialFileManager, Nm as useDialFileManagerTabConfig, xm as useDialFileMetadata, Sm as useDialFileMutations, Cm as useDialFileSharing, Am as useDialFileUploadBatch, Oc as useFavoriteEntitiesState, Lm as useGridEditingScroll, Ad as useImportFilePicker, rh as usePageFileDrag, oh as usePanelMaxWidth, Uu as usePromptsState, lh as useShareLink, Cd as useShareRecipientsCount, ud as useSkillEditorLoad, fd as useSkillEditorSubmit, pd as useSkillFileActions, bd as useSkillsState, ph as useToolsMenu, hh as useUsageData, ah as useViewportWidth, Bu as validatePromptContent, zu as validatePromptDescription, Ru as validatePromptName, rd as validateSkillFileBatch, rp as virtualPathToApiPath };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.1.0-dev.293",
4
+ "version": "1.1.0-dev.294",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -23,20 +23,20 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "^19.2.6",
26
- "@epam/ai-dial-attachment-canvas": "1.1.0-dev.293",
27
- "@epam/ai-dial-attachment-input": "1.1.0-dev.293",
28
- "@epam/ai-dial-catalog": "1.1.0-dev.293",
29
- "@epam/ai-dial-chat-api-client": "1.1.0-dev.293",
30
- "@epam/ai-dial-chat-overlay": "1.1.0-dev.293",
31
- "@epam/ai-dial-chat-shared": "1.1.0-dev.293",
32
- "@epam/ai-dial-deployment-creation-form": "1.1.0-dev.293",
33
- "@epam/ai-dial-publish-panel": "1.1.0-dev.293",
34
- "@epam/ai-dial-quotations": "1.1.0-dev.293",
26
+ "@epam/ai-dial-attachment-canvas": "1.1.0-dev.294",
27
+ "@epam/ai-dial-attachment-input": "1.1.0-dev.294",
28
+ "@epam/ai-dial-catalog": "1.1.0-dev.294",
29
+ "@epam/ai-dial-chat-api-client": "1.1.0-dev.294",
30
+ "@epam/ai-dial-chat-overlay": "1.1.0-dev.294",
31
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.294",
32
+ "@epam/ai-dial-deployment-creation-form": "1.1.0-dev.294",
33
+ "@epam/ai-dial-publish-panel": "1.1.0-dev.294",
34
+ "@epam/ai-dial-quotations": "1.1.0-dev.294",
35
35
  "@epam/ai-dial-react-file-manager": "*",
36
- "@epam/ai-dial-scheduled-tasks": "1.1.0-dev.293",
37
- "@epam/ai-dial-share": "1.1.0-dev.293",
38
- "@epam/ai-dial-skill-editor": "1.1.0-dev.293",
39
- "@epam/ai-dial-source-panel": "1.1.0-dev.293",
36
+ "@epam/ai-dial-scheduled-tasks": "1.1.0-dev.294",
37
+ "@epam/ai-dial-share": "1.1.0-dev.294",
38
+ "@epam/ai-dial-skill-editor": "1.1.0-dev.294",
39
+ "@epam/ai-dial-source-panel": "1.1.0-dev.294",
40
40
  "@epam/ai-dial-ui-kit": "*",
41
41
  "ag-grid-community": "^35.3.0",
42
42
  "fflate": "^0.8.3"
@@ -1,26 +1,17 @@
1
1
  import { DeploymentConfigurationSchema, ToolMenuItem } from '@epam/ai-dial-chat-shared';
2
2
  import { ReactNode } from 'react';
3
- /** Translatable strings the tools menu surfaces. */
4
- export interface ToolsMenuLabels {
5
- /** Fallback label for the deep-research tool when the schema defines no `title`. */
6
- deepResearchFallback: string;
7
- }
8
3
  /** Host-supplied inputs to {@link useToolsMenu}. */
9
4
  export interface UseToolsMenuParams {
10
- /** Operator-configured deep-research tool id, or `null` when none is configured. */
11
- deepResearchToolId: string | null;
12
5
  /** Id of the currently selected deployment, or `null` when none is selected. */
13
6
  selectedItemId: string | null;
14
7
  /** JSON-schema configuration for the selected deployment, or `null` when none. */
15
8
  selectedDeploymentConfiguration: DeploymentConfigurationSchema | null;
16
- /** Translated labels. Fields not provided fall back to English defaults. */
17
- labels?: Partial<ToolsMenuLabels>;
18
- /** Icon element rendered on the tool menu item. Defaults to `null`. */
9
+ /** Icon element rendered on every tool menu item. Defaults to `null`. */
19
10
  toolIcon?: ReactNode;
20
11
  }
21
12
  /** Result returned by {@link useToolsMenu}. */
22
13
  export type UseToolsMenuResult = {
23
- /** Derived submenu items (empty until a boolean tool property is found). */
14
+ /** One item per boolean property of the deployment configuration schema, in schema order. */
24
15
  toolsMenuItems: ToolMenuItem[];
25
16
  /** Toggles the tool with the given id; ignores unknown ids. */
26
17
  onToolToggle: (id: string) => void;
@@ -30,11 +21,11 @@ export type UseToolsMenuResult = {
30
21
  restoreToolConfiguration: (configurationValue: Record<string, unknown> | undefined) => void;
31
22
  };
32
23
  /**
33
- * Derives the tools submenu from the active deployment's configuration schema
34
- * and the operator-configured tool id. Manages toggle state locally, resets on
35
- * deployment change, and exposes a stable `toolConfigurationValue` record for
36
- * inclusion in completion requests. Headless: translation and the tool icon are
37
- * the host's responsibility, supplied via `labels` and `toolIcon`.
24
+ * Derives the tools submenu from the active deployment's configuration schema:
25
+ * every boolean property becomes a toggle. Manages toggle state locally, resets
26
+ * on deployment change, and exposes a stable `toolConfigurationValue` record for
27
+ * inclusion in completion requests. Headless: the tool icon is the host's
28
+ * responsibility, supplied via `toolIcon`.
38
29
  */
39
30
  export declare const useToolsMenu: (params: UseToolsMenuParams) => UseToolsMenuResult;
40
31
  //# sourceMappingURL=useToolsMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToolsMenu.d.ts","sourceRoot":"","sources":["../../src/useToolsMenu/useToolsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gFAAgF;IAChF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kFAAkF;IAClF,+BAA+B,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACtE,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,4EAA4E;IAC5E,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wFAAwF;IACxF,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,wEAAwE;IACxE,wBAAwB,EAAE,CACxB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACpD,IAAI,CAAC;CACX,CAAC;AAMF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,kBAAkB,KACzB,kBA0FF,CAAC"}
1
+ {"version":3,"file":"useToolsMenu.d.ts","sourceRoot":"","sources":["../../src/useToolsMenu/useToolsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAE7B,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kFAAkF;IAClF,+BAA+B,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACtE,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6FAA6F;IAC7F,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wFAAwF;IACxF,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,wEAAwE;IACxE,wBAAwB,EAAE,CACxB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACpD,IAAI,CAAC;CACX,CAAC;AAuCF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,kBAAkB,KACzB,kBAuFF,CAAC"}