MCPcopy Create free account
hub / github.com/codeaashu/claude-code / call

Function call

src/commands/terminalSetup/terminalSetup.tsx:142–185  ·  view source on GitHub ↗
(onDone: LocalJSXCommandOnDone, context: ToolUseContext & LocalJSXCommandContext, _args: string)

Source from the content-addressed store, hash-verified

140 }
141}
142export async function call(onDone: LocalJSXCommandOnDone, context: ToolUseContext & LocalJSXCommandContext, _args: string): Promise<null> {
143 if (env.terminal && env.terminal in NATIVE_CSIU_TERMINALS) {
144 const message = `Shift+Enter is natively supported in ${NATIVE_CSIU_TERMINALS[env.terminal]}.
145
146No configuration needed. Just use Shift+Enter to add newlines.`;
147 onDone(message);
148 return null;
149 }
150
151 // Check if terminal is supported
152 if (!shouldOfferTerminalSetup()) {
153 const terminalName = env.terminal || 'your current terminal';
154 const currentPlatform = getPlatform();
155
156 // Build platform-specific terminal suggestions
157 let platformTerminals = '';
158 if (currentPlatform === 'macos') {
159 platformTerminals = ' • macOS: Apple Terminal\n';
160 } else if (currentPlatform === 'windows') {
161 platformTerminals = ' • Windows: Windows Terminal\n';
162 }
163 // For Linux and other platforms, we don't show native terminal options
164 // since they're not currently supported
165
166 const message = `Terminal setup cannot be run from ${terminalName}.
167
168This command configures a convenient Shift+Enter shortcut for multi-line prompts.
169${chalk.dim('Note: You can already use backslash (\\\\) + return to add newlines.')}
170
171To set up the shortcut (optional):
1721. Exit tmux/screen temporarily
1732. Run /terminal-setup directly in one of these terminals:
174${platformTerminals} • IDE: VSCode, Cursor, Windsurf, Zed
175 • Other: Alacritty
1763. Return to tmux/screen - settings will persist
177
178${chalk.dim('Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.')}`;
179 onDone(message);
180 return null;
181 }
182 const result = await setupTerminal(context.options.theme);
183 onDone(result);
184 return null;
185}
186type VSCodeKeybinding = {
187 key: string;
188 command: string;

Callers

nothing calls this directly

Calls 4

shouldOfferTerminalSetupFunction · 0.85
getPlatformFunction · 0.85
setupTerminalFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected