diff --git a/src/message-runtime.test.ts b/src/message-runtime.test.ts index d8b1540..aeaa923 100644 --- a/src/message-runtime.test.ts +++ b/src/message-runtime.test.ts @@ -344,10 +344,9 @@ describe('createMessageRuntime', () => { is_from_me: true, }, ]); - const actualSessionCommands = - await vi.importActual( - './session-commands.js', - ); + const actualSessionCommands = await vi.importActual< + typeof import('./session-commands.js') + >('./session-commands.js'); vi.mocked(sessionCommands.handleSessionCommand).mockImplementation((opts) => actualSessionCommands.handleSessionCommand(opts), ); @@ -428,10 +427,9 @@ describe('createMessageRuntime', () => { is_from_me: true, }, ]); - const actualSessionCommands = - await vi.importActual( - './session-commands.js', - ); + const actualSessionCommands = await vi.importActual< + typeof import('./session-commands.js') + >('./session-commands.js'); vi.mocked(sessionCommands.handleSessionCommand).mockImplementation((opts) => actualSessionCommands.handleSessionCommand(opts), ); @@ -504,10 +502,9 @@ describe('createMessageRuntime', () => { is_from_me: true, }, ]); - const actualSessionCommands = - await vi.importActual( - './session-commands.js', - ); + const actualSessionCommands = await vi.importActual< + typeof import('./session-commands.js') + >('./session-commands.js'); vi.mocked(sessionCommands.handleSessionCommand).mockImplementation((opts) => actualSessionCommands.handleSessionCommand(opts), ); diff --git a/src/paired-execution-context.test.ts b/src/paired-execution-context.test.ts index b4d0d2d..65e2d47 100644 --- a/src/paired-execution-context.test.ts +++ b/src/paired-execution-context.test.ts @@ -442,7 +442,9 @@ describe('paired execution context', () => { roomRoleContext: ownerContext, }); - expect(pairedWorkspaceManager.markPairedTaskReviewReady).not.toHaveBeenCalled(); + expect( + pairedWorkspaceManager.markPairedTaskReviewReady, + ).not.toHaveBeenCalled(); expect(result).toEqual({ status: 'blocked', task: expect.objectContaining({ diff --git a/src/paired-execution-context.ts b/src/paired-execution-context.ts index f1de89b..bd7b046 100644 --- a/src/paired-execution-context.ts +++ b/src/paired-execution-context.ts @@ -407,7 +407,9 @@ export function setRoomTaskRiskLevel(args: { if (riskLevel === 'high') { updatePairedTask(task.id, { risk_level: 'high', - plan_status: hasCompletePlanArtifacts(task.id) ? 'pending' : 'not_requested', + plan_status: hasCompletePlanArtifacts(task.id) + ? 'pending' + : 'not_requested', status: 'plan_review_pending', updated_at: now, }); diff --git a/src/session-commands.test.ts b/src/session-commands.test.ts index cca841b..806b2b8 100644 --- a/src/session-commands.test.ts +++ b/src/session-commands.test.ts @@ -141,9 +141,9 @@ describe('isSessionCommandControlMessage', () => { }); it('matches plan artifact control output', () => { - expect(isSessionCommandControlMessage('Plan recorded.\n- Task: task-1')).toBe( - true, - ); + expect( + isSessionCommandControlMessage('Plan recorded.\n- Task: task-1'), + ).toBe(true); }); it('does not match regular bot conversation', () => { diff --git a/src/session-commands.ts b/src/session-commands.ts index 2c01ab7..fd7919d 100644 --- a/src/session-commands.ts +++ b/src/session-commands.ts @@ -198,14 +198,17 @@ export async function handleSessionCommand(opts: { } if (command === '/risk') { - const riskArg = normalizedCommandText.slice('/risk'.length).trim().toLowerCase(); + const riskArg = normalizedCommandText + .slice('/risk'.length) + .trim() + .toLowerCase(); const riskLevel = riskArg === 'high' ? 'high' : riskArg === 'low' ? 'low' : null; deps.advanceCursor(cmdMsg.timestamp); await deps.sendMessage( riskLevel - ? (await deps.setTaskRiskLevel(riskLevel)) ?? - 'Risk is unavailable for this room.' + ? ((await deps.setTaskRiskLevel(riskLevel)) ?? + 'Risk is unavailable for this room.') : 'Usage: /risk ', ); return { handled: true, success: true }; @@ -234,7 +237,8 @@ export async function handleSessionCommand(opts: { if (command === '/approve-plan') { deps.advanceCursor(cmdMsg.timestamp); await deps.sendMessage( - (await deps.approvePlan()) ?? 'Plan approval is unavailable for this room.', + (await deps.approvePlan()) ?? + 'Plan approval is unavailable for this room.', ); return { handled: true, success: true }; }