mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(tui): apply details mode live
This commit is contained in:
parent
6814646b36
commit
a8fcd1c742
12 changed files with 56 additions and 19 deletions
|
|
@ -90,6 +90,7 @@ export interface UiState {
|
|||
busy: boolean
|
||||
compact: boolean
|
||||
detailsMode: DetailsMode
|
||||
detailsModeCommandOverride: boolean
|
||||
info: null | SessionInfo
|
||||
inlineDiffs: boolean
|
||||
mouseTracking: boolean
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export const coreCommands: SlashCommand[] = [
|
|||
}
|
||||
|
||||
const mode = parseDetailsMode(r?.value) ?? ui.detailsMode
|
||||
patchUiState({ detailsMode: mode })
|
||||
patchUiState({ detailsMode: mode, detailsModeCommandOverride: false })
|
||||
|
||||
const overrides = SECTION_NAMES.filter(s => ui.sections[s])
|
||||
.map(s => `${s}=${ui.sections[s]}`)
|
||||
|
|
@ -224,7 +224,7 @@ export const coreCommands: SlashCommand[] = [
|
|||
return transcript.sys(DETAILS_USAGE)
|
||||
}
|
||||
|
||||
patchUiState({ detailsMode: next })
|
||||
patchUiState({ detailsMode: next, detailsModeCommandOverride: true })
|
||||
gateway.rpc<ConfigSetResponse>('config.set', { key: 'details_mode', value: next }).catch(() => {})
|
||||
transcript.sys(`details: ${next}`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const buildUiState = (): UiState => ({
|
|||
busy: false,
|
||||
compact: false,
|
||||
detailsMode: 'collapsed',
|
||||
detailsModeCommandOverride: false,
|
||||
info: null,
|
||||
inlineDiffs: true,
|
||||
mouseTracking: MOUSE_TRACKING,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export const applyDisplay = (cfg: ConfigFullResponse | null, setBell: (v: boolea
|
|||
patchUiState({
|
||||
compact: !!d.tui_compact,
|
||||
detailsMode: resolveDetailsMode(d),
|
||||
detailsModeCommandOverride: false,
|
||||
inlineDiffs: d.inline_diffs !== false,
|
||||
mouseTracking: d.tui_mouse !== false,
|
||||
sections: resolveSections(d.sections),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import { createGatewayEventHandler } from './createGatewayEventHandler.js'
|
|||
import { createSlashHandler } from './createSlashHandler.js'
|
||||
import { type GatewayRpc, type TranscriptRow } from './interfaces.js'
|
||||
import { $overlayState, patchOverlayState } from './overlayStore.js'
|
||||
import { scrollWithSelectionBy } from './scroll.js'
|
||||
import { turnController } from './turnController.js'
|
||||
import { $turnState, patchTurnState } from './turnStore.js'
|
||||
import { $uiState, getUiState, patchUiState } from './uiStore.js'
|
||||
|
|
@ -33,7 +34,6 @@ import { useComposerState } from './useComposerState.js'
|
|||
import { useConfigSync } from './useConfigSync.js'
|
||||
import { useInputHandlers } from './useInputHandlers.js'
|
||||
import { useLongRunToolCharms } from './useLongRunToolCharms.js'
|
||||
import { scrollWithSelectionBy } from './scroll.js'
|
||||
import { useSessionLifecycle } from './useSessionLifecycle.js'
|
||||
import { useSubmission } from './useSubmission.js'
|
||||
|
||||
|
|
@ -593,7 +593,9 @@ export function useMainApp(gw: GatewayClient) {
|
|||
// resolved to hidden, the only thing ToolTrail will surface is the
|
||||
// floating-alert backstop (errors/warnings). Mirror that so we don't
|
||||
// render an empty wrapper Box above the streaming area in quiet mode.
|
||||
const anyPanelVisible = SECTION_NAMES.some(s => sectionMode(s, ui.detailsMode, ui.sections) !== 'hidden')
|
||||
const anyPanelVisible = SECTION_NAMES.some(
|
||||
s => sectionMode(s, ui.detailsMode, ui.sections, ui.detailsModeCommandOverride) !== 'hidden'
|
||||
)
|
||||
|
||||
const showProgressArea = anyPanelVisible
|
||||
? Boolean(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue