Skip to content

重构首页为重定向,线性聊天移至 /chat - #11

Open
hifizz wants to merge 1 commit into
mainfrom
claude/supabase-vector-deployment-sfkifu
Open

重构首页为重定向,线性聊天移至 /chat#11
hifizz wants to merge 1 commit into
mainfrom
claude/supabase-vector-deployment-sfkifu

Conversation

@hifizz

@hifizz hifizz commented Jul 15, 2026

Copy link
Copy Markdown
Owner

概述

重构应用的路由结构,将首页(/)改为重定向到线程聊天(/thread-chat),并将原有的线性聊天界面独立为 /chat 页面。

主要变更

  • app/page.tsx:从完整的聊天界面组件改为服务端重定向页面,直接跳转到 /thread-chat

    • 移除了 useMyChatRuntime() 钩子和所有 assistant-ui 运行时配置
    • 移除了 AssistantRuntimeProvider 和相关组件挂载
    • 添加了中文注释说明路由逻辑:首页跳转到线程聊天,线程聊天的根路径会再跳转到最近一棵或新建的线程
  • app/chat/page.tsx(新增):独立的线性聊天页面

    • 包含原 app/page.tsx 的全部聊天逻辑和运行时配置
    • 保留 useMyChatRuntime() 钩子,包括深度研究模式的状态传递
    • 保留 Postgres 线程历史、R2 附件适配器等持久化配置
    • 使用 "use client" 指令标记为客户端组件

实现细节

  • 首页现在是一个轻量级的服务端组件,仅负责重定向逻辑
  • 线性聊天和线程聊天现在是两个独立的路由,各自维护自己的运行时配置
  • 保持了所有原有的功能完整性(工具、适配器、深度研究模式等)

https://claude.ai/code/session_01XBBcvrTHkUkk2fxVqN8NBM

- app/page.tsx 改为服务端 redirect("/thread-chat"),打开根路径直接进
  Thread Chat(裸路径再跳到最近一棵/新建的 /thread-chat/{treeId})
- 原 assistant-ui 线性聊天整页移到 app/chat/page.tsx,保留全部能力
  (线程持久化、工具、附件),仅不再作为首页

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBBcvrTHkUkk2fxVqN8NBM
@cr-gpt

cr-gpt Bot commented Jul 15, 2026

Copy link
Copy Markdown

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
thread-chatbot Ready Ready Preview, Comment Jul 15, 2026 3:08pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants