fix: 四处 router.push 缺 /page 前缀导致 404
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
a508969331
commit
eb41da78f2
3 files changed
+4
-4
No files matched your search
@@ -91,7 +91,7 @@ export function AgentCard({ agent }: AgentCardProps) {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
function handleChat() {
|
function handleChat() {
|
||||||
router.push(`/workspace/agents/${agent.id}/chats/new`);
|
router.push(`/page/workspace/agents/${agent.id}/chats/new`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete() {
|
async function handleDelete() {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export function SkillEvolutionPanel() {
|
|||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => router.push("/workspace/skills")}
|
onClick={() => router.push("/page/workspace/skills")}
|
||||||
>
|
>
|
||||||
<ArrowLeftIcon className="size-4" />
|
<ArrowLeftIcon className="size-4" />
|
||||||
{tt.backToSkills}
|
{tt.backToSkills}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ export default function NewAgentPage() {
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
onClick={() => router.push("/workspace/agents")}
|
onClick={() => router.push("/page/workspace/agents")}
|
||||||
>
|
>
|
||||||
<ArrowLeftIcon className="h-4 w-4" />
|
<ArrowLeftIcon className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -336,7 +336,7 @@ export default function NewAgentPage() {
|
|||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => router.push(`/workspace/agents/${agent.id}/chats/new`)}
|
onClick={() => router.push(`/page/workspace/agents/${agent.id}/chats/new`)}
|
||||||
>
|
>
|
||||||
<CheckCircleIcon className="h-4 w-4" />
|
<CheckCircleIcon className="h-4 w-4" />
|
||||||
开始对话
|
开始对话
|
||||||
|
|||||||
Reference in new issue
Block a user