diff --git a/src/integrations/terminal/TerminalRegistry.ts b/src/integrations/terminal/TerminalRegistry.ts index ac0ed30..5937047 100644 --- a/src/integrations/terminal/TerminalRegistry.ts +++ b/src/integrations/terminal/TerminalRegistry.ts @@ -16,8 +16,11 @@ export class TerminalRegistry { static createTerminal(cwd?: string | vscode.Uri | undefined): TerminalInfo { const terminal = vscode.window.createTerminal({ cwd, - name: "Cline", - iconPath: new vscode.ThemeIcon("robot"), + name: "Roo Cline", + iconPath: new vscode.ThemeIcon("rocket"), + env: { + PAGER: "cat" + } }) const newInfo: TerminalInfo = { terminal, diff --git a/src/integrations/terminal/__tests__/TerminalRegistry.test.ts b/src/integrations/terminal/__tests__/TerminalRegistry.test.ts new file mode 100644 index 0000000..9aa2483 --- /dev/null +++ b/src/integrations/terminal/__tests__/TerminalRegistry.test.ts @@ -0,0 +1,37 @@ +import * as vscode from "vscode" +import { TerminalRegistry } from "../TerminalRegistry" + +// Mock vscode.window.createTerminal +const mockCreateTerminal = jest.fn() +jest.mock("vscode", () => ({ + window: { + createTerminal: (...args: any[]) => { + mockCreateTerminal(...args) + return { + exitStatus: undefined, + } + }, + }, + ThemeIcon: jest.fn(), +})) + +describe("TerminalRegistry", () => { + beforeEach(() => { + mockCreateTerminal.mockClear() + }) + + describe("createTerminal", () => { + it("creates terminal with PAGER set to cat", () => { + TerminalRegistry.createTerminal("/test/path") + + expect(mockCreateTerminal).toHaveBeenCalledWith({ + cwd: "/test/path", + name: "Roo Cline", + iconPath: expect.any(Object), + env: { + PAGER: "cat" + } + }) + }) + }) +}) \ No newline at end of file