test(coding-agent): stub setTextOutputCommitted in print mocks

Added the no-op setter to lightweight print-mode session mocks so text-mode runs without a submitted prompt no longer throw at the final commit call.

Fixes #7625
This commit is contained in:
roboomp
2026-08-04 13:57:04 +00:00
parent 929ab1a20f
commit fe6e9c28ab
2 changed files with 2 additions and 0 deletions
@@ -40,6 +40,7 @@ describe("print-mode error exit disposes the session before exit", () => {
state: { messages: [errorMsg] },
getLastAssistantMessage: () => errorMsg,
prepareForHeadlessAdvisorDrain: () => {},
setTextOutputCommitted: () => {},
waitForAdvisorCatchup: async () => {
order.push("catchup");
return true;
@@ -55,6 +55,7 @@ function createMockSession(
subscribe: () => () => {},
prompt: async () => {},
prepareForHeadlessAdvisorDrain: () => {},
setTextOutputCommitted: () => {},
waitForAdvisorCatchup: async () => true,
dispose,
} as unknown as AgentSession;