feat(frontend): bind sessions to chart profiles

This commit is contained in:
Jesse_Chen
2026-08-30 15:55:45 +08:00
parent 5c1d095f69
commit f5e6d51646
6 changed files with 120 additions and 5 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ export async function GET() {
if (authError || !user) return NextResponse.json({ error: "请先登录" }, { status: 401 });
const { data, error } = await supabase
.from("chat_sessions")
.select("id,title,theme,model_id,messages,session_type,rectification_case_id,updated_at")
.select("id,title,theme,model_id,messages,session_type,rectification_case_id,chart_profile_id,chart_profile_name,chart_profile_role,updated_at")
.eq("user_id", user.id)
.order("updated_at", { ascending: false });
if (error) return NextResponse.json({ error: "聊天记录暂时无法读取" }, { status: 500 });