fix(web): persist thinking, title sessions distinctly, and send follow-ups from the answer

Thinking disappeared on failure and never reached session storage. Keep the
sanitized chain on disk and on errors, and regroup the sidebar around reports,
charts, favorites, and dated history titles.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-22 09:10:47 +08:00
co-authored by Cursor
parent 649ba32034
commit 59559d4b24
27 changed files with 741 additions and 179 deletions
+27
View File
@@ -58,6 +58,33 @@ test("general no-birth-time replies keep a question-specific session title", ()
assert.equal(resolveSessionTitle("工作变化的重点是什么?", "事业方向与工作变化"), "事业方向与工作变化");
});
test("daily and topic consultations get distinct dated or domain titles", () => {
const at = new Date(2026, 7, 22, 8, 36);
assert.equal(
resolveSessionTitle("深入看今日", undefined, { entrypoint: "daily_starlanguage", at }),
"8月22日 · 今日节奏",
);
assert.equal(
resolveSessionTitle("深入看今日", undefined, {
entrypoint: "daily_starlanguage",
at,
existingTitles: ["8月22日 · 今日节奏"],
}),
"8月22日 · 今日节奏 08:36",
);
assert.equal(
resolveSessionTitle("请帮我梳理目前的事业方向和下一步重点。", undefined, { theme: "career", at }),
"事业 · 请帮我梳理目前的事业…",
);
assert.equal(
resolveSessionTitle("请用刚才采用的代表性出生时间看盘。", undefined, {
entrypoint: "birth_time_rectification",
at,
}),
"8月22日 · 生时校正",
);
});
test("a stored legacy suggestion block is stripped and never becomes suggested questions", () => {
// Answers written before the follow-up chips were removed still carry this block, and