From ae72a67635336e7194df62cd0508836c5230882d Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Thu, 23 Apr 2026 13:29:57 +1000 Subject: [PATCH] bye bye sentinal --- .../app/src/components/settings-general.tsx | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx index c45a31cf3f..80d4c58e56 100644 --- a/packages/app/src/components/settings-general.tsx +++ b/packages/app/src/components/settings-general.tsx @@ -48,7 +48,13 @@ type ShellOption = { acceptable: boolean } -const AUTO_SHELL_VALUE = "__opencode_auto_shell__" +type ShellSelectOption = { + id: string + value: string + label: string +} + + // To prevent audio from overlapping/playing very quickly when navigating the settings menus, // delay the playback by 100ms during quick selection changes and pause existing sounds. @@ -181,10 +187,10 @@ export const SettingsGeneral: Component = () => { const globalSdk = useGlobalSDK() const [shells] = createResource(() => globalSdk.client.pty.shells().then((res) => res.data || [])) - const auto = { value: AUTO_SHELL_VALUE, label: "Auto (Default)" } - const currentShell = createMemo(() => globalSync.data.config.shell || AUTO_SHELL_VALUE) + const autoOption = { id: "auto", value: "", label: "Auto (Default)" } + const currentShell = createMemo(() => globalSync.data.config.shell ?? "") - const shellOptions = createMemo(() => { + const shellOptions = createMemo(() => { const list = shells() || [] const current = globalSync.data.config.shell @@ -194,18 +200,21 @@ export const SettingsGeneral: Component = () => { } const options = [ - auto, + autoOption, ...list.map((s) => { const dup = (nameCounts.get(s.name) || 0) > 1 const text = dup ? s.path : s.name const label = s.acceptable ? text : `${text} (${language.t("settings.general.row.shell.terminalOnly")})` - const value = dup ? s.path : s.name - return { value, label } + return { + id: s.path, + value: dup ? s.path : s.name, + label, + } }), ] if (current && !options.some((o) => o.value === current)) { - options.push({ value: current, label: current }) + options.push({ id: current, value: current, label: current }) } return options @@ -296,12 +305,12 @@ export const SettingsGeneral: Component = () => {