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:
@@ -10,6 +10,10 @@ 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),
|
||||
"utf8",
|
||||
);
|
||||
const messageActions = readFileSync(
|
||||
new URL("../src/components/chat-message-actions.tsx", import.meta.url),
|
||||
"utf8",
|
||||
@@ -223,6 +227,8 @@ test("usage completes or releases without hiding settlement failures", () => {
|
||||
assert.match(run, /billing\.complete\(/);
|
||||
assert.match(run, /billing\.release\(/);
|
||||
assert.match(run, /usage_settlement_failed/);
|
||||
assert.match(run, /thinking: "enabled"/);
|
||||
assert.match(run, /toPublicThinkingDelta/);
|
||||
assert.match(route, /featureKey: "rectification"/);
|
||||
assert.match(route, /rectification:case:\$\{caseId\}/);
|
||||
});
|
||||
@@ -293,6 +299,11 @@ 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(styles, /\.message-thinking-body/);
|
||||
});
|
||||
|
||||
test("completed Agent replies restore feedback, copy and safe in-place regeneration actions", () => {
|
||||
@@ -502,6 +513,7 @@ test("rectification Agent output stays natural and keeps tool execution silent",
|
||||
"utf8",
|
||||
);
|
||||
assert.match(agent, /工具执行过程保持静默/);
|
||||
assert.match(agent, /思考过程必须用简体中文/);
|
||||
assert.match(agent, /本轮做了什么/);
|
||||
assert.match(agent, /完成凭证完全由服务端公开 Activity\/receipt 展示/);
|
||||
assert.match(agent, /禁止只说记下了、会话会保留、以后再继续/);
|
||||
|
||||
Reference in New Issue
Block a user