mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
fix(ui-tui): record config theme pin even when env already matches (Bugbot r6)
Regression from the r3 shell-pin fix: applyConfiguredTuiTheme('light'|'dark')
returned early when HERMES_TUI_THEME already matched, leaving
configPinnedTheme false — so a later '/theme auto' refused to clear the pin
and the session stayed forced to the old mode while config said auto. Set
configPinnedTheme before the match short-circuit.
Bugbot's other three r6 findings (GatewaySkin paired-palette fields,
ConfigMtimeResponse.mcp_rev, picker maxWidth props) are diff-truncation
false positives — all declared in gatewayTypes.ts / the picker prop
interfaces; typecheck is green.
This commit is contained in:
parent
9be9a91d13
commit
c543c691fc
1 changed files with 5 additions and 1 deletions
|
|
@ -130,11 +130,15 @@ export function applyConfiguredTuiTheme(raw: unknown): void {
|
|||
const current = process.env.HERMES_TUI_THEME ?? ''
|
||||
|
||||
if (mode === 'light' || mode === 'dark') {
|
||||
// Record config ownership BEFORE the match short-circuit — otherwise a
|
||||
// pin that already matches (e.g. env and config agree at boot) leaves
|
||||
// configPinnedTheme false, and a later 'auto' would refuse to clear it.
|
||||
configPinnedTheme = true
|
||||
|
||||
if (current === mode) {
|
||||
return
|
||||
}
|
||||
|
||||
configPinnedTheme = true
|
||||
process.env.HERMES_TUI_THEME = mode
|
||||
} else {
|
||||
// 'auto' clears only a pin CONFIG set — never a HERMES_TUI_THEME the user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue