Skip to content

Commit 4acf277

Browse files
committed
fix(terminal): address CodeRabbit review findings
1 parent 987bfbb commit 4acf277

5 files changed

Lines changed: 254 additions & 166 deletions

File tree

apps/vscode-e2e/src/suite/tools/fast-exit-shell-race.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suite("Fast-exit shell integration race", function () {
9090
},
9191
text: "FAST_EXIT_SHELL_RACE_E2E",
9292
}),
93-
timeout: 100_000, // TEMP: diagnostic probe, see if the marker ever arrives given patience
93+
timeout: 60_000,
9494
})
9595

9696
const elapsedMs = Date.now() - startedAt

src/core/tools/__tests__/executeCommandTool.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ describe("executeCommandTool", () => {
187187
pushToolResult: mockPushToolResult as unknown as PushToolResult,
188188
})
189189

190-
// Verify - confirm the command was approved and result was pushed
191-
// The custom path handling is tested in integration tests
190+
// Verify - command approved, result pushed, and custom cwd passed to terminal
192191
expect(mockAskApproval).toHaveBeenCalledWith("command", "echo test")
193192
expect(mockPushToolResult).toHaveBeenCalled()
194-
const result = mockPushToolResult.mock.calls[0][0]
195-
expect(result).toContain("Command")
193+
const { TerminalRegistry } = await import("../../../integrations/terminal/TerminalRegistry")
194+
const firstArg = (TerminalRegistry.getOrCreateTerminal as ReturnType<typeof vitest.fn>).mock.calls[0][0]
195+
expect(firstArg).toBe("/custom/path")
196196
})
197197
})
198198

0 commit comments

Comments
 (0)