@nocobase/plugin-ai 2.2.0-beta.9 → 3.0.0-alpha.1
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/dist/ai/docs/nocobase/ai-employees/block/ai-chat-box.md +133 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/documents.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/index.md +11 -7
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/settings.md +12 -8
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-database.md +3 -3
- package/dist/ai/docs/nocobase/ai-employees/scenarios/company-background-research.md +125 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/create-document.md +1 -1
- package/dist/ai/docs/nocobase/api/app/env.md +3 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +14 -2
- package/dist/ai/docs/nocobase/api/cli/portal/config.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/portal/create.md +48 -0
- package/dist/ai/docs/nocobase/api/cli/portal/deploy.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/destroy.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/dev.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/index.md +136 -0
- package/dist/ai/docs/nocobase/api/cli/portal/info.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/list.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/portal/pull.md +43 -0
- package/dist/ai/docs/nocobase/api/cli/portal/push.md +41 -0
- package/dist/ai/docs/nocobase/building-tips/ai-fill-js-block-form.md +1092 -0
- package/dist/ai/docs/nocobase/building-tips/operations-dashboard.md +513 -0
- package/dist/ai/docs/nocobase/data-sources/calendar/calendar-collection.md +100 -3
- package/dist/ai/docs/nocobase/data-sources/collection-comment/index.md +92 -39
- package/dist/ai/docs/nocobase/data-sources/collection-sql/index.md +150 -29
- package/dist/ai/docs/nocobase/data-sources/collection-tree/index.md +93 -5
- package/dist/ai/docs/nocobase/data-sources/collection-view/index.md +226 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/china-region.md +122 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/collection-select.md +105 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/json.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/nano-id.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/snowflake-id.md +108 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/sort.md +3 -19
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/uuid.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/index.md +44 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/color.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/email.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/icon.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/input.md +112 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/integer.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/number.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/password.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/percent.md +104 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/phone.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/textarea.md +99 -8
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/url.md +103 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox-group.md +105 -3
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/china-region.md +108 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/multiple-select.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/radio-group.md +106 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/select.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/date.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime-without-tz.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/index.md +53 -47
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/time.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/unix-timestamp.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/circle.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/line.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/point.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/polygon.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/index.md +62 -16
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/markdown.md +104 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/rich-text.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-at.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-by.md +103 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/space.md +100 -6
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/table-oid.md +102 -4
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-at.md +104 -5
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-by.md +104 -6
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/validation.md +68 -58
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection.md +32 -13
- package/dist/ai/docs/nocobase/data-sources/data-modeling/index.md +41 -33
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mariadb/index.md +114 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mssql/index.md +117 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mysql/index.md +103 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-external-nocobase/index.md +75 -73
- package/dist/ai/docs/nocobase/data-sources/data-source-external-oracle/index.md +129 -11
- package/dist/ai/docs/nocobase/data-sources/data-source-external-postgres/index.md +110 -6
- package/dist/ai/docs/nocobase/data-sources/data-source-kingbase/index.md +75 -49
- package/dist/ai/docs/nocobase/data-sources/data-source-main/general-collection.md +116 -15
- package/dist/ai/docs/nocobase/data-sources/data-source-main/index.md +92 -62
- package/dist/ai/docs/nocobase/data-sources/data-source-main/inheritance-collection.md +97 -10
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/external-database.md +97 -58
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/index.md +32 -24
- package/dist/ai/docs/nocobase/data-sources/data-source-rest-api/index.md +115 -153
- package/dist/ai/docs/nocobase/data-sources/external/clickhouse.md +124 -0
- package/dist/ai/docs/nocobase/data-sources/external/doris.md +130 -0
- package/dist/ai/docs/nocobase/data-sources/external/index.md +140 -0
- package/dist/ai/docs/nocobase/data-sources/external/kingbase.md +129 -0
- package/dist/ai/docs/nocobase/data-sources/external/mariadb.md +126 -0
- package/dist/ai/docs/nocobase/data-sources/external/mssql.md +129 -0
- package/dist/ai/docs/nocobase/data-sources/external/mysql.md +115 -0
- package/dist/ai/docs/nocobase/data-sources/external/nocobase.md +159 -0
- package/dist/ai/docs/nocobase/data-sources/external/oceanbase.md +126 -0
- package/dist/ai/docs/nocobase/data-sources/external/oracle.md +158 -0
- package/dist/ai/docs/nocobase/data-sources/external/postgresql.md +122 -0
- package/dist/ai/docs/nocobase/data-sources/external/rest-api.md +245 -0
- package/dist/ai/docs/nocobase/data-sources/field-attachment-url/index.md +100 -12
- package/dist/ai/docs/nocobase/data-sources/field-encryption/index.md +48 -47
- package/dist/ai/docs/nocobase/data-sources/field-formula/index.md +99 -5
- package/dist/ai/docs/nocobase/data-sources/field-markdown-vditor/index.md +105 -5
- package/dist/ai/docs/nocobase/data-sources/field-sequence/index.md +102 -5
- package/dist/ai/docs/nocobase/data-sources/field-signature/index.md +18 -16
- package/dist/ai/docs/nocobase/data-sources/field-sort/index.md +76 -73
- package/dist/ai/docs/nocobase/data-sources/file-manager/field-attachment.md +101 -7
- package/dist/ai/docs/nocobase/data-sources/file-manager/file-collection.md +101 -14
- package/dist/ai/docs/nocobase/data-sources/index.md +49 -33
- package/dist/ai/docs/nocobase/data-sources/main/index.md +130 -0
- package/dist/ai/docs/nocobase/data-sources/main/kingbase.md +147 -0
- package/dist/ai/docs/nocobase/data-sources/main/mariadb.md +59 -0
- package/dist/ai/docs/nocobase/data-sources/main/mysql.md +59 -0
- package/dist/ai/docs/nocobase/data-sources/main/oceanbase.md +62 -0
- package/dist/ai/docs/nocobase/data-sources/main/postgresql.md +61 -0
- package/dist/ai/docs/nocobase/file-manager/stable-url.md +87 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +66 -26
- package/dist/ai/docs/nocobase/file-manager/storage/local.md +3 -1
- package/dist/ai/docs/nocobase/file-manager/storage/s3-pro.md +58 -7
- package/dist/ai/docs/nocobase/get-started/deployment/production.md +24 -2
- package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +3 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +3 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker.mdx +27 -3
- package/dist/ai/docs/nocobase/get-started/installation/env.md +35 -2
- package/dist/ai/docs/nocobase/index.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/comment.md +107 -0
- package/dist/ai/docs/nocobase/interface-builder/index.md +7 -6
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/desktop.md +97 -0
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/index.md +50 -0
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/mobile.md +133 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app-vs-multi-portal-vs-multi-space.md +159 -0
- package/dist/ai/docs/nocobase/multi-app/multi-portal/index.md +195 -0
- package/dist/ai/docs/nocobase/nocobase-cli/production/index.md +10 -0
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/caddy.md +15 -2
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/index.md +1 -1
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/nginx.md +16 -2
- package/dist/ai/docs/nocobase/ops-management/migration-manager/built-in-tables.md +1 -2
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
- package/dist/ai/docs/nocobase/runjs/context/ai.md +396 -0
- package/dist/ai/docs/nocobase/security/guide.md +23 -0
- package/dist/ai/docs/nocobase/tutorials/index.md +20 -1
- package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
- package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
- package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
- package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
- package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
- package/dist/ai/tools/executeFrontendTool.d.ts +10 -0
- package/dist/ai/tools/executeFrontendTool.js +86 -0
- package/dist/ai/tools/formFiller.js +4 -3
- package/dist/ai/tools/getSkill.js +1 -1
- package/dist/ai/tools/loadFrontendTool.d.ts +10 -0
- package/dist/ai/tools/loadFrontendTool.js +99 -0
- package/dist/ai/tools/subAgentWebSearch.js +20 -15
- package/dist/client/23.65ea8c37cd4b884b.js +10 -0
- package/dist/client/244.8631eb5cf3f05e21.js +10 -0
- package/dist/client/264.cc98933ef65608b6.js +10 -0
- package/dist/client/336.7a8a8853196ad779.js +11 -0
- package/dist/client/416.92b74ca47e4099c4.js +10 -0
- package/dist/client/446.d63c38d0309fe250.js +10 -0
- package/dist/client/525.94dd4136c1361477.js +10 -0
- package/dist/client/663.680bcf6272a8504d.js +10 -0
- package/dist/client/681.6ffbc9329b9ac242.js +10 -0
- package/dist/client/705.19b642db34de438a.js +10 -0
- package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
- package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
- package/dist/client/index.d.ts +13 -20
- package/dist/client/index.js +8 -8
- package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
- package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
- package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
- package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
- package/dist/client-v2/244.c428e645ecb94414.js +10 -0
- package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
- package/dist/client-v2/336.e406470429e0670e.js +11 -0
- package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
- package/dist/client-v2/420.b2aedb1ff71fca0e.js +10 -0
- package/dist/client-v2/446.073d450882db29fd.js +10 -0
- package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
- package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
- package/dist/client-v2/681.6890caa389564ff7.js +10 -0
- package/dist/client-v2/705.8dc34d43f02f322c.js +10 -0
- package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +11 -2
- package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +3 -1
- package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
- package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +1 -0
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
- package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
- package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
- package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/ChatBoxUnreadBadge.d.ts} +6 -7
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
- package/dist/client-v2/ai-employees/chatbox/components/Conversations.d.ts +18 -0
- package/dist/{client/ai-employees/admin/Templates.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
- package/dist/{client/ai-employees/ai-coding/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -3
- package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -4
- package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
- package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/chatbox/components/Messages.d.ts} +4 -4
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +4 -0
- package/dist/client-v2/ai-employees/chatbox/components/Sender.d.ts +42 -0
- package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
- package/dist/client-v2/ai-employees/chatbox/components/index.d.ts +14 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +29 -27
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +5 -3
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +2 -1
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +5 -4
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +12 -6
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +4 -2
- package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +56 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +4 -3
- package/dist/client-v2/ai-employees/chatbox/index.d.ts +17 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
- package/dist/client-v2/ai-employees/chatbox/roles.d.ts +11 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +46 -79
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +8 -25
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +23 -63
- package/dist/client-v2/ai-employees/chatbox/stores/chat-sender.d.ts +43 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +6 -19
- package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +36 -0
- package/dist/client-v2/ai-employees/chatbox/stores/mounted-chat-boxes.d.ts +20 -0
- package/dist/client-v2/ai-employees/chatbox/stores/runtime.d.ts +43 -0
- package/dist/client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts +72 -0
- package/dist/client-v2/ai-employees/chatbox/upload.d.ts +19 -0
- package/dist/client-v2/ai-employees/chatbox/utils.d.ts +85 -0
- package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
- package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
- package/dist/client-v2/ai-employees/data-modeling/setup.d.ts +15 -0
- package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
- package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
- package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
- package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/ai-employees/frontend-tools.d.ts} +3 -3
- package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
- package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
- package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
- package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
- package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
- package/dist/client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts +16 -0
- package/dist/client-v2/ai-employees/tools/WorkflowTaskOutputCard.d.ts +16 -0
- package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
- package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
- package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
- package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
- package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
- package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +151 -0
- package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
- package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
- package/dist/client-v2/ai-employees/types.d.ts +131 -7
- package/dist/client-v2/block/ai-chat-box/AIChatBoxBlockModel.d.ts +21 -0
- package/dist/{client/workflow/nodes/employee/flow-models/task.d.ts → client-v2/block/ai-chat-box/AIChatBoxCoreModel.d.ts} +1 -1
- package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/block/ai-chat-box/components/AIChatBoxCoreView.d.ts} +1 -1
- package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/block/ai-chat-box/components/AIChatBoxView.d.ts} +3 -5
- package/dist/client-v2/block/ai-chat-box/index.d.ts +14 -0
- package/dist/client-v2/block/ai-chat-box/settings.d.ts +12 -0
- package/dist/client-v2/block/ai-chat-box/sub-models.d.ts +26 -0
- package/dist/client-v2/block/ai-chat-box/types.d.ts +38 -0
- package/dist/client-v2/block/ai-chat-box/utils.d.ts +26 -0
- package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
- package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
- package/dist/client-v2/f0053e745af0ad03.svg +50 -0
- package/dist/client-v2/index.d.ts +11 -12
- package/dist/client-v2/index.js +37 -1
- package/dist/client-v2/llm-providers/forms.d.ts +44 -0
- package/dist/client-v2/llm-providers/index.d.ts +24 -0
- package/dist/client-v2/llm-services/model-select.d.ts +33 -0
- package/dist/client-v2/llm-services/utils.d.ts +14 -0
- package/dist/client-v2/locale.d.ts +14 -0
- package/dist/client-v2/manager/ai-manager.d.ts +62 -0
- package/dist/client-v2/manager/frontend-tool-registry.d.ts +30 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +36 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +49 -0
- package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
- package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
- package/dist/client-v2/pages/EmployeesPage.d.ts +64 -0
- package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
- package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
- package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
- package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
- package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
- package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
- package/dist/client-v2/plugin.d.ts +33 -0
- package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
- package/dist/client-v2/runjs/registerAIEmployeeRunJSFacade.d.ts +21 -0
- package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
- package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
- package/dist/client-v2/workflow/constants.d.ts +26 -0
- package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
- package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
- package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
- package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
- package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
- package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
- package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
- package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
- package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
- package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts} +6 -8
- package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
- package/dist/client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts +12 -0
- package/dist/{client/ai-employees/chatbox → client-v2/workflow/nodes/llm/components}/Messages.d.ts +2 -1
- package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
- package/dist/client-v2/workflow/register.d.ts +10 -0
- package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
- package/dist/client-v2/workflow/types.d.ts +128 -0
- package/dist/common/ai-employee-validation.d.ts +15 -0
- package/dist/common/ai-employee-validation.js +61 -0
- package/dist/common/error-codes.d.ts +13 -0
- package/dist/common/error-codes.js +48 -0
- package/dist/common/frontend-tools.d.ts +26 -0
- package/dist/common/frontend-tools.js +57 -0
- package/dist/common/llm-service-models.d.ts +16 -0
- package/dist/common/llm-service-models.js +84 -0
- package/dist/externalVersion.js +20 -25
- package/dist/locale/en-US.json +116 -1
- package/dist/locale/zh-CN.json +116 -1
- package/dist/node_modules/@langchain/mistralai/package.json +1 -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 +2 -0
- package/dist/server/ai-employees/ai-employee.d.ts +3 -1
- package/dist/server/ai-employees/ai-employee.js +63 -9
- package/dist/server/ai-employees/middleware/conversation.js +9 -2
- package/dist/server/ai-employees/prompts.d.ts +2 -1
- package/dist/server/ai-employees/prompts.js +8 -2
- package/dist/server/ai-employees/tool-call-sanitizer.d.ts +1 -0
- package/dist/server/ai-employees/tool-call-sanitizer.js +2 -1
- package/dist/server/ai-employees/utils.js +11 -5
- package/dist/server/attachments.d.ts +24 -0
- package/dist/server/attachments.js +204 -0
- package/dist/server/collections/ai-conversations.js +5 -0
- package/dist/server/collections/ai-usage-events.d.ts +10 -0
- package/dist/server/collections/ai-usage-events.js +183 -0
- package/dist/server/document-loader/cached.d.ts +1 -0
- package/dist/server/document-loader/cached.js +18 -9
- package/dist/server/document-loader/constants.js +1 -1
- package/dist/server/document-loader/loader.d.ts +0 -1
- package/dist/server/document-loader/loader.js +25 -8
- package/dist/server/document-loader/types.d.ts +7 -0
- package/dist/server/frontend-tools.d.ts +25 -0
- package/dist/server/frontend-tools.js +171 -0
- package/dist/server/llm-providers/anthropic.d.ts +2 -1
- package/dist/server/llm-providers/anthropic.js +1 -3
- package/dist/server/llm-providers/dashscope.d.ts +2 -1
- package/dist/server/llm-providers/dashscope.js +16 -1
- package/dist/server/llm-providers/deepseek.d.ts +2 -1
- package/dist/server/llm-providers/deepseek.js +33 -2
- package/dist/server/llm-providers/google-genai.d.ts +1 -1
- package/dist/server/llm-providers/google-genai.js +1 -5
- package/dist/server/llm-providers/kimi/provider.d.ts +2 -1
- package/dist/server/llm-providers/kimi/provider.js +22 -2
- package/dist/server/llm-providers/mistral.d.ts +36 -2
- package/dist/server/llm-providers/mistral.js +62 -2
- package/dist/server/llm-providers/openai/completions.d.ts +2 -1
- package/dist/server/llm-providers/openai/completions.js +17 -1
- package/dist/server/llm-providers/openai/responses.d.ts +2 -1
- package/dist/server/llm-providers/openai/responses.js +17 -1
- package/dist/server/llm-providers/orcarouter.d.ts +35 -0
- package/dist/server/llm-providers/orcarouter.js +155 -0
- package/dist/server/llm-providers/provider.d.ts +10 -2
- package/dist/server/llm-providers/provider.js +33 -4
- package/dist/server/manager/ai-chat-conversation.js +2 -0
- package/dist/server/manager/ai-context-datasource-manager.js +34 -7
- package/dist/server/manager/ai-manager.d.ts +2 -1
- package/dist/server/manager/ai-manager.js +4 -1
- package/dist/server/manager/ai-usage-events.d.ts +49 -0
- package/dist/server/manager/ai-usage-events.js +195 -0
- package/dist/server/manager/work-context-handler.js +10 -3
- package/dist/server/plugin.d.ts +1 -0
- package/dist/server/plugin.js +41 -0
- package/dist/server/resource/aiConversations.d.ts +2 -0
- package/dist/server/resource/aiConversations.js +77 -4
- package/dist/server/resource/aiEmployees.d.ts +2 -0
- package/dist/server/resource/aiEmployees.js +62 -0
- package/dist/server/resource/aiWorkflowTasks.js +9 -1
- package/dist/server/resource/llmServices.d.ts +11 -0
- package/dist/server/resource/llmServices.js +85 -0
- package/dist/server/types/knowledge-base.type.d.ts +6 -2
- package/dist/server/utils.d.ts +5 -2
- package/dist/server/utils.js +11 -19
- package/dist/server/workflow/nodes/employee/files.d.ts +3 -1
- package/dist/server/workflow/nodes/employee/files.js +31 -5
- package/dist/swagger/common.d.ts +143 -0
- package/dist/swagger/common.js +144 -0
- package/dist/swagger/employees.d.ts +301 -0
- package/dist/swagger/employees.js +131 -0
- package/dist/swagger/index.d.ts +1588 -0
- package/dist/swagger/index.js +62 -0
- package/dist/swagger/llm.d.ts +555 -0
- package/dist/swagger/llm.js +247 -0
- package/dist/swagger/schemas.d.ts +736 -0
- package/dist/swagger/schemas.js +381 -0
- package/package.json +5 -5
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-store.md +0 -24
- package/dist/ai/docs/nocobase/data-sources/development/index.md +0 -6
- package/dist/client/119.c6bf8c6433167d81.js +0 -10
- package/dist/client/170.d98eacdc00d9d527.js +0 -10
- package/dist/client/228.b4b709f93b86b6b9.js +0 -10
- package/dist/client/280.003b9e9788599244.js +0 -10
- package/dist/client/290.0f7f441d8a94f03c.js +0 -10
- package/dist/client/331.d547c95410476a69.js +0 -10
- package/dist/client/406.15c09d98faa2ccf1.js +0 -10
- package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
- package/dist/client/462.d172d0fe91519e35.js +0 -10
- package/dist/client/486.dcac8f3fcec19c33.js +0 -10
- package/dist/client/502.2b4a51e0a8122e52.js +0 -10
- package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
- package/dist/client/559.9f97ebcdb0bd6231.js +0 -10
- package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
- package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
- package/dist/client/597.b0d64948d74cf6cb.js +0 -10
- package/dist/client/604.89c674f35b52b4ef.js +0 -10
- package/dist/client/614.aa766080f6b99aab.js +0 -10
- package/dist/client/646.d4483b4ff23da0a0.js +0 -10
- package/dist/client/687.224e569a99cae4bb.js +0 -10
- package/dist/client/699.57c0a1acb723202a.js +0 -10
- package/dist/client/711.92cd94681fde7e05.js +0 -10
- package/dist/client/758.a9741e81911e53c3.js +0 -10
- package/dist/client/768.5177bff46ae71a5b.js +0 -10
- package/dist/client/792.abb57765453bcbcc.js +0 -10
- package/dist/client/820.f72ef2462b61d812.js +0 -10
- package/dist/client/832.0cf69e3f43c320b2.js +0 -10
- package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
- package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
- package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
- package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/Employees.d.ts +0 -10
- package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
- package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/ProfileSettings.d.ts +0 -12
- package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
- package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
- package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/basic/index.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
- package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
- package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
- package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
- package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
- package/dist/client/ai-employees/avatars.d.ts +0 -9
- package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
- package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
- package/dist/client/ai-employees/chart-generator/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
- package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
- package/dist/client/ai-employees/chatbox/Sender.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
- package/dist/client/ai-employees/chatbox/conversations/Conversations.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/common.d.ts +0 -43
- package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
- package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
- package/dist/client/ai-employees/chatbox/utils.d.ts +0 -41
- package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
- package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
- package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
- package/dist/client/ai-employees/datasource/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/index.d.ts +0 -36
- package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
- package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
- package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
- package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
- package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
- package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
- package/dist/client/ai-employees/types.d.ts +0 -259
- package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/workflow-tasks/ui/WorkflowTaskOutputCard.d.ts +0 -11
- package/dist/client/chat-settings/Messages.d.ts +0 -11
- package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
- package/dist/client/components/skill-settings.d.ts +0 -22
- package/dist/client/features/components.d.ts +0 -9
- package/dist/client/features/feature-manager.d.ts +0 -9
- package/dist/client/features/index.d.ts +0 -9
- package/dist/client/features/vector-database-provider.d.ts +0 -9
- package/dist/client/features/vector-store-provider.d.ts +0 -9
- package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
- package/dist/client/llm-providers/components/Chat.d.ts +0 -10
- package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
- package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
- package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/kimi/index.d.ts +0 -10
- package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/mimo/index.d.ts +0 -10
- package/dist/client/llm-providers/mistral/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/mistral/index.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
- package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/xai/index.d.ts +0 -10
- package/dist/client/llm-services/LLMServices.d.ts +0 -13
- package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
- package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
- package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
- package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
- package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
- package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
- package/dist/client/llm-services/llm-providers.d.ts +0 -27
- package/dist/client/llm-services/utils.d.ts +0 -35
- package/dist/client/manager/ai-feature-manager.d.ts +0 -9
- package/dist/client/manager/ai-manager.d.ts +0 -35
- package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
- package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
- package/dist/client/schemas/llms.d.ts +0 -347
- package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
- package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -15
- package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
- package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
- package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
- /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
- /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/events/ai-context-selection.d.ts → client-v2/workflow/components/index.d.ts} +0 -0
|
@@ -7,107 +7,74 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
/// <reference types="react" />
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
10
|
+
import type { Sender } from '@ant-design/x';
|
|
11
|
+
import type { GetRef } from 'antd';
|
|
12
12
|
import type { AIEmployee } from '../../types';
|
|
13
|
-
type
|
|
13
|
+
import type { ChatBubbleRole } from '../components/MessageRenderers';
|
|
14
|
+
import type { ChatSenderModel } from './chat-sender';
|
|
15
|
+
type RoleMap = Record<string, ChatBubbleRole>;
|
|
16
|
+
type ChatBoxTaskVariables = {
|
|
17
|
+
variables?: Record<string, unknown>;
|
|
18
|
+
localVariables?: Record<string, unknown>;
|
|
19
|
+
};
|
|
14
20
|
export interface ModelRef {
|
|
15
21
|
llmService: string;
|
|
16
22
|
model: string;
|
|
17
23
|
}
|
|
18
|
-
|
|
24
|
+
export declare class ChatBoxModel {
|
|
25
|
+
private senderModel?;
|
|
26
|
+
legacySenderValue: string;
|
|
27
|
+
legacySenderPlaceholder: string;
|
|
28
|
+
legacyIsEditingMessage: boolean;
|
|
29
|
+
legacyEditingMessageId: string | null | undefined;
|
|
30
|
+
legacySenderRef: React.MutableRefObject<GetRef<typeof Sender> | null> | null;
|
|
31
|
+
legacyIsShowSenderHint: boolean;
|
|
19
32
|
open: boolean;
|
|
20
33
|
expanded: boolean;
|
|
21
34
|
collapsed: boolean;
|
|
22
35
|
showConversations: boolean;
|
|
23
36
|
minimize: boolean;
|
|
24
|
-
currentEmployee
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
taskVariables: {
|
|
29
|
-
variables?: Record<string, unknown>;
|
|
30
|
-
localVariables?: Record<string, unknown>;
|
|
31
|
-
};
|
|
32
|
-
isEditingMessage: boolean;
|
|
33
|
-
editingMessageId?: string;
|
|
34
|
-
chatBoxRef: React.MutableRefObject<HTMLDivElement> | null;
|
|
35
|
-
senderRef: React.MutableRefObject<GetRef<typeof Sender>> | null;
|
|
37
|
+
currentEmployee: AIEmployee | null | undefined;
|
|
38
|
+
roles: RoleMap;
|
|
39
|
+
taskVariables: ChatBoxTaskVariables;
|
|
40
|
+
chatBoxRef: React.MutableRefObject<HTMLDivElement | null> | null;
|
|
36
41
|
showCodeHistory: boolean;
|
|
37
|
-
model
|
|
42
|
+
model: ModelRef | null | undefined;
|
|
38
43
|
showDebugPanel: boolean;
|
|
39
44
|
readonly: boolean;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
constructor();
|
|
46
|
+
get senderValue(): string;
|
|
47
|
+
set senderValue(value: string);
|
|
48
|
+
get senderPlaceholder(): string;
|
|
49
|
+
set senderPlaceholder(placeholder: string);
|
|
50
|
+
get isEditingMessage(): boolean;
|
|
51
|
+
set isEditingMessage(isEditing: boolean);
|
|
52
|
+
get editingMessageId(): string | null | undefined;
|
|
53
|
+
set editingMessageId(id: string | null | undefined);
|
|
54
|
+
get senderRef(): React.MutableRefObject<GetRef<typeof Sender> | null> | null;
|
|
55
|
+
set senderRef(ref: React.MutableRefObject<GetRef<typeof Sender> | null> | null);
|
|
56
|
+
get isShowSenderHint(): boolean;
|
|
57
|
+
set isShowSenderHint(isShowSenderHint: boolean);
|
|
58
|
+
attachSenderModel: (senderModel: ChatSenderModel) => void;
|
|
43
59
|
setOpen: (open: boolean) => void;
|
|
44
60
|
setExpanded: (expanded: boolean) => void;
|
|
45
61
|
setCollapsed: (collapsed: boolean) => void;
|
|
46
62
|
setShowConversations: (show: boolean) => void;
|
|
47
|
-
setMinimize: (
|
|
48
|
-
setCurrentEmployee: (
|
|
63
|
+
setMinimize: (minimize: boolean) => void;
|
|
64
|
+
setCurrentEmployee: (employee?: AIEmployee | ((prev: AIEmployee | null | undefined) => AIEmployee | null | undefined)) => void;
|
|
49
65
|
setSenderValue: (value: string) => void;
|
|
50
66
|
setSenderPlaceholder: (placeholder: string) => void;
|
|
51
|
-
setTaskVariables: (variables:
|
|
52
|
-
setRoles: (roles:
|
|
53
|
-
addRole: (name: string, role:
|
|
67
|
+
setTaskVariables: (variables: ChatBoxTaskVariables) => void;
|
|
68
|
+
setRoles: (roles: RoleMap | ((prev: RoleMap) => RoleMap)) => void;
|
|
69
|
+
addRole: (name: string, role: RoleMap[string]) => void;
|
|
54
70
|
setIsEditingMessage: (isEditing: boolean) => void;
|
|
55
|
-
setEditingMessageId: (id?: string) => void;
|
|
56
|
-
setChatBoxRef: (ref: React.MutableRefObject<HTMLDivElement> | null) => void;
|
|
57
|
-
setSenderRef: (ref: React.MutableRefObject<GetRef<typeof Sender
|
|
71
|
+
setEditingMessageId: (id?: string | null) => void;
|
|
72
|
+
setChatBoxRef: (ref: React.MutableRefObject<HTMLDivElement | null> | null) => void;
|
|
73
|
+
setSenderRef: (ref: React.MutableRefObject<GetRef<typeof Sender> | null> | null) => void;
|
|
58
74
|
setShowCodeHistory: (show: boolean) => void;
|
|
59
|
-
setModel: (model: ModelRef | null) => void;
|
|
75
|
+
setModel: (model: ModelRef | null | undefined) => void;
|
|
60
76
|
setShowDebugPanel: (show: boolean) => void;
|
|
61
77
|
setReadonly: (readonly: boolean) => void;
|
|
62
|
-
setShowSenderHint: (
|
|
78
|
+
setShowSenderHint: (isShowSenderHint: boolean) => void;
|
|
63
79
|
}
|
|
64
|
-
export declare const useChatBoxStore: {
|
|
65
|
-
(): ChatBoxState & ChatBoxActions;
|
|
66
|
-
<U>(selector: (state: ChatBoxState & ChatBoxActions) => U): U;
|
|
67
|
-
} & import("zustand").StoreApi<ChatBoxState & ChatBoxActions> & {
|
|
68
|
-
use: {
|
|
69
|
-
open: () => boolean;
|
|
70
|
-
expanded: () => boolean;
|
|
71
|
-
collapsed: () => boolean;
|
|
72
|
-
showConversations: () => boolean;
|
|
73
|
-
minimize: () => boolean;
|
|
74
|
-
currentEmployee?: () => AIEmployee;
|
|
75
|
-
senderValue: () => string;
|
|
76
|
-
senderPlaceholder: () => string;
|
|
77
|
-
roles: () => GetProp<import("react").ForwardRefExoticComponent<import("@ant-design/x/es/bubble/BubbleList").BubbleListProps & import("react").RefAttributes<import("@ant-design/x/es/bubble/BubbleList").BubbleListRef>>, "roles">;
|
|
78
|
-
taskVariables: () => {
|
|
79
|
-
variables?: Record<string, unknown>;
|
|
80
|
-
localVariables?: Record<string, unknown>;
|
|
81
|
-
};
|
|
82
|
-
isEditingMessage: () => boolean;
|
|
83
|
-
editingMessageId?: () => string;
|
|
84
|
-
chatBoxRef: () => import("react").MutableRefObject<HTMLDivElement>;
|
|
85
|
-
senderRef: () => import("react").MutableRefObject<import("@ant-design/x/es/sender").SenderRef>;
|
|
86
|
-
showCodeHistory: () => boolean;
|
|
87
|
-
model?: () => ModelRef;
|
|
88
|
-
showDebugPanel: () => boolean;
|
|
89
|
-
readonly: () => boolean;
|
|
90
|
-
isShowSenderHint: () => boolean;
|
|
91
|
-
setOpen: () => (open: boolean) => void;
|
|
92
|
-
setExpanded: () => (expanded: boolean) => void;
|
|
93
|
-
setCollapsed: () => (collapsed: boolean) => void;
|
|
94
|
-
setShowConversations: () => (show: boolean) => void;
|
|
95
|
-
setMinimize: () => (minus: boolean) => void;
|
|
96
|
-
setCurrentEmployee: () => (aiEmployee?: AIEmployee | ((prev: AIEmployee) => AIEmployee)) => void;
|
|
97
|
-
setSenderValue: () => (value: string) => void;
|
|
98
|
-
setSenderPlaceholder: () => (placeholder: string) => void;
|
|
99
|
-
setTaskVariables: () => (variables: ChatBoxState['taskVariables']) => void;
|
|
100
|
-
setRoles: () => (roles: RolesType | ((prev: RolesType) => RolesType)) => void;
|
|
101
|
-
addRole: () => (name: string, role: unknown) => void;
|
|
102
|
-
setIsEditingMessage: () => (isEditing: boolean) => void;
|
|
103
|
-
setEditingMessageId: () => (id?: string) => void;
|
|
104
|
-
setChatBoxRef: () => (ref: React.MutableRefObject<HTMLDivElement> | null) => void;
|
|
105
|
-
setSenderRef: () => (ref: React.MutableRefObject<GetRef<typeof Sender>> | null) => void;
|
|
106
|
-
setShowCodeHistory: () => (show: boolean) => void;
|
|
107
|
-
setModel: () => (model: ModelRef | null) => void;
|
|
108
|
-
setShowDebugPanel: () => (show: boolean) => void;
|
|
109
|
-
setReadonly: () => (readonly: boolean) => void;
|
|
110
|
-
setShowSenderHint: () => (show: boolean) => void;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
80
|
export {};
|
|
@@ -7,39 +7,22 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import type { Conversation } from '../../types';
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type ChatConversationStateUpdater<T> = T | ((prev: T) => T);
|
|
11
|
+
export declare class ChatConversationModel {
|
|
12
|
+
currentConversation: string | undefined;
|
|
12
13
|
conversations: Conversation[];
|
|
13
14
|
keyword: string;
|
|
14
15
|
webSearch: boolean;
|
|
15
16
|
conversationSegmented: string;
|
|
16
17
|
unreadCount: number;
|
|
17
|
-
|
|
18
|
-
interface ChatConversationsActions {
|
|
18
|
+
constructor();
|
|
19
19
|
setCurrentConversation: (id: string | undefined) => void;
|
|
20
20
|
setKeyword: (keyword: string) => void;
|
|
21
|
-
setConversations: (conversations: Conversation[]
|
|
21
|
+
setConversations: (conversations: ChatConversationStateUpdater<Conversation[]>) => void;
|
|
22
|
+
setConversationRead: (sessionId: string, read: boolean) => void;
|
|
23
|
+
markConversationRead: (sessionId: string) => void;
|
|
22
24
|
setWebSearch: (webSearch: boolean) => void;
|
|
23
25
|
setConversationSegmented: (conversationSegmented: string) => void;
|
|
24
|
-
setUnreadCount: (unreadCount: number
|
|
26
|
+
setUnreadCount: (unreadCount: ChatConversationStateUpdater<number>) => void;
|
|
25
27
|
}
|
|
26
|
-
export declare const useChatConversationsStore: {
|
|
27
|
-
(): ChatConversationsState & ChatConversationsActions;
|
|
28
|
-
<U>(selector: (state: ChatConversationsState & ChatConversationsActions) => U): U;
|
|
29
|
-
} & import("zustand").StoreApi<ChatConversationsState & ChatConversationsActions> & {
|
|
30
|
-
use: {
|
|
31
|
-
currentConversation?: () => string;
|
|
32
|
-
conversations: () => Conversation[];
|
|
33
|
-
keyword: () => string;
|
|
34
|
-
webSearch: () => boolean;
|
|
35
|
-
conversationSegmented: () => string;
|
|
36
|
-
unreadCount: () => number;
|
|
37
|
-
setCurrentConversation: () => (id: string | undefined) => void;
|
|
38
|
-
setKeyword: () => (keyword: string) => void;
|
|
39
|
-
setConversations: () => (conversations: Conversation[] | ((prev: Conversation[]) => Conversation[])) => void;
|
|
40
|
-
setWebSearch: () => (webSearch: boolean) => void;
|
|
41
|
-
setConversationSegmented: () => (conversationSegmented: string) => void;
|
|
42
|
-
setUnreadCount: () => (unreadCount: number | ((prev: number) => number)) => void;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
28
|
export {};
|
|
@@ -21,38 +21,44 @@ export type ChatSessionState = {
|
|
|
21
21
|
contextItems: ContextItem[];
|
|
22
22
|
systemMessage: string;
|
|
23
23
|
responseLoading: boolean;
|
|
24
|
-
abortController?: AbortController;
|
|
25
|
-
skillSettings?: SkillSettings;
|
|
26
|
-
webSearching?: WebSearching;
|
|
24
|
+
abortController?: AbortController | null;
|
|
25
|
+
skillSettings?: SkillSettings | null;
|
|
26
|
+
webSearching?: WebSearching | null;
|
|
27
27
|
backgroundWorking: boolean;
|
|
28
28
|
resumeStreamFailed: boolean;
|
|
29
29
|
};
|
|
30
30
|
export declare const CHAT_EMPTY_SESSION_STATE: ChatSessionState;
|
|
31
|
-
type ChatMessagesState = {
|
|
32
|
-
sessions: Record<string, ChatSessionState>;
|
|
33
|
-
editorRef?: Record<string, ChatEditorRef | null>;
|
|
34
|
-
currentEditorRefUid?: string;
|
|
35
|
-
flowContext?: unknown;
|
|
36
|
-
};
|
|
37
31
|
type SessionStateUpdater<T> = T | ((prev: T) => T);
|
|
38
|
-
export
|
|
32
|
+
export declare class ChatMessageModel {
|
|
33
|
+
sessions: Record<string, ChatSessionState>;
|
|
34
|
+
editorRef: Record<string, ChatEditorRef | null>;
|
|
35
|
+
currentEditorRefUid: string | null | undefined;
|
|
36
|
+
flowContext: unknown;
|
|
37
|
+
constructor();
|
|
38
|
+
private resolveSessionState;
|
|
39
|
+
private ensureSessionState;
|
|
40
|
+
private updateSessionState;
|
|
39
41
|
setEditorRef: (uid: string, editorRef: ChatEditorRef | null) => void;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
unregisterEditorRef: (uid: string, editorRef: ChatEditorRef) => void;
|
|
43
|
+
setCurrentEditorRefUid: (uid: string | null | undefined) => void;
|
|
44
|
+
setFlowContext: (flowContext: unknown) => void;
|
|
42
45
|
getSessionState: (sessionId?: string) => ChatSessionState;
|
|
43
46
|
resetSessionState: (sessionId?: string, patch?: Partial<ChatSessionState>) => void;
|
|
44
47
|
migrateSessionState: (fromSessionId: string | undefined, toSessionId: string) => void;
|
|
45
48
|
setSessionMessages: (sessionId: string | undefined, messages: SessionStateUpdater<Message[]>) => void;
|
|
46
49
|
setSessionMessagesLoading: (sessionId: string | undefined, loading: boolean) => void;
|
|
47
50
|
setSessionMessagesError: (sessionId: string | undefined, error: unknown) => void;
|
|
48
|
-
setSessionMessagesMeta: (sessionId: string | undefined, meta:
|
|
51
|
+
setSessionMessagesMeta: (sessionId: string | undefined, meta: {
|
|
52
|
+
cursor?: string;
|
|
53
|
+
hasMore?: boolean;
|
|
54
|
+
} | ((prev: ChatSessionState['messagesMeta']) => ChatSessionState['messagesMeta'])) => void;
|
|
49
55
|
setSessionAttachments: (sessionId: string | undefined, attachments: SessionStateUpdater<Attachment[]>) => void;
|
|
50
56
|
setSessionContextItems: (sessionId: string | undefined, items: SessionStateUpdater<ContextItem[]>) => void;
|
|
51
57
|
setSessionSystemMessage: (sessionId: string | undefined, msg: string | ((prev: string) => string)) => void;
|
|
52
58
|
setSessionResponseLoading: (sessionId: string | undefined, loading: boolean) => void;
|
|
53
59
|
setSessionBackgroundWorking: (sessionId: string | undefined, backgroundWorking: boolean) => void;
|
|
54
60
|
setSessionResumeStreamFailed: (sessionId: string | undefined, resumeStreamFailed: boolean) => void;
|
|
55
|
-
addSessionMessage: (sessionId: string | undefined,
|
|
61
|
+
addSessionMessage: (sessionId: string | undefined, message: Message) => void;
|
|
56
62
|
addSessionMessages: (sessionId: string | undefined, msgs: Message[]) => void;
|
|
57
63
|
updateSessionLastMessage: (sessionId: string | undefined, updater: (msg: Message) => Message) => void;
|
|
58
64
|
removeSessionMessage: (sessionId: string | undefined, key: string) => void;
|
|
@@ -61,58 +67,12 @@ export interface ChatMessagesActions {
|
|
|
61
67
|
addSessionContextItems: (sessionId: string | undefined, items: ContextItem | ContextItem[]) => void;
|
|
62
68
|
addContextItems: (items: ContextItem | ContextItem[]) => void;
|
|
63
69
|
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;
|
|
70
|
+
setSessionAbortController: (sessionId: string | undefined, controller: AbortController | undefined | null) => void;
|
|
71
|
+
setSessionSkillSettings: (sessionId: string | undefined, settings: SkillSettings | undefined | null) => void;
|
|
72
|
+
setSessionWebSearching: (sessionId: string | undefined, webSearching: WebSearching | null | undefined) => void;
|
|
67
73
|
addSessionSubAgentMessage: (sessionId: string | undefined, subSessionId: string, msg: Message) => void;
|
|
68
74
|
addSessionSubAgentMessages: (sessionId: string | undefined, subSessionId: string, msgs: Message[]) => void;
|
|
69
75
|
updateSessionLastSubAgentMessage: (sessionId: string | undefined, subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
70
76
|
updateSessionSubAgentConversationStatus: (sessionId: string | undefined, subSessionId: string, status: 'pending' | 'completed') => void;
|
|
71
77
|
}
|
|
72
|
-
export declare const useChatMessagesStore: {
|
|
73
|
-
(): ChatMessagesState & ChatMessagesActions;
|
|
74
|
-
<U>(selector: (state: ChatMessagesState & ChatMessagesActions) => U): U;
|
|
75
|
-
} & import("zustand").StoreApi<ChatMessagesState & ChatMessagesActions> & {
|
|
76
|
-
use: {
|
|
77
|
-
sessions: () => Record<string, ChatSessionState>;
|
|
78
|
-
editorRef?: () => Record<string, ChatEditorRef>;
|
|
79
|
-
currentEditorRefUid?: () => string;
|
|
80
|
-
flowContext?: () => unknown;
|
|
81
|
-
setEditorRef: () => (uid: string, editorRef: ChatEditorRef | null) => void;
|
|
82
|
-
setCurrentEditorRefUid: () => (uid: string) => void;
|
|
83
|
-
setFlowContext: () => (ctx: unknown) => void;
|
|
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: unknown) => 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
|
-
addContextItems: () => (items: ContextItem | ContextItem[]) => void;
|
|
108
|
-
removeSessionContextItem: () => (sessionId: string | undefined, type: string, uid: string) => void;
|
|
109
|
-
setSessionAbortController: () => (sessionId: string | undefined, controller: AbortController | undefined) => void;
|
|
110
|
-
setSessionSkillSettings: () => (sessionId: string | undefined, settings: SkillSettings | undefined) => void;
|
|
111
|
-
setSessionWebSearching: () => (sessionId: string | undefined, webSearching: WebSearching) => void;
|
|
112
|
-
addSessionSubAgentMessage: () => (sessionId: string | undefined, subSessionId: string, msg: Message) => void;
|
|
113
|
-
addSessionSubAgentMessages: () => (sessionId: string | undefined, subSessionId: string, msgs: Message[]) => void;
|
|
114
|
-
updateSessionLastSubAgentMessage: () => (sessionId: string | undefined, subSessionId: string, username: string, updater: (msg: Message) => Message) => void;
|
|
115
|
-
updateSessionSubAgentConversationStatus: () => (sessionId: string | undefined, subSessionId: string, status: 'pending' | 'completed') => void;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
78
|
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
10
|
+
import type { Sender } from '@ant-design/x';
|
|
11
|
+
import type { GetRef } from 'antd';
|
|
12
|
+
import type { Attachment, ContextItem, SkillSettings } from '../../types';
|
|
13
|
+
export type ChatSenderRef = React.MutableRefObject<GetRef<typeof Sender> | null>;
|
|
14
|
+
type ChatSenderStateUpdater<T> = T | ((prev: T) => T);
|
|
15
|
+
export declare class ChatSenderModel {
|
|
16
|
+
senderValue: string;
|
|
17
|
+
senderPlaceholder: string;
|
|
18
|
+
senderRef: ChatSenderRef | null;
|
|
19
|
+
isShowSenderHint: boolean;
|
|
20
|
+
isEditingMessage: boolean;
|
|
21
|
+
editingMessageId: string | null | undefined;
|
|
22
|
+
attachments: Attachment[];
|
|
23
|
+
contextItems: ContextItem[];
|
|
24
|
+
systemMessage: string;
|
|
25
|
+
skillSettings: SkillSettings | null | undefined;
|
|
26
|
+
constructor();
|
|
27
|
+
setSenderValue: (value: string) => void;
|
|
28
|
+
setSenderPlaceholder: (placeholder: string) => void;
|
|
29
|
+
setSenderRef: (ref: ChatSenderRef | null) => void;
|
|
30
|
+
setShowSenderHint: (isShowSenderHint: boolean) => void;
|
|
31
|
+
setIsEditingMessage: (isEditing: boolean) => void;
|
|
32
|
+
setEditingMessageId: (id?: string | null) => void;
|
|
33
|
+
setAttachments: (attachments: ChatSenderStateUpdater<Attachment[]>) => void;
|
|
34
|
+
addAttachments: (attachments: Attachment | Attachment[]) => void;
|
|
35
|
+
removeAttachment: (filename: string) => void;
|
|
36
|
+
setContextItems: (items: ChatSenderStateUpdater<ContextItem[]>) => void;
|
|
37
|
+
addContextItems: (items: ContextItem | ContextItem[]) => void;
|
|
38
|
+
removeContextItem: (type: string, uid: string) => void;
|
|
39
|
+
setSystemMessage: (msg: string | ((prev: string) => string)) => void;
|
|
40
|
+
setSkillSettings: (settings: SkillSettings | null | undefined) => void;
|
|
41
|
+
reset: () => void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -14,31 +14,18 @@ export type ChatToolCallSessionState = {
|
|
|
14
14
|
toolCalls: Record<string, ToolCallInvokeState[]>;
|
|
15
15
|
};
|
|
16
16
|
export declare const CHAT_EMPTY_TOOL_CALL_SESSION_STATE: ChatToolCallSessionState;
|
|
17
|
-
|
|
17
|
+
export declare class ChatToolCallModel {
|
|
18
18
|
sessions: Record<string, ChatToolCallSessionState>;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
constructor();
|
|
20
|
+
private resolveSessionState;
|
|
21
|
+
private ensureSessionState;
|
|
22
|
+
private updateSessionState;
|
|
21
23
|
getSessionState: (sessionId: string) => ChatToolCallSessionState;
|
|
22
24
|
resetSessionState: (sessionId: string) => void;
|
|
23
25
|
migrateSessionState: (fromSessionId: string, toSessionId: string) => void;
|
|
24
26
|
updateToolCallInvokeStatus: (sessionId: string, messageId: string, toolCallId: string, invokeStatus: string) => void;
|
|
25
27
|
isAllWaiting: (sessionId: string, messageId: string) => boolean;
|
|
26
28
|
isInterrupted: (sessionId: string, messageId: string, toolCallId: string) => boolean;
|
|
27
|
-
getInvokeStatus: (sessionId: string, messageId: string, toolCallId: string) => string
|
|
29
|
+
getInvokeStatus: (sessionId: string, messageId: string, toolCallId: string) => string;
|
|
28
30
|
}
|
|
29
|
-
export declare const useChatToolCallStore: {
|
|
30
|
-
(): ChatToolCallState & ChatToolCallActions;
|
|
31
|
-
<U>(selector: (state: ChatToolCallState & ChatToolCallActions) => U): U;
|
|
32
|
-
} & import("zustand").StoreApi<ChatToolCallState & ChatToolCallActions> & {
|
|
33
|
-
use: {
|
|
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;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
31
|
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
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 type { Message, ToolCall } from '../../types';
|
|
10
|
+
type ChatToolsState = {
|
|
11
|
+
toolsByName: Record<string, (ToolCall<unknown> & {
|
|
12
|
+
messageId?: string;
|
|
13
|
+
})[]>;
|
|
14
|
+
toolsByMessageId: Record<string, Record<string, ToolCall<unknown> & {
|
|
15
|
+
version: number;
|
|
16
|
+
}>>;
|
|
17
|
+
openToolModal?: boolean;
|
|
18
|
+
activeTool?: ToolCall<unknown>;
|
|
19
|
+
activeMessageId?: string;
|
|
20
|
+
adjustArgs?: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
export declare class ChatToolModel {
|
|
23
|
+
toolsByName: ChatToolsState['toolsByName'];
|
|
24
|
+
toolsByMessageId: ChatToolsState['toolsByMessageId'];
|
|
25
|
+
openToolModal: boolean;
|
|
26
|
+
activeTool: ToolCall<unknown> | null | undefined;
|
|
27
|
+
activeMessageId: string;
|
|
28
|
+
adjustArgs: Record<string, unknown>;
|
|
29
|
+
constructor();
|
|
30
|
+
updateTools: (messages: Message[]) => void;
|
|
31
|
+
setOpenToolModal: (open: boolean) => void;
|
|
32
|
+
setActiveTool: (tool: ToolCall<unknown> | null | undefined) => void;
|
|
33
|
+
setActiveMessageId: (messageId: string) => void;
|
|
34
|
+
setAdjustArgs: (args: Record<string, unknown>) => void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
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 type { ClearOptions, ContextItem, TriggerTaskOptions } from '../../types';
|
|
10
|
+
import type { ChatBoxRuntime } from './runtime';
|
|
11
|
+
export type MountedChatBoxEntry = {
|
|
12
|
+
uid: string;
|
|
13
|
+
runtime: ChatBoxRuntime;
|
|
14
|
+
triggerTask: (options: TriggerTaskOptions) => Promise<void>;
|
|
15
|
+
clear: (options?: ClearOptions, sessionId?: string | undefined) => void;
|
|
16
|
+
syncContextItems: (items: ContextItem[]) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const registerMountedChatBox: (entry: MountedChatBoxEntry) => () => void;
|
|
19
|
+
export declare const getMountedChatBox: (uid: string) => MountedChatBoxEntry;
|
|
20
|
+
export declare const clearMountedChatBoxes: () => void;
|
|
@@ -0,0 +1,43 @@
|
|
|
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 React from 'react';
|
|
10
|
+
import { ChatBoxModel } from './chat-box';
|
|
11
|
+
import { ChatConversationModel } from './chat-conversations';
|
|
12
|
+
import { ChatMessageModel } from './chat-messages';
|
|
13
|
+
import { ChatSenderModel } from './chat-sender';
|
|
14
|
+
import { ChatToolCallModel } from './chat-tool-call';
|
|
15
|
+
import { ChatToolModel } from './chat-tools';
|
|
16
|
+
import { WorkflowTaskModel } from './workflow-tasks';
|
|
17
|
+
export type ChatBoxRuntimeMode = 'global' | 'block';
|
|
18
|
+
export type ChatBoxScopeOperation = 'list' | 'create';
|
|
19
|
+
export type ChatBoxScopeResolverOptions = {
|
|
20
|
+
operation?: ChatBoxScopeOperation;
|
|
21
|
+
};
|
|
22
|
+
export type ChatBoxScopeResolver = (options?: ChatBoxScopeResolverOptions) => Promise<string | undefined>;
|
|
23
|
+
export type ChatBoxRuntime = {
|
|
24
|
+
mode: ChatBoxRuntimeMode;
|
|
25
|
+
getScope?: ChatBoxScopeResolver;
|
|
26
|
+
chatBoxModel: ChatBoxModel;
|
|
27
|
+
chatSenderModel: ChatSenderModel;
|
|
28
|
+
chatConversationModel: ChatConversationModel;
|
|
29
|
+
chatMessageModel: ChatMessageModel;
|
|
30
|
+
chatToolCallModel: ChatToolCallModel;
|
|
31
|
+
chatToolModel: ChatToolModel;
|
|
32
|
+
workflowTaskModel: WorkflowTaskModel;
|
|
33
|
+
};
|
|
34
|
+
export declare const createChatBoxRuntime: (runtime?: Partial<ChatBoxRuntime>) => ChatBoxRuntime;
|
|
35
|
+
export declare const getGlobalChatBoxRuntime: () => ChatBoxRuntime;
|
|
36
|
+
export declare const ChatBoxContext: React.Context<ChatBoxRuntime>;
|
|
37
|
+
export declare const ChatBoxRuntimeProvider: React.FC<{
|
|
38
|
+
runtime: ChatBoxRuntime;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const useChatBoxRuntime: () => ChatBoxRuntime;
|
|
42
|
+
export declare const useResolvedChatBoxRuntime: (runtime?: ChatBoxRuntime) => ChatBoxRuntime;
|
|
43
|
+
export declare const resolveChatBoxScope: (runtime: ChatBoxRuntime, options?: ChatBoxScopeResolverOptions) => Promise<string>;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 type { AIEmployee } from '../../types';
|
|
10
|
+
export type WorkflowTask = {
|
|
11
|
+
id: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
executionId?: number | string;
|
|
14
|
+
workflowTitle: string;
|
|
15
|
+
nodeTitle: string;
|
|
16
|
+
status: string;
|
|
17
|
+
jobStatus?: number;
|
|
18
|
+
read?: boolean;
|
|
19
|
+
config?: {
|
|
20
|
+
username?: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
} | null;
|
|
23
|
+
createdAt?: string;
|
|
24
|
+
updatedAt?: string;
|
|
25
|
+
};
|
|
26
|
+
export type WorkflowTaskOutputSchema = {
|
|
27
|
+
title?: string;
|
|
28
|
+
type?: string;
|
|
29
|
+
properties?: Record<string, WorkflowTaskOutputSchema>;
|
|
30
|
+
};
|
|
31
|
+
export type WorkflowTaskDetail = WorkflowTask & {
|
|
32
|
+
aiEmployee?: AIEmployee | null;
|
|
33
|
+
readonly?: boolean;
|
|
34
|
+
structuredOutputSchema?: WorkflowTaskOutputSchema | string | null;
|
|
35
|
+
config?: {
|
|
36
|
+
username?: string;
|
|
37
|
+
model?: {
|
|
38
|
+
llmService: string;
|
|
39
|
+
model: string;
|
|
40
|
+
} | null;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
} | null;
|
|
43
|
+
};
|
|
44
|
+
type WorkflowTaskStateUpdater<T> = T | ((prev: T) => T);
|
|
45
|
+
export declare const JOB_STATUS: {
|
|
46
|
+
readonly PENDING: 0;
|
|
47
|
+
readonly RESOLVED: 1;
|
|
48
|
+
readonly FAILED: -1;
|
|
49
|
+
readonly ERROR: -2;
|
|
50
|
+
readonly ABORTED: -3;
|
|
51
|
+
readonly CANCELED: -4;
|
|
52
|
+
readonly REJECTED: -5;
|
|
53
|
+
readonly RETRY_NEEDED: -6;
|
|
54
|
+
};
|
|
55
|
+
export declare const normalizeWorkflowTask: (workflowTask: WorkflowTask) => WorkflowTask;
|
|
56
|
+
export declare class WorkflowTaskModel {
|
|
57
|
+
workflowTasks: WorkflowTask[];
|
|
58
|
+
currentWorkflowTask: WorkflowTaskDetail | undefined;
|
|
59
|
+
unreadCount: number;
|
|
60
|
+
loading: boolean;
|
|
61
|
+
keyword: string;
|
|
62
|
+
selectedJobStatus: number | undefined;
|
|
63
|
+
constructor();
|
|
64
|
+
setWorkflowTasks: (workflowTasks: WorkflowTaskStateUpdater<WorkflowTask[]>) => void;
|
|
65
|
+
setCurrentWorkflowTask: (currentWorkflowTask: WorkflowTaskDetail | ((prev?: WorkflowTaskDetail) => WorkflowTaskDetail | undefined)) => void;
|
|
66
|
+
setUnreadCount: (unreadCount: WorkflowTaskStateUpdater<number>) => void;
|
|
67
|
+
markWorkflowTaskRead: (sessionId: string) => void;
|
|
68
|
+
setLoading: (loading: boolean) => void;
|
|
69
|
+
setKeyword: (keyword: string) => void;
|
|
70
|
+
setSelectedJobStatus: (selectedJobStatus: number | undefined) => void;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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 type { APIClient } from '@nocobase/client-v2';
|
|
10
|
+
import type { Attachment, UploadAIFileOptions } from '../types';
|
|
11
|
+
type AIFileUploadRequestOptions = UploadAIFileOptions & {
|
|
12
|
+
action?: string;
|
|
13
|
+
data?: Record<string, string | Blob>;
|
|
14
|
+
fieldName?: string;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
withCredentials?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function uploadAIFile(apiClient: Pick<APIClient, 'request'>, file: Blob, options?: AIFileUploadRequestOptions): Promise<Attachment>;
|
|
19
|
+
export {};
|