fix(rectification): stop re-parsing settled messages on every stream frame
This commit is contained in:
@@ -100,7 +100,11 @@ test("rectification abort settles as stopped, not a failed alert", () => {
|
||||
assert.match(rectification, /stopped: true/);
|
||||
assert.match(rectification, /failed: false,\s*stopped: true/);
|
||||
assert.doesNotMatch(rectification, /if \(raw\.trim\(\)\) setError\(RECTIFICATION_STOPPED_NOTICE\)/);
|
||||
assert.match(rectification, /stoppedNotice=\{message\.stopped \? RECTIFICATION_STOPPED_NOTICE : undefined\}/);
|
||||
// 原值: 停止提示 prop 写在 rectification-agentic-chat.tsx。
|
||||
// 新值: 同一表达式在行组件内。
|
||||
// 原因: BUG-725。
|
||||
const messageEntry = readFileSync(new URL("../src/components/rectification-message-entry.tsx", import.meta.url), "utf8");
|
||||
assert.match(messageEntry, /stoppedNotice=\{message\.stopped \? RECTIFICATION_STOPPED_NOTICE : undefined\}/);
|
||||
assert.match(messageRow, /stoppedNotice/);
|
||||
assert.match(messageRow, /className="message-stopped-notice"/);
|
||||
assert.equal(RECTIFICATION_STOPPED_NOTICE, "已停止,已生成的内容保留;本次不会扣点。");
|
||||
|
||||
Reference in New Issue
Block a user