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
@@ -10,8 +10,8 @@ const chat = readFileSync(
new URL("../src/components/rectification-agentic-chat.tsx", import.meta.url),
"utf8",
);
const messageRow = readFileSync(
new URL("../src/components/chat-message-row.tsx", import.meta.url),
const activityStatus = readFileSync(
new URL("../src/components/agent-activity-status.tsx", import.meta.url),
"utf8",
);
const messageActions = readFileSync(
@@ -300,9 +300,9 @@ test("rectification keeps receipts for the varga sentence and shows live tool pr
assert.match(chat, /回答未完成,已保留现有内容;本次不会扣点/);
assert.doesNotMatch(chat, /reasoning-delta|chain-of-thought/);
assert.match(chat, /event.type === "thinking.delta"/);
assert.match(messageRow, /className="message-thinking"/);
assert.match(messageRow, /思考过程/);
assert.match(messageRow, /userOpen \?\? !hasAnswer/);
assert.match(activityStatus, /className="message-thinking"/);
assert.match(activityStatus, /思考过程/);
assert.match(activityStatus, /userOpen \?\? !hasAnswer/);
assert.match(styles, /\.message-thinking-body/);
});