@epam/ai-dial-chat-hooks 1.1.0-dev.290 → 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/catalog/map-deployment-limits-to-catalog.d.ts +38 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
- package/conversation/conversation-transfer/queue.d.ts +1 -1
- package/conversation/conversation-transfer/queue.d.ts.map +1 -1
- package/conversation/conversation-transfer/types.d.ts +1 -27
- package/conversation/conversation-transfer/types.d.ts.map +1 -1
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +34 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +37 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +58 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
- package/index.d.ts +10 -0
- package/index.d.ts.map +1 -1
- package/index.js +2552 -2252
- package/package.json +14 -14
- package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
- package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
- package/shared/string-utils.d.ts +1 -8
- package/shared/string-utils.d.ts.map +1 -1
- package/skill/useSkillsState/useSkillsState.d.ts +35 -0
- package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
- package/useToolsMenu/useToolsMenu.d.ts +7 -16
- package/useToolsMenu/useToolsMenu.d.ts.map +1 -1
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.
|
|
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.
|
|
27
|
-
"@epam/ai-dial-attachment-input": "1.1.0-dev.
|
|
28
|
-
"@epam/ai-dial-catalog": "1.1.0-dev.
|
|
29
|
-
"@epam/ai-dial-chat-api-client": "1.1.0-dev.
|
|
30
|
-
"@epam/ai-dial-chat-overlay": "1.1.0-dev.
|
|
31
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
32
|
-
"@epam/ai-dial-deployment-creation-form": "1.1.0-dev.
|
|
33
|
-
"@epam/ai-dial-publish-panel": "1.1.0-dev.
|
|
34
|
-
"@epam/ai-dial-quotations": "1.1.0-dev.
|
|
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.
|
|
37
|
-
"@epam/ai-dial-share": "1.1.0-dev.
|
|
38
|
-
"@epam/ai-dial-skill-editor": "1.1.0-dev.
|
|
39
|
-
"@epam/ai-dial-source-panel": "1.1.0-dev.
|
|
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"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PromptFolderResponseDto, PromptListResponseDto, PromptResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Parameters for {@link usePromptsState}. */
|
|
3
|
+
export interface UsePromptsStateParams {
|
|
4
|
+
/** Fetches the aggregate prompt listing from the server. */
|
|
5
|
+
listPrompts: () => Promise<PromptListResponseDto>;
|
|
6
|
+
}
|
|
7
|
+
/** Result returned by {@link usePromptsState}. */
|
|
8
|
+
export interface UsePromptsStateResult {
|
|
9
|
+
/** The caller's own prompts. */
|
|
10
|
+
prompts: PromptResponseDto[];
|
|
11
|
+
/** Folders in the caller's own prompt namespace. */
|
|
12
|
+
folders: PromptFolderResponseDto[];
|
|
13
|
+
/** Prompts other users have shared with the caller. */
|
|
14
|
+
sharedWithMe: PromptResponseDto[];
|
|
15
|
+
/** Organisation-wide (public) prompts, read-only for every user. */
|
|
16
|
+
publicPrompts: PromptResponseDto[];
|
|
17
|
+
/** Folders in the organisation prompt namespace. */
|
|
18
|
+
publicFolders: PromptFolderResponseDto[];
|
|
19
|
+
/** True until the aggregate prompt listing has settled. */
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** Rejection reason of the most recent failed list request, or `null`. */
|
|
22
|
+
error: unknown;
|
|
23
|
+
/** Re-reads personal, shared-with-me, and organisation prompts. */
|
|
24
|
+
refetch: () => Promise<void>;
|
|
25
|
+
/** Compatibility alias for the aggregate refetch — same function reference as `refetch`. */
|
|
26
|
+
refetchPublicPrompts: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetches all prompt namespaces (personal, shared, public) with a single
|
|
30
|
+
* aggregate request. Exposes `refetch` / `refetchPublicPrompts` for
|
|
31
|
+
* manual refresh. Does not import any app context, routing, or i18n.
|
|
32
|
+
*/
|
|
33
|
+
export declare const usePromptsState: ({ listPrompts, }: UsePromptsStateParams) => UsePromptsStateResult;
|
|
34
|
+
//# sourceMappingURL=usePromptsState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePromptsState.d.ts","sourceRoot":"","sources":["../../../src/prompt/usePromptsState/usePromptsState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnD;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,oDAAoD;IACpD,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,oEAAoE;IACpE,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oDAAoD;IACpD,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,2DAA2D;IAC3D,SAAS,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,4FAA4F;IAC5F,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,kBAE7B,qBAAqB,KAAG,qBA6E1B,CAAC"}
|
package/shared/string-utils.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const PROHIBITED_CONVERSATION_NAME_CHARS_RE: RegExp;
|
|
3
|
-
/** Strips characters DIAL Core rejects in a conversation name. */
|
|
4
|
-
export declare const sanitizeConversationName: (name: string) => string;
|
|
5
|
-
/** Strips trailing `.` characters from a name. */
|
|
6
|
-
export declare const stripTrailingDots: (name: string) => string;
|
|
7
|
-
/** Returns the UTF-8 byte length of a string (may exceed its character/code-unit length). */
|
|
8
|
-
export declare const getUtf8ByteLength: (str: string) => number;
|
|
1
|
+
export { getUtf8ByteLength, sanitizeConversationName, stripTrailingDots, PROHIBITED_CONVERSATION_NAME_CHARS_RE, } from '@epam/ai-dial-chat-shared';
|
|
9
2
|
/** Case-insensitive substring match. */
|
|
10
3
|
export declare const includesIgnoreCase: (str: string, query: string) => boolean;
|
|
11
4
|
/** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/shared/string-utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/shared/string-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,qCAAqC,GACtC,MAAM,2BAA2B,CAAC;AAEnC,wCAAwC;AACxC,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,OACf,CAAC;AAElD,2FAA2F;AAC3F,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAM5C,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,SATC,MAAM,KAAG,MASM,CAAC;AAEpD,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MACvB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SkillCatalogListResponseDto, SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Parameters for {@link useSkillsState}. */
|
|
3
|
+
export interface UseSkillsStateParams {
|
|
4
|
+
/** Fetches the aggregate skill listing from the server. */
|
|
5
|
+
listSkills: () => Promise<SkillCatalogListResponseDto>;
|
|
6
|
+
/** Whether the Skills feature is enabled in the current overlay/tenant config. */
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
/** Whether the user session is ready for API calls (auth has settled). */
|
|
9
|
+
ready: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Result returned by {@link useSkillsState}. */
|
|
12
|
+
export interface UseSkillsStateResult {
|
|
13
|
+
/** Skills in the caller's own bucket. */
|
|
14
|
+
skills: SkillMetadataItemDto[];
|
|
15
|
+
/** Skills in the organisation bucket. */
|
|
16
|
+
publicSkills: SkillMetadataItemDto[];
|
|
17
|
+
/** Skills other users shared with the caller. */
|
|
18
|
+
sharedWithMe: SkillMetadataItemDto[];
|
|
19
|
+
/** True until the aggregate listing has settled. */
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** Rejection reason of the most recent failed listing, or `null`. */
|
|
22
|
+
error: unknown;
|
|
23
|
+
/** Re-reads personal, shared, and organisation skills. */
|
|
24
|
+
refetch: () => Promise<void>;
|
|
25
|
+
/** Upserts a single skill into the shared-with-me list by URL identity. */
|
|
26
|
+
mergeSharedSkill: (item: SkillMetadataItemDto) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetches all skill namespaces with a gated single request: clears state
|
|
30
|
+
* immediately when `enabled` is false, defers the fetch until `ready` is true,
|
|
31
|
+
* and exposes `refetch` / `mergeSharedSkill` for manual updates.
|
|
32
|
+
* Does not import any feature-flag hook, auth enum, or app context.
|
|
33
|
+
*/
|
|
34
|
+
export declare const useSkillsState: ({ listSkills, enabled, ready, }: UseSkillsStateParams) => UseSkillsStateResult;
|
|
35
|
+
//# sourceMappingURL=useSkillsState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillsState.d.ts","sourceRoot":"","sources":["../../../src/skill/useSkillsState/useSkillsState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAGvC,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,UAAU,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvD,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,yCAAyC;IACzC,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,iDAAiD;IACjD,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,KAAK,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,2EAA2E;IAC3E,gBAAgB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACxD;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,iCAI5B,oBAAoB,KAAG,oBAqFzB,CAAC"}
|
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
35
|
-
* deployment change, and exposes a stable `toolConfigurationValue` record for
|
|
36
|
-
* inclusion in completion requests. Headless:
|
|
37
|
-
*
|
|
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,
|
|
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"}
|