()
| 308 | * } |
| 309 | */ |
| 310 | export 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 | } |
no test coverage detected