MCPcopy Create free account
hub / github.com/anus-dev/ANUS / terminalSetup

Function terminalSetup

packages/cli/src/ui/utils/terminalSetup.ts:310–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

308 * }
309 */
310export async function terminalSetup(): Promise<TerminalSetupResult> {
311 // Check if terminal already has optimal keyboard support
312 if (isKittyProtocolEnabled()) {
313 return {
314 success: true,
315 message:
316 'Your terminal is already configured for an optimal experience with multiline input (Shift+Enter and Ctrl+Enter).',
317 };
318 }
319
320 const terminal = await detectTerminal();
321
322 if (!terminal) {
323 return {
324 success: false,
325 message:
326 'Could not detect terminal type. Supported terminals: VS Code, Cursor, and Windsurf.',
327 };
328 }
329
330 switch (terminal) {
331 case 'vscode':
332 return configureVSCode();
333 case 'cursor':
334 return configureCursor();
335 case 'windsurf':
336 return configureWindsurf();
337 default:
338 return {
339 success: false,
340 message: `Terminal "${terminal}" is not supported yet.`,
341 };
342 }
343}

Callers 1

Calls 5

isKittyProtocolEnabledFunction · 0.85
detectTerminalFunction · 0.85
configureVSCodeFunction · 0.85
configureCursorFunction · 0.85
configureWindsurfFunction · 0.85

Tested by

no test coverage detected