From 2bee467f1abbdf4ea6b6798e1463d18840f097e9 Mon Sep 17 00:00:00 2001 From: yibo Date: Tue, 1 Sep 2026 13:03:30 +0800 Subject: [PATCH] feat(graph-console): 底部聊天条联动 CEO agent,自动带上当前 task/goal 上下文 --- web/src/components/GraphChatBar.vue | 309 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/src/views/GraphConsole.vue | 16 ++++++++++++++++ 2 files changed, 325 insertions(+), 0 deletions(-) create mode 100644 web/src/components/GraphChatBar.vue diff --git a/web/src/components/GraphChatBar.vue b/web/src/components/GraphChatBar.vue new file mode 100644 index 0000000..840d2f9 --- /dev/null +++ b/web/src/components/GraphChatBar.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/web/src/views/GraphConsole.vue b/web/src/views/GraphConsole.vue index 55669ef..24356df 100644 --- a/web/src/views/GraphConsole.vue +++ b/web/src/views/GraphConsole.vue @@ -171,6 +171,8 @@ /> + + @@ -183,6 +185,7 @@ import NodeDetailPanel from '@/components/graph-console/NodeDetailPanel.vue'; import ReplanOrgGraphButton from '@/components/graph-console/ReplanOrgGraphButton.vue'; import GoalTaskPane from '@/components/graph-console/GoalTaskPane.vue'; import TaskFilesPanel from '@/components/graph-console/TaskFilesPanel.vue'; +import GraphChatBar from '@/components/GraphChatBar.vue'; import { findTask, pickDefaultSelection, runStateToTaskPatch, hasStartedRun, pendingRunHint, } from '@/components/graph-console/goal-task-model.js'; @@ -263,6 +266,19 @@ const taskProjectRoot = computed(() => rootState.value.projectRoot ?? midState.v const selectedTask = computed(() => (findTask(goals.value, selectedTaskId.value) || {}).task || null); +// 底部聊天条要带给 agent 的当前上下文(GraphChatBar 消费) +const chatContext = computed(() => { + const hit = findTask(goals.value, selectedTaskId.value); + if (!hit) return null; + return { + taskId: hit.task.taskId, + taskTitle: hit.task.title, + taskStatus: hit.task.status, + goalId: hit.goal.goalId, + goalTitle: hit.goal.title, + }; +}); + /** * **左栏画哪张图,由选中的 task 决定**(P3C §七.3 / §一.A)。 * -- libgit2 0.21.4