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 @@