fix(web): keep thinking off the spoken consult and rectification answer

Enumerate evidence kinds so education cannot be proposed as a kind, and stream Chinese thinking on a separate channel that collapses when the reply arrives.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-21 21:30:55 +08:00
co-authored by Cursor
parent 56577504d8
commit 4e247c112e
27 changed files with 465 additions and 73 deletions
@@ -17,7 +17,7 @@ import {
rectificationToolActivityPhase,
} from "../src/lib/rectification-activity-labels.ts";
test("generation settings reserve visible tokens and disable thinking", () => {
test("generation settings reserve visible tokens and disable thinking by default", () => {
const settings = agentGenerationSettings({ providerId: "deepseek" });
assert.equal(AGENT_MAX_OUTPUT_TOKENS, 8192);
assert.equal(settings.modelSettings.maxOutputTokens, 8192);
@@ -25,6 +25,13 @@ test("generation settings reserve visible tokens and disable thinking", () => {
assert.deepEqual(settings.providerOptions.deepseek, { thinking: { type: "disabled" } });
});
test("rectification can enable a separate thinking channel without changing the visible budget", () => {
const settings = agentGenerationSettings({ providerId: "deepseek" }, { thinking: "enabled" });
assert.equal(settings.modelSettings.maxOutputTokens, 8192);
assert.deepEqual(settings.providerOptions.openai, { thinking: { type: "enabled" } });
assert.deepEqual(settings.providerOptions.deepseek, { thinking: { type: "enabled" } });
});
test("activity elapsed copy stays hidden until eight seconds", () => {
assert.equal(activityElapsedLabel(1_000, 8_999), null);
assert.equal(activityElapsedLabel(1_000, 9_000), "已用时 8 秒");