You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a config.toml option for which terminal Cmd+; spawns jcode into (currently only undocumented preferred_terminal.json) #401
The terminal that the system-wide Cmd+; hotkey (and in-app spawns) launch jcode into is only configurable via a separate, undocumented ~/.jcode/preferred_terminal.json file. There is no corresponding key in ~/.jcode/config.toml, so it is not discoverable.
Current behavior
The preference is stored in ~/.jcode/preferred_terminal.json, e.g. {"terminal":"terminal"} (Apple Terminal) or {"terminal":"ghostty"}.
~/.jcode/hotkey/launch_jcode.sh is generated from that preference by jcode setup-hotkey.
The [terminal] section in config.toml only documents spawn_hook and focus_hook; there is no [terminal] preferred = "ghostty" (or similar) key.
Changing preferred_terminal.json alone does not rewrite the already-installed launch_jcode.sh; you must re-run jcode setup-hotkey for the launcher to pick it up. This is an easy footgun (editing the JSON looks like it should be sufficient).
Repro
On macOS, set up the hotkey while Apple Terminal is the preferred terminal.
Later install/prefer Ghostty and edit ~/.jcode/preferred_terminal.json to {"terminal":"ghostty"}.
Press Cmd+; -> it still spawns in Apple Terminal, because launch_jcode.sh was not regenerated.
Proposed fix
Add a first-class, documented config key, e.g.:
[terminal]
# Terminal used by the Cmd+; launch hotkey and in-app spawns on macOS.# One of: ghostty, iterm2, wezterm, alacritty, kitty, terminalpreferred = "ghostty"
Keep preferred_terminal.json working for back-compat, but treat the config.toml key as the source of truth (or at least document the JSON file).
When the preference changes (via config, /config, or the onboarding terminal picker), automatically regenerate ~/.jcode/hotkey/launch_jcode.sh so the launcher stays in sync without a manual jcode setup-hotkey re-run.
Mention the setting in the generated default config.toml comments next to the existing [terminal]spawn_hook/focus_hook docs and near the new_terminal keybinding.
Triage confirmed: TerminalConfig (crates/jcode-config-types/src/lib.rs:600) only exposes spawn_hook/focus_hook — no preferred key. The preferred terminal lives solely in ~/.jcode/preferred_terminal.json (crates/jcode-setup-hints/src/macos_terminal.rs:81, load/save at :84/:90), and run_setup_hotkey regenerates launch_jcode.sh from it (lib.rs:307/333). Editing the JSON without re-running setup-hotkey is indeed a footgun. The proposed [terminal] preferred key + auto-regenerate-on-change is a clean, well-scoped enhancement. Autonomous: likely.
Triage: reproducible. Verified: TerminalConfig (crates/jcode-config-types/src/lib.rs) only exposes spawn_hook/focus_hook — no preferred key. The preferred terminal lives solely in ~/.jcode/preferred_terminal.json (crates/jcode-setup-hints/src/macos_terminal.rs:81), and launch_jcode.sh is only regenerated when setup-hotkey runs, so editing the JSON alone is the described footgun. The proposed [terminal] preferred config key + auto-regenerate-on-change is well-scoped. Keeping existing autonomous: likely / priority: low.
Fix in #417: added a discoverable, documented [terminal] preferred key in config.toml, preferred over the legacy ~/.jcode/preferred_terminal.json in effective_macos_terminal() (config > JSON > detection), and documented it in the generated default config. Auto-regenerate-of-launch_jcode.sh-on-change is left as a follow-up; jcode setup-hotkey still regenerates it.
Activity
1jehuang commentedon Jun 24, 2026
Triage confirmed:
TerminalConfig(crates/jcode-config-types/src/lib.rs:600) only exposesspawn_hook/focus_hook— nopreferredkey. The preferred terminal lives solely in~/.jcode/preferred_terminal.json(crates/jcode-setup-hints/src/macos_terminal.rs:81, load/save at :84/:90), andrun_setup_hotkeyregenerateslaunch_jcode.shfrom it (lib.rs:307/333). Editing the JSON without re-runningsetup-hotkeyis indeed a footgun. The proposed[terminal] preferredkey + auto-regenerate-on-change is a clean, well-scoped enhancement. Autonomous: likely.1jehuang commentedon Jun 25, 2026
Triage: reproducible. Verified:
TerminalConfig(crates/jcode-config-types/src/lib.rs) only exposesspawn_hook/focus_hook— nopreferredkey. The preferred terminal lives solely in~/.jcode/preferred_terminal.json(crates/jcode-setup-hints/src/macos_terminal.rs:81), andlaunch_jcode.shis only regenerated whensetup-hotkeyruns, so editing the JSON alone is the described footgun. The proposed[terminal] preferredconfig key + auto-regenerate-on-change is well-scoped. Keeping existing autonomous: likely / priority: low.feat(terminal): add [terminal] preferred config key for Cmd+; launch (#…
1jehuang commentedon Jun 29, 2026
Fix in #417: added a discoverable, documented
[terminal] preferredkey in config.toml, preferred over the legacy~/.jcode/preferred_terminal.jsonineffective_macos_terminal()(config > JSON > detection), and documented it in the generated default config. Auto-regenerate-of-launch_jcode.sh-on-change is left as a follow-up;jcode setup-hotkeystill regenerates it.style: rustfmt triage fix changes
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
feat(terminal): add [terminal] preferred config key for Cmd+; launch (#…
feat(terminal): add [terminal] preferred config key for Cmd+; launch (1…
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
feat(terminal): add [terminal] preferred config key for Cmd+; launch (1…
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …