fix(chat): honor new-chat intent from secondary pages
Create a fresh local consultation for explicit new-chat navigation and keep reserved recovery from taking over its landing. Add regression tests and record validation gaps for remote review. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import { usePathname } from "next/navigation";
|
||||
import { useEffect, useRef } from "react";
|
||||
import type { Ref } from "react";
|
||||
import { AppLink } from "@/components/app-link";
|
||||
import { persistLoginSessionReturn, sessionHref } from "@/lib/chat-session-url";
|
||||
import { newChatHref, persistLoginSessionReturn, sessionHref } from "@/lib/chat-session-url";
|
||||
import { prefetchSecondaryPage } from "@/lib/secondary-page-data";
|
||||
import {
|
||||
Sidebar,
|
||||
@@ -248,7 +248,7 @@ export function AppSidebar({
|
||||
{showExpandedContent ? <span>{creatingSession ? "正在创建" : "新建对话"}</span> : null}
|
||||
</SidebarMenuButton>
|
||||
) : (
|
||||
<SidebarMenuLink className="new-chat" tooltip="新对话" href="/" onClick={closeDrawer}>
|
||||
<SidebarMenuLink className="new-chat" tooltip="新对话" href={newChatHref()} onClick={closeDrawer}>
|
||||
<SquarePen size={18} strokeWidth={1.75} aria-hidden="true" />
|
||||
{showExpandedContent ? <span>新建对话</span> : null}
|
||||
</SidebarMenuLink>
|
||||
|
||||
Reference in New Issue
Block a user