fix(web): keep rectification emit types compatible with next build
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:
@@ -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\}/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user