mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Set PAGER to cat
This commit is contained in:
@@ -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,
|
||||
|
||||
37
src/integrations/terminal/__tests__/TerminalRegistry.test.ts
Normal file
37
src/integrations/terminal/__tests__/TerminalRegistry.test.ts
Normal file
@@ -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"
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user