Open
Conversation
Replaces the hardcoded macOS Terminal.app launch with a user-configurable terminal picker. - 'Open In CLI' btn now has dropdown menu supporting autodetection of installed termainls: Ghostty, iTerm2, Warp, OSX Terminal or 'browse to application path selections' - Selecting a termainal from dropdown sets it as default (persists via `clui-settings` via `localStorage` (e.g. theme/sound prefs) - 'Browse....' option opens native OS file picker modal to choose any executable - 'Open in CLI' btn always uses stored preference, or fallsback to first selected terminal **Files added:** - `src/main/terminal-detector.ts` — scans for known terminal `.app` bundles - `src/main/terminal-launcher.ts` — per-terminal launch logic: AppleScript for Terminal/iTerm2, Ghostty's `-e` flag, `open -a` for Warp - `src/renderer/components/TerminalPicker.tsx` — the dropdown UI component **Files modified:** - `src/shared/types.ts` — added `DetectedTerminal`, `TerminalLaunchMethod`, and two new IPC constants - `src/main/index.ts` — updated `OPEN_IN_TERMINAL` handler to accept `terminalName`, added `DETECT_TERMINALS` and `SELECT_CUSTOM_TERMINAL` handlers - `src/preload/index.ts` — exposed the two new IPC methods on `window.clui` - `src/renderer/theme.ts` — added `preferredTerminal: string | null` to the Zustand store and `clui-settings` persistence - `src/renderer/components/StatusBar.tsx` — replaced the inline "Open in CLI" button with `<TerminalPicker /> - included `docs/terminal-picker-implementation-plan.md` for transparency
changes `TerminalPicker.tsx` - Add `cursor: 'pointer'` to btn style
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the hardcoded macOS Terminal.app launch with a user-configurable terminal picker.
Feature:
Open in CLIbutton now has a▼caret next to it (same pattern as the model and permission mode pickers in the status bar) that opens a dropdown of detected terminal apps.apppaths in/Applicationsclui-settingsvia localStorage, same key as theme/sound prefs)Files added:
src/main/terminal-detector.ts— scans for known terminal.appbundles, logically separate concern (filesystem detection), would bloatindex.tssrc/main/terminal-launcher.ts— per-terminal launch logic: AppleScript for Terminal/iTerm2, Ghostty's-eflag,open -afor Warp, separate concern (per-terminal launch logic with multiple strategies)src/renderer/components/TerminalPicker.tsx— the dropdown UI component, I extracted TerminalPicker fn into a new component b/c I didn't want to add ~200ish lines toStatusBar.tsxFiles modified:
src/shared/types.ts— addedDetectedTerminal,TerminalLaunchMethod, and two new IPC constantssrc/main/index.ts— updatedOPEN_IN_TERMINALhandler to acceptterminalName, addedDETECT_TERMINALSandSELECT_CUSTOM_TERMINALhandlerssrc/preload/index.ts— exposed the two new IPC methods onwindow.cluisrc/renderer/theme.ts— addedpreferredTerminal: string | nullto the Zustand store andclui-settingspersistencesrc/renderer/components/StatusBar.tsx— replaced the inline "Open in CLI" button with<TerminalPicker />