mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17:38 +00:00
* fix(terminal): store the Terminal shell setting trimmed The Settings field only stripped leading spaces and a hand-edited settings file loaded as-is, so a trailing space reached agent tabs, the CLI and other host-planned launches, while plain terminal tabs trimmed it in their own reader. Trim the setting when the field loses focus and when settings load (whitespace-only becomes unset), and drop the plain-tab reader's now-redundant trim. * fix(terminal): trim the shell setting at the settings write too A keystroke write could still store a padded shell, and Escape closes Settings without a blur, so a plain tab could launch the padded value once its own trim was gone. Trim at the settings write boundary (shared with load, like the machine name), and keep the typed text in a local draft while the field is focused. * fix(settings): drop the shell field's draft when the field unmounts The draft lived on the whole Terminal pane, so a field removed without a blur (another window switching to System shell, or the settings search hiding it) left a stale draft that showed later instead of the saved shell. Move it into a small input component so it is discarded with the field.
5 lines
252 B
TypeScript
5 lines
252 B
TypeScript
/** Stored form of the Terminal shell setting; launches read it raw, so it must never carry padding. '' = system shell. */
|
|
export function normalizeTerminalDefaultShell(value: unknown): string {
|
|
return typeof value === 'string' ? value.trim() : ''
|
|
}
|