From 78ee062c4d0a28aaba3911f931d1a338e5e708ce Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 21 Jan 2026 05:10:57 +0100 Subject: [PATCH] fix: update assignTask to use BufferAccumulator API - Fix TypeScript error: assignTask() was still using string assignment - Add extended timeout to session.test.ts afterAll hook to prevent flaky test failures during cleanup Co-Authored-By: Claude Opus 4.5 --- src/session.ts | 4 ++-- test/session.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/session.ts b/src/session.ts index 2e2f5fc3..8fd69402 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1317,9 +1317,9 @@ export class Session extends EventEmitter { assignTask(taskId: string): void { this._currentTaskId = taskId; this._status = 'busy'; - this._terminalBuffer = ''; + this._terminalBuffer.clear(); this._outputBuffer = ''; - this._textOutput = ''; + this._textOutput.clear(); this._errorBuffer = ''; this._messages = []; this._lastActivityAt = Date.now(); diff --git a/test/session.test.ts b/test/session.test.ts index 4e3e31c2..37146936 100644 --- a/test/session.test.ts +++ b/test/session.test.ts @@ -15,7 +15,7 @@ describe('Interactive Session Lifecycle', () => { afterAll(async () => { await server.stop(); - }); + }, 60000); // Extended timeout for cleanup describe('Session Creation', () => { it('should create session with default working directory', async () => {