fix(web): keep rectification emit types compatible with next build
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled

The spoken/thinking splitter must accept sync or async emit, matching the runner input type.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-23 10:20:41 +08:00
parent 8f0fa3b994
commit 22010e81b7
3 changed files with 4 additions and 2 deletions
@@ -843,7 +843,7 @@ async function publishSplitSpokenAndThinking(
publishedSpoken: string,
answerText: string,
publish: (event: PublicStreamEvent) => Promise<void>,
emit: (event: PublicStreamEvent) => Promise<void>,
emit: (event: PublicStreamEvent) => Promise<void> | void,
finalize = false,
): Promise<{ thinking: string; spoken: string; spokenDelta: string }> {
const split = finalize
@@ -237,6 +237,8 @@ test("usage completes or releases without hiding settlement failures", () => {
assert.match(run, /thinking: "disabled"/);
assert.match(run, /toPublicThinkingDelta/);
assert.match(run, /splitRectificationSpokenAndThinking/);
assert.match(run, /emit\(event: PublicStreamEvent\): Promise<void> \| void;/);
assert.match(run, /emit: \(event: PublicStreamEvent\) => Promise<void> \| void,/);
assert.match(route, /featureKey: "rectification"/);
assert.match(route, /rectification:case:\$\{caseId\}/);
});