feat(navigation): 为数字人前台拆分独立页面路由

- 新增对话列表、聊天、角色详情、书架详情及个人资料独立路由
- 导航使用真实链接,补齐历史返回、登录深链与会话草稿恢复
- 搜索筛选由 URL 驱动,修复浏览器返回时丢失筛选的问题
- 补齐路由校验回归、页面加载与异常入口,并同步 README
This commit is contained in:
湛兮
2026-10-28 17:07:34 +08:00
parent caa54c9b34
commit 4132b80ee0
25 changed files with 801 additions and 192 deletions
+7 -1
View File
@@ -1,4 +1,6 @@
/** 数字人客户端协议与事件解码,不包含模型凭据或实验操作。 */
import { expiredDigitalSessionPath } from "./digital-routes";
/** 前台可见内容摘要,提示词不会下发。 */
export type Card = {
id: string;
@@ -64,7 +66,11 @@ export async function digital<T>(
});
const data = await response.json();
if (response.status === 401) {
window.location.assign("/login");
window.location.assign(
expiredDigitalSessionPath(
window.location.pathname + window.location.search,
),
);
throw new Error("登录已过期");
}
if (!response.ok || data.success === false)