Skip to content

Commit 5ffed42

Browse files
committed
fix(terminal): address code review minor issues from merge Zoo-Code-Org#333
- Clear activeShellExecution in TerminalProcess no_shell_integration handler to prevent stale references after stream timeout - Remove unused getWslProfile import and spy from Terminal.spec.ts (Terminal constructor no longer calls getWslProfile) - Rebrand leftover "Roo Code" mock names to "Zoo Code" in test files (TerminalProcess.spec.ts, TerminalProfile.spec.ts)
1 parent f1e065d commit 5ffed42

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/integrations/terminal/TerminalProcess.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class TerminalProcess extends BaseTerminalProcess {
2929
this.once("no_shell_integration", () => {
3030
this.emit("completed", "<no shell integration>")
3131
this.terminal.busy = false
32+
this.terminal.activeShellExecution = undefined
3233
this.terminal.setActiveStream(undefined)
3334
this.continue()
3435
})

src/integrations/terminal/__tests__/Terminal.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as vscode from "vscode"
55
import { BaseTerminal } from "../BaseTerminal"
66
import { Terminal } from "../Terminal"
77
import { ShellIntegrationManager } from "../ShellIntegrationManager"
8-
import * as shellUtils from "../../../utils/shell"
98

109
/** Builds a realistic vscode.Terminal stub. */
1110
function makeTerminal(overrides: Partial<vscode.Terminal> = {}): vscode.Terminal {
@@ -37,7 +36,6 @@ describe("Terminal", () => {
3736
}
3837

3938
// Default mocks: no WSL, no execaShellPath, no ZDOTDIR.
40-
vi.spyOn(shellUtils, "getWslProfile").mockReturnValue(null)
4139
BaseTerminal.setExecaShellPath(undefined)
4240
;(Terminal as any).getTerminalZdotdir = vi.fn().mockReturnValue(false)
4341
vi.spyOn(Terminal, "getShellIntegrationTimeout" as any).mockReturnValue(15_000)

src/integrations/terminal/__tests__/TerminalProcess.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe("TerminalProcess", () => {
3535
shellIntegration: {
3636
executeCommand: vi.fn(),
3737
},
38-
name: "Roo Code",
38+
name: "Zoo Code",
3939
processId: Promise.resolve(123),
4040
creationOptions: {},
4141
exitStatus: undefined,

src/integrations/terminal/__tests__/TerminalProfile.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("Terminal VS Code terminal profile (#277)", () => {
2727
const mockTerminal = () =>
2828
({
2929
exitStatus: undefined,
30-
name: "Roo Code",
30+
name: "Zoo Code",
3131
processId: Promise.resolve(123),
3232
creationOptions: {},
3333
state: { isInteractedWith: true },

0 commit comments

Comments
 (0)