From ab7bb9fc427af1707ee9b66758900ed9535133e3 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Tue, 7 Jul 2026 16:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=B4=E6=97=B6=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/components/InputBar.vue | 14 +++++--- src/views/home/components/Sidebar.vue | 3 +- src/views/home/index.vue | 49 ++++++++++++++++---------- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/src/views/home/components/InputBar.vue b/src/views/home/components/InputBar.vue index fc3d353..00defdd 100644 --- a/src/views/home/components/InputBar.vue +++ b/src/views/home/components/InputBar.vue @@ -39,7 +39,7 @@
Shift+Enter 换行 -
@@ -68,6 +68,10 @@ import { Top, MagicStick, Promotion, Close, Paperclip } from '@element-plus/icon import { ElMessage } from 'element-plus'; import { getWorkflowList } from '/@/api/settings/creation'; +interface Props { + sendDisabled?: boolean; +} + interface Emits { (e: 'send', message: string): void; (e: 'workflow-select', workflowId: string | null): void; @@ -79,6 +83,9 @@ interface Workflow { prefix: string; } +const props = withDefaults(defineProps(), { + sendDisabled: false, +}); const emit = defineEmits(); const message = ref(''); const isFocused = ref(false); @@ -100,12 +107,11 @@ const fetchWorkflows = async () => { }; const handleSend = () => { - if (selectedWorkflowId.value === null) return; + if (selectedWorkflowId.value === null || props.sendDisabled) return; const msg = message.value.trim(); emit('send', msg || ''); message.value = ''; - selectedWorkflowId.value = null; - emit('workflow-select', null); + // 不清除工作流选择,保持表单可见 }; const handleAttachment = () => { diff --git a/src/views/home/components/Sidebar.vue b/src/views/home/components/Sidebar.vue index e7b3484..53fb0b5 100644 --- a/src/views/home/components/Sidebar.vue +++ b/src/views/home/components/Sidebar.vue @@ -89,13 +89,12 @@ interface TreeNode { nodeType: string; children?: TreeNode[]; fileUrl?: string; - workflowId?: number | string; fileType?: string; - sessionId?: string; } interface HistoryItem { id: string; + sessionId: string; title: string; time: string; status?: 'idle' | 'executing' | 'completed' | 'failed'; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 8c68b37..dfa20bb 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -24,7 +24,7 @@ :active-history-id="activeHistoryId" @close-workflow="handleCloseWorkflow" /> - + @@ -46,7 +46,7 @@