From 71242687b874bf32c55c1a2b5813917740c7e399 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 20 Oct 2026 14:52:29 +0800 Subject: [PATCH] feat: application setting --- ui/src/api/API_README.md | 5 + ui/src/api/types/application.ts | 11 +- .../components/global/mk-list-item/index.vue | 2 +- ui/src/views/VIEW_README.md | 19 + .../components/ButtonKnowledgeSetting.vue | 151 +++++ .../components/ButtonLongTermSetting.vue | 273 +++++++++ .../application-detail/setting/index.vue | 531 +++++++++++++++++- .../application-detail/setting/settings.ts | 169 ++++++ .../publish-history/PublishHistoryDrawer.vue | 7 +- .../component/node-search-scope/index.vue | 9 +- .../nodes/ai-chat-node/index.vue | 4 +- .../workflow-canvas/nodes/base-node/index.vue | 2 +- .../component/SearchSetting.vue | 2 +- 13 files changed, 1166 insertions(+), 19 deletions(-) create mode 100644 ui/src/views/application-detail/setting/components/ButtonKnowledgeSetting.vue create mode 100644 ui/src/views/application-detail/setting/components/ButtonLongTermSetting.vue create mode 100644 ui/src/views/application-detail/setting/settings.ts diff --git a/ui/src/api/API_README.md b/ui/src/api/API_README.md index 0e310e5f54d..051e8aa2f36 100644 --- a/ui/src/api/API_README.md +++ b/ui/src/api/API_README.md @@ -636,6 +636,11 @@ Workspace 清除策略通过 PUT `batch_clean_time` 提交当前智能体的单 知识库及目标文档选项通过当前范围 Knowledge/Document API 查询,文档使用 `getAllDocuments(knowledgeId)`。 聊天记录与标注接口保留在同一 API 文件;日志详情使用现有 `LogConversation`,其聊天记录查询仍使用 Workspace API。 +简易智能体详情的 `model`、`stt_model`、`tts_model`、`long_term_model` 为模型 ID 响应别名, +`knowledge_list` 为已关联知识库快照;保存映射到对应的 `*_model_id` 字段(主模型为 `model_id`)。 +语音及长期记忆模型的空 ID 使用 `null`,不提交空 UUID 字符串;简易设置不将详情的 `work_flow` +回传,避免触发工作流配置提取。 + ### 智能体发布渠道 `admin/workspace/application/access.ts` 和 `admin/system/resource-management/application/access.ts` diff --git a/ui/src/api/types/application.ts b/ui/src/api/types/application.ts index 1d6e796e417..bbbb04e2f9c 100644 --- a/ui/src/api/types/application.ts +++ b/ui/src/api/types/application.ts @@ -5,6 +5,7 @@ import { APPLICATION_ACCESS_PLATFORM, APPLICATION_TYPE } from '@/api/enums' import type { DefaultModelSettingPayload } from './model' import type { WorkflowStoreTemplate } from './workflow-template' import type { Dict } from './common' +import type { KnowledgeItem } from './knowledge' export type ApplicationType = (typeof APPLICATION_TYPE)[keyof typeof APPLICATION_TYPE] @@ -26,6 +27,10 @@ export interface ApplicationAccessStatusPayload { export interface ApplicationDetail extends Omit { /** 详情接口返回的主模型 ID。 */ model?: string | null + stt_model?: string | null + tts_model?: string | null + long_term_model?: string | null + knowledge_list?: KnowledgeItem[] default_model_setting?: DefaultModelSettingPayload create_time?: string desc?: string | null @@ -67,8 +72,8 @@ export interface ApplicationFormPayload { model_params_setting?: Record tts_model_params_setting?: Record stt_model_params_setting?: Record - stt_model_id?: string - tts_model_id?: string + stt_model_id?: string | null + tts_model_id?: string | null stt_model_enable?: boolean tts_model_enable?: boolean tts_type?: string @@ -88,7 +93,7 @@ export interface ApplicationFormPayload { mcp_output_enable?: boolean work_flow_template?: Record long_term_enable?: boolean - long_term_model_id?: string + long_term_model_id?: string | null long_term_model_params_setting?: Record long_term_trigger_setting?: Record long_term_trigger_type?: string diff --git a/ui/src/components/global/mk-list-item/index.vue b/ui/src/components/global/mk-list-item/index.vue index 7374de4534e..a4de4c2b98f 100644 --- a/ui/src/components/global/mk-list-item/index.vue +++ b/ui/src/components/global/mk-list-item/index.vue @@ -27,7 +27,7 @@ const hasActionDropdown = computed(() => hasRenderableSlotContent(slots['action-