@nocobase/plugin-ai 2.1.0-beta.29 → 2.1.0-beta.32
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/client-v2.d.ts +1 -0
- package/client-v2.js +1 -0
- package/dist/ai/docs/nocobase/ai/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/built-in/atlas.md +24 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/dara.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/dex.md +32 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/ellis.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/index.md +25 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/lexi.md +26 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/lina.md +142 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/nathan.md +36 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/vera.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/viz.md +25 -0
- package/dist/ai/docs/nocobase/ai-employees/features/built-in-employee.md +1 -29
- package/dist/ai/docs/nocobase/ai-employees/features/collaborate.md +17 -7
- package/dist/ai/docs/nocobase/ai-employees/features/enable-ai-employee.md +4 -4
- package/dist/ai/docs/nocobase/ai-employees/features/model-settings.md +87 -0
- package/dist/ai/docs/nocobase/ai-employees/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/scenarios/localization-hy-mt.md +241 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/employee/configuration.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/api/dynamic.md +7 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/index.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/down.md +7 -3
- package/dist/ai/docs/nocobase/api/cli/app/index.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/app/logs.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/app/start.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +5 -0
- package/dist/ai/docs/nocobase/api/cli/env/add.md +11 -3
- package/dist/ai/docs/nocobase/api/cli/env/auth.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/env/current.md +29 -0
- package/dist/ai/docs/nocobase/api/cli/env/index.md +22 -4
- package/dist/ai/docs/nocobase/api/cli/env/info.md +1 -5
- package/dist/ai/docs/nocobase/api/cli/env/list.md +11 -6
- package/dist/ai/docs/nocobase/api/cli/env/remove.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/env/status.md +52 -0
- package/dist/ai/docs/nocobase/api/cli/env/update.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/env/use.md +11 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +13 -1
- package/dist/ai/docs/nocobase/api/cli/license/activate.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/license/id.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/license/plugins/clean.md +5 -1
- package/dist/ai/docs/nocobase/api/cli/license/plugins/list.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/license/plugins/sync.md +5 -1
- package/dist/ai/docs/nocobase/api/cli/license/status.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/disable.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/enable.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/list.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/session/id.md +28 -0
- package/dist/ai/docs/nocobase/api/cli/session/index.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/session/remove.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/session/setup.md +47 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-action.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-item.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/js-block.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-column.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-field.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-item.md +1 -1
- package/dist/ai/docs/nocobase/security/guide.md +13 -1
- package/dist/ai/docs/nocobase/system-management/localization/index.md +25 -1
- package/dist/client/119.c6bf8c6433167d81.js +10 -0
- package/dist/client/228.b4b709f93b86b6b9.js +10 -0
- package/dist/client/462.1708385b148779cd.js +10 -0
- package/dist/client/{486.afbed6b132b3c0dd.js → 486.dcac8f3fcec19c33.js} +1 -1
- package/dist/client/{559.39872901b9053629.js → 559.585f80c3bcea0bed.js} +1 -1
- package/dist/client/597.b0d64948d74cf6cb.js +10 -0
- package/dist/client/646.b0ed728921b007d4.js +10 -0
- package/dist/client/711.92cd94681fde7e05.js +10 -0
- package/dist/client/768.5177bff46ae71a5b.js +10 -0
- package/dist/client/792.abb57765453bcbcc.js +10 -0
- package/dist/client/820.f72ef2462b61d812.js +10 -0
- package/dist/client/927.d95c74ebb8fd51c9.js +10 -0
- package/dist/client/ai-employees/admin/ModelSettings.d.ts +10 -0
- package/dist/client/ai-employees/admin/hooks.d.ts +1 -1
- package/dist/client/ai-employees/avatars.d.ts +9 -783
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +1 -15
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +1 -21
- package/dist/client/ai-employees/chatbox/hooks/useChat.d.ts +125 -0
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +13 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -8
- package/dist/client/ai-employees/chatbox/model.d.ts +6 -3
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +4 -0
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +77 -50
- package/dist/client/ai-employees/chatbox/stores/chat-tool-call.d.ts +24 -16
- package/dist/client/ai-employees/types.d.ts +24 -0
- package/dist/client/features/vector-database-provider.d.ts +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +3 -3
- package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +1 -14
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +21 -0
- package/dist/client-v2/ai-employees/ProfileCard.d.ts +17 -0
- package/dist/client-v2/ai-employees/avatars.d.ts +783 -0
- package/dist/client-v2/ai-employees/types.d.ts +20 -0
- package/dist/client-v2/index.d.ts +17 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/llm-services/model-label.d.ts +22 -0
- package/dist/collections/ai-employees.d.ts +2 -1
- package/dist/collections/ai-employees.js +1 -1
- package/dist/externalVersion.js +17 -16
- package/dist/locale/en-US.json +16 -1
- package/dist/locale/zh-CN.json +16 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +4 -1
- package/dist/server/ai-employees/ai-conversations.js +44 -4
- package/dist/server/ai-employees/ai-employee.d.ts +31 -15
- package/dist/server/ai-employees/ai-employee.js +205 -52
- package/dist/server/ai-employees/ai-employees-manager.d.ts +4 -0
- package/dist/server/ai-employees/ai-employees-manager.js +41 -0
- package/dist/server/ai-employees/ai-knowledge-base.js +7 -7
- package/dist/server/ai-employees/middleware/conversation.d.ts +1 -0
- package/dist/server/ai-employees/middleware/conversation.js +15 -11
- package/dist/server/ai-employees/sub-agents/dispatcher.js +2 -4
- package/dist/server/ai-employees/utils.d.ts +6 -3
- package/dist/server/ai-employees/utils.js +7 -1
- package/dist/server/collections/ai-conversations.js +6 -0
- package/dist/server/features/knowledge-base.d.ts +3 -2
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +3 -0
- package/dist/server/llm-providers/common/reasoning.d.ts +2 -0
- package/dist/server/llm-providers/common/reasoning.js +15 -2
- package/dist/server/llm-providers/dashscope.d.ts +2 -1
- package/dist/server/llm-providers/dashscope.js +39 -0
- package/dist/server/llm-providers/deepseek.js +2 -0
- package/dist/server/llm-providers/provider.d.ts +15 -1
- package/dist/server/llm-providers/provider.js +21 -2
- package/dist/server/manager/ai-chat-conversation.js +3 -4
- package/dist/server/manager/ai-manager.d.ts +17 -0
- package/dist/server/manager/ai-manager.js +65 -0
- package/dist/server/manager/llm-stream-manager.d.ts +37 -0
- package/dist/server/manager/llm-stream-manager.js +142 -0
- package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.d.ts +14 -0
- package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.js +61 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +3 -0
- package/dist/server/resource/ai.js +1 -41
- package/dist/server/resource/aiConversations.d.ts +8 -0
- package/dist/server/resource/aiConversations.js +141 -10
- package/dist/server/resource/aiEmployees.js +32 -1
- package/dist/server/types/knowledge-base.type.d.ts +3 -2
- package/dist/server/workflow/nodes/employee/index.js +4 -2
- package/package.json +2 -2
- package/dist/client/119.78774f3ad953af49.js +0 -10
- package/dist/client/228.a3df2921c8beb766.js +0 -10
- package/dist/client/343.6f36d97dd122c5b6.js +0 -10
- package/dist/client/597.aa363881a325b5c0.js +0 -10
- package/dist/client/646.217a40387efbd163.js +0 -10
- package/dist/client/711.266b8f1c520d467a.js +0 -10
- package/dist/client/768.973ce32e15099a48.js +0 -10
- package/dist/client/792.2e48eab4767d662a.js +0 -10
- package/dist/client/820.6a26239ea96c075a.js +0 -10
- package/dist/client/927.ff5cd05b14901ae6.js +0 -10
|
@@ -8,20 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { ModelRef } from '../stores/chat-box';
|
|
11
|
-
type UseConversationsListOptions = {
|
|
12
|
-
onOpenConversation: (sessionId: string, username?: string, model?: ModelRef) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare const useConversationsList: ({ onOpenConversation }: UseConversationsListOptions) => {
|
|
15
|
-
currentConversation: string;
|
|
16
|
-
items: import("@ant-design/x/es/conversations").Conversation[];
|
|
17
|
-
onSelectConversation: (sessionId: string) => void;
|
|
18
|
-
attachLastConversationObserver: (container: HTMLDivElement | null) => void;
|
|
19
|
-
openDeleteConfirm: (sessionId: string) => void;
|
|
20
|
-
runSearch: (keyword?: string) => void;
|
|
21
|
-
refresh: () => void;
|
|
22
|
-
};
|
|
23
|
-
export type ConversationsListController = ReturnType<typeof useConversationsList>;
|
|
24
11
|
export declare const ConversationsList: React.FC<{
|
|
25
|
-
|
|
12
|
+
onOpenConversation: (sessionId: string, username?: string, model?: ModelRef) => void;
|
|
26
13
|
}>;
|
|
27
|
-
export {};
|
|
@@ -8,26 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { ModelRef } from '../stores/chat-box';
|
|
11
|
-
type UseWorkflowTasksListOptions = {
|
|
12
|
-
onOpenConversation: (sessionId: string, username?: string, model?: ModelRef) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare const useWorkflowTasksList: ({ onOpenConversation }: UseWorkflowTasksListOptions) => {
|
|
15
|
-
currentConversation: string;
|
|
16
|
-
selectedConversation: string;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
workflowTasks: import("./common").WorkflowTask[];
|
|
19
|
-
unreadCount: number;
|
|
20
|
-
selectedJobStatus: number;
|
|
21
|
-
onSelectWorkflowTask: (sessionId: string) => Promise<void>;
|
|
22
|
-
runSearch: (nextKeyword?: string) => void;
|
|
23
|
-
runJobStatusFilter: (nextJobStatus?: number) => void;
|
|
24
|
-
refresh: () => void;
|
|
25
|
-
hasMore: boolean;
|
|
26
|
-
loadMoreWorkflowTasks: () => Promise<void>;
|
|
27
|
-
lastWorkflowTaskRef: (node: HTMLElement) => void;
|
|
28
|
-
};
|
|
29
|
-
export type WorkflowTasksListController = ReturnType<typeof useWorkflowTasksList>;
|
|
30
11
|
export declare const WorkflowTasksList: React.FC<{
|
|
31
|
-
|
|
12
|
+
onOpenConversation: (sessionId: string, username?: string, model?: ModelRef) => void;
|
|
32
13
|
}>;
|
|
33
|
-
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { EditorRef } from '@nocobase/client';
|
|
10
|
+
import { Attachment, ContextItem, Message, SkillSettings, WebSearching } from '../../types';
|
|
11
|
+
import { ChatSessionState } from '../stores/chat-messages';
|
|
12
|
+
type MessagesMeta = ChatSessionState['messagesMeta'];
|
|
13
|
+
export declare const useChat: (sessionId?: string) => {
|
|
14
|
+
use: {
|
|
15
|
+
messages: () => Message[];
|
|
16
|
+
messagesLoading: () => boolean;
|
|
17
|
+
messagesError: () => any;
|
|
18
|
+
messagesMeta: () => {
|
|
19
|
+
cursor?: string;
|
|
20
|
+
hasMore?: boolean;
|
|
21
|
+
};
|
|
22
|
+
attachments: () => any[];
|
|
23
|
+
contextItems: () => ContextItem[];
|
|
24
|
+
systemMessage: () => string;
|
|
25
|
+
responseLoading: () => boolean;
|
|
26
|
+
backgroundWorking: () => boolean;
|
|
27
|
+
resumeStreamFailed: () => boolean;
|
|
28
|
+
abortController: () => AbortController;
|
|
29
|
+
skillSettings: () => SkillSettings;
|
|
30
|
+
webSearching: () => WebSearching;
|
|
31
|
+
editorRef: () => Record<string, EditorRef>;
|
|
32
|
+
currentEditorRefUid: () => string;
|
|
33
|
+
flowContext: () => any;
|
|
34
|
+
};
|
|
35
|
+
getState: () => {
|
|
36
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
37
|
+
setMessagesLoading: (loading: boolean) => void;
|
|
38
|
+
setMessagesError: (error: any) => void;
|
|
39
|
+
setMessagesMeta: (meta: {
|
|
40
|
+
cursor?: string;
|
|
41
|
+
hasMore?: boolean;
|
|
42
|
+
} | ((prev: MessagesMeta) => MessagesMeta)) => void;
|
|
43
|
+
setAttachments: (attachments: any[] | ((prev: Attachment[]) => Attachment[])) => void;
|
|
44
|
+
setContextItems: (items: ContextItem[] | ((prev: ContextItem[]) => ContextItem[])) => void;
|
|
45
|
+
setSystemMessage: (msg: string | ((prev: string) => string)) => void;
|
|
46
|
+
setResponseLoading: (loading: boolean) => void;
|
|
47
|
+
setBackgroundWorking: (backgroundWorking: boolean) => void;
|
|
48
|
+
setResumeStreamFailed: (resumeStreamFailed: boolean) => void;
|
|
49
|
+
addMessage: (msg: Message) => void;
|
|
50
|
+
addMessages: (msgs: Message[]) => void;
|
|
51
|
+
updateLastMessage: (updater: (msg: Message) => Message) => void;
|
|
52
|
+
removeMessage: (key: string) => void;
|
|
53
|
+
addAttachments: (attachments: Attachment | Attachment[]) => void;
|
|
54
|
+
removeAttachment: (filename: string) => void;
|
|
55
|
+
addContextItems: (items: ContextItem | ContextItem[]) => void;
|
|
56
|
+
removeContextItem: (type: string, uid: string) => void;
|
|
57
|
+
setAbortController: (controller: AbortController | undefined) => void;
|
|
58
|
+
setSkillSettings: (settings: SkillSettings | undefined) => void;
|
|
59
|
+
setWebSearching: (webSearching: WebSearching) => void;
|
|
60
|
+
addSubAgentMessage: (subSessionId: string, msg: Message) => void;
|
|
61
|
+
addSubAgentMessages: (subSessionId: string, msgs: Message[]) => void;
|
|
62
|
+
updateLastSubAgentMessage: (subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
63
|
+
updateSubAgentConversationStatus: (subSessionId: string, status: 'pending' | 'completed') => void;
|
|
64
|
+
setEditorRef: (uid: string, editorRef: EditorRef) => void;
|
|
65
|
+
setCurrentEditorRefUid: (uid: string) => void;
|
|
66
|
+
setFlowContext: (flowContext: any) => void;
|
|
67
|
+
migrateSessionState: (toSessionId: string) => void;
|
|
68
|
+
resetSessionState: (patch?: Partial<ChatSessionState>) => void;
|
|
69
|
+
editorRef: Record<string, EditorRef>;
|
|
70
|
+
currentEditorRefUid: string;
|
|
71
|
+
flowContext: any;
|
|
72
|
+
messages: Message[];
|
|
73
|
+
messagesLoading: boolean;
|
|
74
|
+
messagesError?: any;
|
|
75
|
+
messagesMeta: {
|
|
76
|
+
cursor?: string;
|
|
77
|
+
hasMore?: boolean;
|
|
78
|
+
};
|
|
79
|
+
attachments: any[];
|
|
80
|
+
contextItems: ContextItem[];
|
|
81
|
+
systemMessage: string;
|
|
82
|
+
responseLoading: boolean;
|
|
83
|
+
abortController?: AbortController;
|
|
84
|
+
skillSettings?: SkillSettings;
|
|
85
|
+
webSearching?: WebSearching;
|
|
86
|
+
backgroundWorking: boolean;
|
|
87
|
+
resumeStreamFailed: boolean;
|
|
88
|
+
};
|
|
89
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
90
|
+
setMessagesLoading: (loading: boolean) => void;
|
|
91
|
+
setMessagesError: (error: any) => void;
|
|
92
|
+
setMessagesMeta: (meta: {
|
|
93
|
+
cursor?: string;
|
|
94
|
+
hasMore?: boolean;
|
|
95
|
+
} | ((prev: MessagesMeta) => MessagesMeta)) => void;
|
|
96
|
+
setAttachments: (attachments: any[] | ((prev: Attachment[]) => Attachment[])) => void;
|
|
97
|
+
setContextItems: (items: ContextItem[] | ((prev: ContextItem[]) => ContextItem[])) => void;
|
|
98
|
+
setSystemMessage: (msg: string | ((prev: string) => string)) => void;
|
|
99
|
+
setResponseLoading: (loading: boolean) => void;
|
|
100
|
+
setBackgroundWorking: (backgroundWorking: boolean) => void;
|
|
101
|
+
setResumeStreamFailed: (resumeStreamFailed: boolean) => void;
|
|
102
|
+
addMessage: (msg: Message) => void;
|
|
103
|
+
addMessages: (msgs: Message[]) => void;
|
|
104
|
+
updateLastMessage: (updater: (msg: Message) => Message) => void;
|
|
105
|
+
removeMessage: (key: string) => void;
|
|
106
|
+
addAttachments: (attachments: Attachment | Attachment[]) => void;
|
|
107
|
+
removeAttachment: (filename: string) => void;
|
|
108
|
+
addContextItems: (items: ContextItem | ContextItem[]) => void;
|
|
109
|
+
removeContextItem: (type: string, uid: string) => void;
|
|
110
|
+
setAbortController: (controller: AbortController | undefined) => void;
|
|
111
|
+
setSkillSettings: (settings: SkillSettings | undefined) => void;
|
|
112
|
+
setWebSearching: (webSearching: WebSearching) => void;
|
|
113
|
+
addSubAgentMessage: (subSessionId: string, msg: Message) => void;
|
|
114
|
+
addSubAgentMessages: (subSessionId: string, msgs: Message[]) => void;
|
|
115
|
+
updateLastSubAgentMessage: (subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
116
|
+
updateSubAgentConversationStatus: (subSessionId: string, status: 'pending' | 'completed') => void;
|
|
117
|
+
setEditorRef: (uid: string, editorRef: EditorRef) => void;
|
|
118
|
+
setCurrentEditorRefUid: (uid: string) => void;
|
|
119
|
+
setFlowContext: (flowContext: any) => void;
|
|
120
|
+
migrateSessionState: (toSessionId: string) => void;
|
|
121
|
+
resetSessionState: (patch?: Partial<ChatSessionState>) => void;
|
|
122
|
+
sessionKey: string;
|
|
123
|
+
for: (targetSessionId?: string) => any;
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { AIEmployee, ClearOptions, SendOptions, TriggerTaskOptions } from '../../types';
|
|
10
10
|
export declare const useChatBoxActions: () => {
|
|
11
|
-
clear: (options?: ClearOptions) => void;
|
|
11
|
+
clear: (options?: ClearOptions, sessionId?: string | undefined) => void;
|
|
12
12
|
send: (options: SendOptions) => void;
|
|
13
13
|
startNewConversation: () => void;
|
|
14
14
|
switchAIEmployee: (aiEmployee: AIEmployee, options?: {
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Conversation } from '../../types';
|
|
10
10
|
export declare const useChatConversationActions: () => {
|
|
11
|
-
conversationsService: import("@nocobase/client").UseRequestResult<
|
|
11
|
+
conversationsService: import("@nocobase/client").UseRequestResult<{
|
|
12
|
+
data: Conversation[];
|
|
13
|
+
meta: {
|
|
14
|
+
count: number;
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
totalPage: number;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
loadUnreadCounts: () => Promise<void>;
|
|
12
21
|
lastConversationRef: (node: HTMLElement) => void;
|
|
22
|
+
runSearch: (keyword?: string) => void;
|
|
23
|
+
refresh: () => void;
|
|
24
|
+
unreadCount: number;
|
|
13
25
|
};
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { AIEmployee,
|
|
9
|
+
import { AIEmployee, ResendOptions, SendOptions } from '../../types';
|
|
10
10
|
import { ContextItem } from '../../types';
|
|
11
11
|
export declare const useChatMessageActions: () => {
|
|
12
12
|
syncContextAttachments: (items: ContextItem | ContextItem[]) => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
meta: {
|
|
16
|
-
cursor?: string;
|
|
17
|
-
hasMore?: boolean;
|
|
18
|
-
};
|
|
19
|
-
}>;
|
|
13
|
+
loadMessages: (sessionId?: string, cursor?: string) => Promise<void>;
|
|
14
|
+
loadMoreMessages: () => Promise<void>;
|
|
20
15
|
sendMessages: ({ sessionId, aiEmployee, systemMessage, messages: sendMsgs, attachments, workContext, editingMessageId, onConversationCreate, skillSettings, webSearch, model: inputModel, }: SendOptions & {
|
|
21
16
|
onConversationCreate?: (sessionId: string) => void;
|
|
22
17
|
}) => Promise<void>;
|
|
23
18
|
resendMessages: ({ sessionId, messageId, aiEmployee, important }: ResendOptions) => Promise<void>;
|
|
19
|
+
resumeStream: ({ sessionId, aiEmployee }: {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
aiEmployee: AIEmployee;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
getConversationLLMActiveState: (sessionId: string) => Promise<string | undefined>;
|
|
24
24
|
cancelRequest: () => Promise<void>;
|
|
25
25
|
resumeToolCall: ({ sessionId, messageId, aiEmployee, toolCallIds, toolCallResults, }: {
|
|
26
26
|
sessionId: string;
|
|
@@ -8,15 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { AIConfigRepository, LLMServiceItem } from '../../repositories/AIConfigRepository';
|
|
10
10
|
import { ModelRef } from './stores/chat-box';
|
|
11
|
+
import type { AIEmployee } from '../types';
|
|
11
12
|
export declare const MODEL_PREFERENCE_STORAGE_KEY = "ai_model_preference_";
|
|
12
13
|
export declare const getAllModels: (services: LLMServiceItem[]) => ModelRef[];
|
|
13
14
|
export declare const isValidModel: (value: ModelRef | null | undefined, allModels: ModelRef[]) => boolean;
|
|
14
15
|
export declare const isSameModel: (a?: ModelRef | null, b?: ModelRef | null) => boolean;
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const getAIEmployeeConfiguredModels: (aiEmployee: AIEmployee | null | undefined) => ModelRef[];
|
|
17
|
+
export declare const getAIEmployeeModels: (aiEmployee: AIEmployee | null | undefined, allModels: ModelRef[]) => ModelRef[];
|
|
18
|
+
export declare const resolveModel: (api: any, aiEmployee: AIEmployee | null | undefined, allModels: ModelRef[], currentOverride?: ModelRef | null) => ModelRef;
|
|
19
|
+
export declare const ensureModel: ({ api, aiConfigRepository, aiEmployee, currentOverride, onResolved, }: {
|
|
17
20
|
api: any;
|
|
18
21
|
aiConfigRepository: AIConfigRepository;
|
|
19
|
-
|
|
22
|
+
aiEmployee?: AIEmployee | null;
|
|
20
23
|
currentOverride?: ModelRef | null;
|
|
21
24
|
onResolved?: (override: ModelRef | null) => void;
|
|
22
25
|
}) => Promise<ModelRef | null>;
|
|
@@ -13,6 +13,7 @@ interface ChatConversationsState {
|
|
|
13
13
|
keyword: string;
|
|
14
14
|
webSearch: boolean;
|
|
15
15
|
conversationSegmented: string;
|
|
16
|
+
unreadCount: number;
|
|
16
17
|
}
|
|
17
18
|
interface ChatConversationsActions {
|
|
18
19
|
setCurrentConversation: (id: string | undefined) => void;
|
|
@@ -20,6 +21,7 @@ interface ChatConversationsActions {
|
|
|
20
21
|
setConversations: (conversations: Conversation[] | ((prev: Conversation[]) => Conversation[])) => void;
|
|
21
22
|
setWebSearch: (webSearch: boolean) => void;
|
|
22
23
|
setConversationSegmented: (conversationSegmented: string) => void;
|
|
24
|
+
setUnreadCount: (unreadCount: number | ((prev: number) => number)) => void;
|
|
23
25
|
}
|
|
24
26
|
export declare const useChatConversationsStore: {
|
|
25
27
|
(): ChatConversationsState & ChatConversationsActions;
|
|
@@ -31,11 +33,13 @@ export declare const useChatConversationsStore: {
|
|
|
31
33
|
keyword: () => string;
|
|
32
34
|
webSearch: () => boolean;
|
|
33
35
|
conversationSegmented: () => string;
|
|
36
|
+
unreadCount: () => number;
|
|
34
37
|
setCurrentConversation: () => (id: string | undefined) => void;
|
|
35
38
|
setKeyword: () => (keyword: string) => void;
|
|
36
39
|
setConversations: () => (conversations: Conversation[] | ((prev: Conversation[]) => Conversation[])) => void;
|
|
37
40
|
setWebSearch: () => (webSearch: boolean) => void;
|
|
38
41
|
setConversationSegmented: () => (conversationSegmented: string) => void;
|
|
42
|
+
setUnreadCount: () => (unreadCount: number | ((prev: number) => number)) => void;
|
|
39
43
|
};
|
|
40
44
|
};
|
|
41
45
|
export {};
|
|
@@ -8,83 +8,110 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Message, Attachment, ContextItem, SkillSettings, WebSearching } from '../../types';
|
|
10
10
|
import { EditorRef } from '@nocobase/client';
|
|
11
|
-
|
|
11
|
+
export declare const CHAT_DEFAULT_SESSION_KEY = "__draft__";
|
|
12
|
+
export declare const getChatSessionKey: (sessionId?: string) => string;
|
|
13
|
+
export type ChatSessionState = {
|
|
12
14
|
messages: Message[];
|
|
15
|
+
messagesLoading: boolean;
|
|
16
|
+
messagesError?: any;
|
|
17
|
+
messagesMeta: {
|
|
18
|
+
cursor?: string;
|
|
19
|
+
hasMore?: boolean;
|
|
20
|
+
};
|
|
13
21
|
attachments: Attachment[];
|
|
14
22
|
contextItems: ContextItem[];
|
|
15
23
|
systemMessage: string;
|
|
16
24
|
responseLoading: boolean;
|
|
17
25
|
abortController?: AbortController;
|
|
18
26
|
skillSettings?: SkillSettings;
|
|
27
|
+
webSearching?: WebSearching;
|
|
28
|
+
backgroundWorking: boolean;
|
|
29
|
+
resumeStreamFailed: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const CHAT_EMPTY_SESSION_STATE: ChatSessionState;
|
|
32
|
+
type ChatMessagesState = {
|
|
33
|
+
sessions: Record<string, ChatSessionState>;
|
|
19
34
|
editorRef?: Record<string, EditorRef>;
|
|
20
35
|
currentEditorRefUid?: string;
|
|
21
|
-
webSearching?: WebSearching;
|
|
22
36
|
flowContext?: any;
|
|
23
37
|
};
|
|
38
|
+
type SessionStateUpdater<T> = T | ((prev: T) => T);
|
|
24
39
|
export interface ChatMessagesActions {
|
|
25
|
-
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
26
|
-
setAttachments: (attachments: Attachment[] | ((prev: Attachment[]) => Attachment[])) => void;
|
|
27
|
-
setContextItems: (items: ContextItem[] | ((prev: ContextItem[]) => ContextItem[])) => void;
|
|
28
|
-
setSystemMessage: (msg: string | ((prev: string) => string)) => void;
|
|
29
|
-
setResponseLoading: (loading: boolean) => void;
|
|
30
|
-
addMessage: (msg: Message) => void;
|
|
31
|
-
addMessages: (msgs: Message[]) => void;
|
|
32
|
-
updateLastMessage: (updater: (msg: Message) => Message) => void;
|
|
33
|
-
removeMessage: (key: string) => void;
|
|
34
|
-
addAttachments: (attachments: Attachment | Attachment[]) => void;
|
|
35
|
-
removeAttachment: (filename: string) => void;
|
|
36
|
-
addContextItems: (items: ContextItem | ContextItem[]) => void;
|
|
37
|
-
removeContextItem: (type: string, uid: string) => void;
|
|
38
|
-
setAbortController: (controller: AbortController | undefined) => void;
|
|
39
|
-
setSkillSettings: (settings: SkillSettings | undefined) => void;
|
|
40
40
|
setEditorRef: (uid: string, editorRef: EditorRef) => void;
|
|
41
41
|
setCurrentEditorRefUid: (uid: string) => void;
|
|
42
|
-
setWebSearching: (webSearching: WebSearching) => void;
|
|
43
42
|
setFlowContext: (ctx: any) => void;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
getSessionState: (sessionId?: string) => ChatSessionState;
|
|
44
|
+
resetSessionState: (sessionId?: string, patch?: Partial<ChatSessionState>) => void;
|
|
45
|
+
migrateSessionState: (fromSessionId: string | undefined, toSessionId: string) => void;
|
|
46
|
+
setSessionMessages: (sessionId: string | undefined, messages: SessionStateUpdater<Message[]>) => void;
|
|
47
|
+
setSessionMessagesLoading: (sessionId: string | undefined, loading: boolean) => void;
|
|
48
|
+
setSessionMessagesError: (sessionId: string | undefined, error: any) => void;
|
|
49
|
+
setSessionMessagesMeta: (sessionId: string | undefined, meta: ChatSessionState['messagesMeta'] | ((prev: ChatSessionState['messagesMeta']) => ChatSessionState['messagesMeta'])) => void;
|
|
50
|
+
setSessionAttachments: (sessionId: string | undefined, attachments: SessionStateUpdater<Attachment[]>) => void;
|
|
51
|
+
setSessionContextItems: (sessionId: string | undefined, items: SessionStateUpdater<ContextItem[]>) => void;
|
|
52
|
+
setSessionSystemMessage: (sessionId: string | undefined, msg: string | ((prev: string) => string)) => void;
|
|
53
|
+
setSessionResponseLoading: (sessionId: string | undefined, loading: boolean) => void;
|
|
54
|
+
setSessionBackgroundWorking: (sessionId: string | undefined, backgroundWorking: boolean) => void;
|
|
55
|
+
setSessionResumeStreamFailed: (sessionId: string | undefined, resumeStreamFailed: boolean) => void;
|
|
56
|
+
addSessionMessage: (sessionId: string | undefined, msg: Message) => void;
|
|
57
|
+
addSessionMessages: (sessionId: string | undefined, msgs: Message[]) => void;
|
|
58
|
+
updateSessionLastMessage: (sessionId: string | undefined, updater: (msg: Message) => Message) => void;
|
|
59
|
+
removeSessionMessage: (sessionId: string | undefined, key: string) => void;
|
|
60
|
+
addSessionAttachments: (sessionId: string | undefined, attachments: Attachment | Attachment[]) => void;
|
|
61
|
+
removeSessionAttachment: (sessionId: string | undefined, filename: string) => void;
|
|
62
|
+
addSessionContextItems: (sessionId: string | undefined, items: ContextItem | ContextItem[]) => void;
|
|
63
|
+
removeSessionContextItem: (sessionId: string | undefined, type: string, uid: string) => void;
|
|
64
|
+
setSessionAbortController: (sessionId: string | undefined, controller: AbortController | undefined) => void;
|
|
65
|
+
setSessionSkillSettings: (sessionId: string | undefined, settings: SkillSettings | undefined) => void;
|
|
66
|
+
setSessionWebSearching: (sessionId: string | undefined, webSearching: WebSearching) => void;
|
|
67
|
+
addSessionSubAgentMessage: (sessionId: string | undefined, subSessionId: string, msg: Message) => void;
|
|
68
|
+
addSessionSubAgentMessages: (sessionId: string | undefined, subSessionId: string, msgs: Message[]) => void;
|
|
69
|
+
updateSessionLastSubAgentMessage: (sessionId: string | undefined, subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
70
|
+
updateSessionSubAgentConversationStatus: (sessionId: string | undefined, subSessionId: string, status: 'pending' | 'completed') => void;
|
|
48
71
|
}
|
|
49
72
|
export declare const useChatMessagesStore: {
|
|
50
73
|
(): ChatMessagesState & ChatMessagesActions;
|
|
51
74
|
<U>(selector: (state: ChatMessagesState & ChatMessagesActions) => U): U;
|
|
52
75
|
} & import("zustand").StoreApi<ChatMessagesState & ChatMessagesActions> & {
|
|
53
76
|
use: {
|
|
54
|
-
|
|
55
|
-
attachments: () => any[];
|
|
56
|
-
contextItems: () => ContextItem[];
|
|
57
|
-
systemMessage: () => string;
|
|
58
|
-
responseLoading: () => boolean;
|
|
59
|
-
abortController?: () => AbortController;
|
|
60
|
-
skillSettings?: () => SkillSettings;
|
|
77
|
+
sessions: () => Record<string, ChatSessionState>;
|
|
61
78
|
editorRef?: () => Record<string, EditorRef>;
|
|
62
79
|
currentEditorRefUid?: () => string;
|
|
63
|
-
webSearching?: () => WebSearching;
|
|
64
80
|
flowContext?: () => any;
|
|
65
|
-
setMessages: () => (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
66
|
-
setAttachments: () => (attachments: any[] | ((prev: Attachment[]) => Attachment[])) => void;
|
|
67
|
-
setContextItems: () => (items: ContextItem[] | ((prev: ContextItem[]) => ContextItem[])) => void;
|
|
68
|
-
setSystemMessage: () => (msg: string | ((prev: string) => string)) => void;
|
|
69
|
-
setResponseLoading: () => (loading: boolean) => void;
|
|
70
|
-
addMessage: () => (msg: Message) => void;
|
|
71
|
-
addMessages: () => (msgs: Message[]) => void;
|
|
72
|
-
updateLastMessage: () => (updater: (msg: Message) => Message) => void;
|
|
73
|
-
removeMessage: () => (key: string) => void;
|
|
74
|
-
addAttachments: () => (attachments: Attachment | Attachment[]) => void;
|
|
75
|
-
removeAttachment: () => (filename: string) => void;
|
|
76
|
-
addContextItems: () => (items: ContextItem | ContextItem[]) => void;
|
|
77
|
-
removeContextItem: () => (type: string, uid: string) => void;
|
|
78
|
-
setAbortController: () => (controller: AbortController | undefined) => void;
|
|
79
|
-
setSkillSettings: () => (settings: SkillSettings | undefined) => void;
|
|
80
81
|
setEditorRef: () => (uid: string, editorRef: EditorRef) => void;
|
|
81
82
|
setCurrentEditorRefUid: () => (uid: string) => void;
|
|
82
|
-
setWebSearching: () => (webSearching: WebSearching) => void;
|
|
83
83
|
setFlowContext: () => (ctx: any) => void;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
getSessionState: () => (sessionId?: string) => ChatSessionState;
|
|
85
|
+
resetSessionState: () => (sessionId?: string, patch?: Partial<ChatSessionState>) => void;
|
|
86
|
+
migrateSessionState: () => (fromSessionId: string | undefined, toSessionId: string) => void;
|
|
87
|
+
setSessionMessages: () => (sessionId: string | undefined, messages: SessionStateUpdater<Message[]>) => void;
|
|
88
|
+
setSessionMessagesLoading: () => (sessionId: string | undefined, loading: boolean) => void;
|
|
89
|
+
setSessionMessagesError: () => (sessionId: string | undefined, error: any) => void;
|
|
90
|
+
setSessionMessagesMeta: () => (sessionId: string | undefined, meta: {
|
|
91
|
+
cursor?: string;
|
|
92
|
+
hasMore?: boolean;
|
|
93
|
+
} | ((prev: ChatSessionState['messagesMeta']) => ChatSessionState['messagesMeta'])) => void;
|
|
94
|
+
setSessionAttachments: () => (sessionId: string | undefined, attachments: SessionStateUpdater<Attachment[]>) => void;
|
|
95
|
+
setSessionContextItems: () => (sessionId: string | undefined, items: SessionStateUpdater<ContextItem[]>) => void;
|
|
96
|
+
setSessionSystemMessage: () => (sessionId: string | undefined, msg: string | ((prev: string) => string)) => void;
|
|
97
|
+
setSessionResponseLoading: () => (sessionId: string | undefined, loading: boolean) => void;
|
|
98
|
+
setSessionBackgroundWorking: () => (sessionId: string | undefined, backgroundWorking: boolean) => void;
|
|
99
|
+
setSessionResumeStreamFailed: () => (sessionId: string | undefined, resumeStreamFailed: boolean) => void;
|
|
100
|
+
addSessionMessage: () => (sessionId: string | undefined, msg: Message) => void;
|
|
101
|
+
addSessionMessages: () => (sessionId: string | undefined, msgs: Message[]) => void;
|
|
102
|
+
updateSessionLastMessage: () => (sessionId: string | undefined, updater: (msg: Message) => Message) => void;
|
|
103
|
+
removeSessionMessage: () => (sessionId: string | undefined, key: string) => void;
|
|
104
|
+
addSessionAttachments: () => (sessionId: string | undefined, attachments: Attachment | Attachment[]) => void;
|
|
105
|
+
removeSessionAttachment: () => (sessionId: string | undefined, filename: string) => void;
|
|
106
|
+
addSessionContextItems: () => (sessionId: string | undefined, items: ContextItem | ContextItem[]) => void;
|
|
107
|
+
removeSessionContextItem: () => (sessionId: string | undefined, type: string, uid: string) => void;
|
|
108
|
+
setSessionAbortController: () => (sessionId: string | undefined, controller: AbortController | undefined) => void;
|
|
109
|
+
setSessionSkillSettings: () => (sessionId: string | undefined, settings: SkillSettings | undefined) => void;
|
|
110
|
+
setSessionWebSearching: () => (sessionId: string | undefined, webSearching: WebSearching) => void;
|
|
111
|
+
addSessionSubAgentMessage: () => (sessionId: string | undefined, subSessionId: string, msg: Message) => void;
|
|
112
|
+
addSessionSubAgentMessages: () => (sessionId: string | undefined, subSessionId: string, msgs: Message[]) => void;
|
|
113
|
+
updateSessionLastSubAgentMessage: () => (sessionId: string | undefined, subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
114
|
+
updateSessionSubAgentConversationStatus: () => (sessionId: string | undefined, subSessionId: string, status: 'pending' | 'completed') => void;
|
|
88
115
|
};
|
|
89
116
|
};
|
|
90
117
|
export {};
|
|
@@ -6,31 +6,39 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
type ToolCallInvokeState = {
|
|
10
|
+
id: string;
|
|
11
|
+
invokeStatus: string;
|
|
12
|
+
};
|
|
13
|
+
export type ChatToolCallSessionState = {
|
|
14
|
+
toolCalls: Record<string, ToolCallInvokeState[]>;
|
|
15
|
+
};
|
|
16
|
+
export declare const CHAT_EMPTY_TOOL_CALL_SESSION_STATE: ChatToolCallSessionState;
|
|
9
17
|
type ChatToolCallState = {
|
|
10
|
-
|
|
11
|
-
id: string;
|
|
12
|
-
invokeStatus: string;
|
|
13
|
-
}[]>;
|
|
18
|
+
sessions: Record<string, ChatToolCallSessionState>;
|
|
14
19
|
};
|
|
15
20
|
export interface ChatToolCallActions {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
getSessionState: (sessionId: string) => ChatToolCallSessionState;
|
|
22
|
+
resetSessionState: (sessionId: string) => void;
|
|
23
|
+
migrateSessionState: (fromSessionId: string, toSessionId: string) => void;
|
|
24
|
+
updateToolCallInvokeStatus: (sessionId: string, messageId: string, toolCallId: string, invokeStatus: string) => void;
|
|
25
|
+
isAllWaiting: (sessionId: string, messageId: string) => boolean;
|
|
26
|
+
isInterrupted: (sessionId: string, messageId: string, toolCallId: string) => boolean;
|
|
27
|
+
getInvokeStatus: (sessionId: string, messageId: string, toolCallId: string) => string | undefined;
|
|
20
28
|
}
|
|
21
29
|
export declare const useChatToolCallStore: {
|
|
22
30
|
(): ChatToolCallState & ChatToolCallActions;
|
|
23
31
|
<U>(selector: (state: ChatToolCallState & ChatToolCallActions) => U): U;
|
|
24
32
|
} & import("zustand").StoreApi<ChatToolCallState & ChatToolCallActions> & {
|
|
25
33
|
use: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
updateToolCallInvokeStatus: () => (messageId: string, toolCallId: string, invokeStatus: string) => void;
|
|
31
|
-
isAllWaiting: () => (messageId: string) => boolean;
|
|
32
|
-
isInterrupted: () => (messageId: string, toolCallId: string) => boolean;
|
|
33
|
-
getInvokeStatus: () => (messageId: string, toolCallId: string) => string;
|
|
34
|
+
sessions: () => Record<string, ChatToolCallSessionState>;
|
|
35
|
+
getSessionState: () => (sessionId: string) => ChatToolCallSessionState;
|
|
36
|
+
resetSessionState: () => (sessionId: string) => void;
|
|
37
|
+
migrateSessionState: () => (fromSessionId: string, toSessionId: string) => void;
|
|
38
|
+
updateToolCallInvokeStatus: () => (sessionId: string, messageId: string, toolCallId: string, invokeStatus: string) => void;
|
|
39
|
+
isAllWaiting: () => (sessionId: string, messageId: string) => boolean;
|
|
40
|
+
isInterrupted: () => (sessionId: string, messageId: string, toolCallId: string) => boolean;
|
|
41
|
+
getInvokeStatus: () => (sessionId: string, messageId: string, toolCallId: string) => string | undefined;
|
|
34
42
|
};
|
|
35
43
|
};
|
|
36
44
|
export {};
|
|
@@ -30,11 +30,26 @@ export type AIEmployee = {
|
|
|
30
30
|
}[];
|
|
31
31
|
skills?: string[];
|
|
32
32
|
};
|
|
33
|
+
chatSettings?: {
|
|
34
|
+
systemPromptMode?: 'default' | 'raw' | 'none';
|
|
35
|
+
enableSkills?: boolean;
|
|
36
|
+
enableTools?: boolean;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
};
|
|
33
39
|
builtIn?: boolean;
|
|
34
40
|
webSearch?: boolean;
|
|
35
41
|
toolsConflict?: boolean;
|
|
36
42
|
category?: string;
|
|
37
43
|
deprecated?: boolean;
|
|
44
|
+
modelSettings?: {
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
llmService?: string;
|
|
47
|
+
model?: string;
|
|
48
|
+
models?: {
|
|
49
|
+
llmService?: string;
|
|
50
|
+
model?: string;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
38
53
|
};
|
|
39
54
|
export type SkillSettings = {
|
|
40
55
|
toolsVersion?: number;
|
|
@@ -47,6 +62,14 @@ export type Conversation = {
|
|
|
47
62
|
title: string;
|
|
48
63
|
updatedAt: string;
|
|
49
64
|
aiEmployee: AIEmployee;
|
|
65
|
+
read: boolean;
|
|
66
|
+
options?: {
|
|
67
|
+
modelSettings?: {
|
|
68
|
+
llmService?: string;
|
|
69
|
+
model?: string;
|
|
70
|
+
};
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
50
73
|
};
|
|
51
74
|
export type ContextItem = {
|
|
52
75
|
type: string;
|
|
@@ -80,6 +103,7 @@ export type Message = Omit<BubbleProps, 'content'> & {
|
|
|
80
103
|
metadata?: {
|
|
81
104
|
model: string;
|
|
82
105
|
provider: string;
|
|
106
|
+
llmService?: string;
|
|
83
107
|
usage_metadata?: {
|
|
84
108
|
input_tokens: number;
|
|
85
109
|
output_tokens: number;
|
|
@@ -14,5 +14,5 @@ export interface VectorDatabaseProviderFeature {
|
|
|
14
14
|
}
|
|
15
15
|
export type VectorDatabaseProviderComponents = {
|
|
16
16
|
name: string;
|
|
17
|
-
formComponent: (ctx: FlowModelContext, record?: unknown) => React.JSX.Element;
|
|
17
|
+
formComponent: (ctx: FlowModelContext, fieldClassName: string, record?: unknown) => React.JSX.Element;
|
|
18
18
|
};
|
package/dist/client/index.d.ts
CHANGED
|
@@ -30,8 +30,10 @@ export type { AIEmployee, ToolCall } from './ai-employees/types';
|
|
|
30
30
|
export * from './features';
|
|
31
31
|
export { AIEmployeeActionModel } from './ai-employees/flow/models/AIEmployeeActionModel';
|
|
32
32
|
export { useChatMessagesStore } from './ai-employees/chatbox/stores/chat-messages';
|
|
33
|
+
export { useChat } from './ai-employees/chatbox/hooks/useChat';
|
|
33
34
|
export { useChatBoxStore } from './ai-employees/chatbox/stores/chat-box';
|
|
34
35
|
export { useChatBoxActions } from './ai-employees/chatbox/hooks/useChatBoxActions';
|
|
36
|
+
export { useChatConversationsStore } from './ai-employees/chatbox/stores/chat-conversations';
|
|
35
37
|
export { useAIConfigRepository } from './repositories/hooks/useAIConfigRepository';
|
|
36
38
|
export { ProfileCard } from './ai-employees/ProfileCard';
|
|
37
39
|
export { avatars } from './ai-employees/avatars';
|