MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / createTerminal

Method createTerminal

packages/vscode-shim/src/api/WindowAPI.ts:88–119  ·  view source on GitHub ↗
(options?: {
		name?: string
		shellPath?: string
		shellArgs?: string[]
		cwd?: string
		env?: { [key: string]: string | null | undefined }
		iconPath?: ThemeIcon
		hideFromUser?: boolean
		message?: string
		strictEnv?: boolean
	})

Source from the content-addressed store, hash-verified

86 }
87
88 createTerminal(options?: {
89 name?: string
90 shellPath?: string
91 shellArgs?: string[]
92 cwd?: string
93 env?: { [key: string]: string | null | undefined }
94 iconPath?: ThemeIcon
95 hideFromUser?: boolean
96 message?: string
97 strictEnv?: boolean
98 }): Terminal {
99 // Return a mock terminal object
100 return {
101 name: options?.name || "Terminal",
102 processId: Promise.resolve(undefined),
103 creationOptions: options || {},
104 exitStatus: undefined,
105 state: { isInteractedWith: false },
106 sendText: (text: string, _addNewLine?: boolean) => {
107 logs.debug(`Terminal sendText: ${text}`, "VSCode.Terminal")
108 },
109 show: (_preserveFocus?: boolean) => {
110 logs.debug("Terminal show called", "VSCode.Terminal")
111 },
112 hide: () => {
113 logs.debug("Terminal hide called", "VSCode.Terminal")
114 },
115 dispose: () => {
116 logs.debug("Terminal disposed", "VSCode.Terminal")
117 },
118 }
119 }
120
121 showInformationMessage(message: string, ..._items: string[]): Thenable<string | undefined> {
122 logs.info(message, "VSCode.Window")

Callers 1

WindowAPI.test.tsFile · 0.45

Calls 1

debugMethod · 0.65

Tested by

no test coverage detected