From eb41da78f28dac616a89cc6f0535badd47f210f2 Mon Sep 17 00:00:00 2001 From: xuhd Date: Thu, 14 May 2026 17:56:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9B=E5=A4=84=20router.push=20?= =?UTF-8?q?=E7=BC=BA=20/page=20=E5=89=8D=E7=BC=80=E5=AF=BC=E8=87=B4=20404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HashRouter 顶层路由是 /page/*,所有 workspace 子路由必须带这个前缀 才能命中。以下四处 router.push 字面量遗漏,点击后落到 NotFoundPage: - skill-evolution-panel.tsx 返回技能按钮 - NewAgentPage.tsx 返回 agents - NewAgentPage.tsx 创建后“开始对话” - agent-card.tsx 列表卡片“聊天”按钮 Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend-web/src/components/workspace/agents/agent-card.tsx | 2 +- .../src/components/workspace/skills/skill-evolution-panel.tsx | 2 +- frontend-web/src/pages/NewAgentPage.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend-web/src/components/workspace/agents/agent-card.tsx b/frontend-web/src/components/workspace/agents/agent-card.tsx index 86f32274..bbae87fd 100644 --- a/frontend-web/src/components/workspace/agents/agent-card.tsx +++ b/frontend-web/src/components/workspace/agents/agent-card.tsx @@ -91,7 +91,7 @@ export function AgentCard({ agent }: AgentCardProps) { ]); function handleChat() { - router.push(`/workspace/agents/${agent.id}/chats/new`); + router.push(`/page/workspace/agents/${agent.id}/chats/new`); } async function handleDelete() { diff --git a/frontend-web/src/components/workspace/skills/skill-evolution-panel.tsx b/frontend-web/src/components/workspace/skills/skill-evolution-panel.tsx index db703875..d91ad88e 100644 --- a/frontend-web/src/components/workspace/skills/skill-evolution-panel.tsx +++ b/frontend-web/src/components/workspace/skills/skill-evolution-panel.tsx @@ -50,7 +50,7 @@ export function SkillEvolutionPanel() { @@ -336,7 +336,7 @@ export default function NewAgentPage() {