fix(tui): status bar not updating after /verbose, /reasoning, /think commands
The status bar refresh failed because refreshSessionInfo() compared currentSessionKey (e.g. 'main') against the canonical session keys returned by the gateway (e.g. 'agent:default:main'). This fix uses parseAgentSessionKey to also match canonical keys by their 'rest' component, allowing 'main' to match 'agent:default:main'. Fixes: status bar showing stale values after setting changes AI-assisted: yes (Claude) Testing: lightly tested (build passes, logic verified)
This commit is contained in:
committed by
Peter Steinberger
parent
714e170c16
commit
debdd2aa95
@@ -309,9 +309,13 @@ export async function runTui(opts: TuiOptions) {
|
|||||||
includeUnknown: false,
|
includeUnknown: false,
|
||||||
agentId: listAgentId,
|
agentId: listAgentId,
|
||||||
});
|
});
|
||||||
const entry = result.sessions.find(
|
const entry = result.sessions.find((row) => {
|
||||||
(row) => row.key === currentSessionKey,
|
// Exact match
|
||||||
);
|
if (row.key === currentSessionKey) return true;
|
||||||
|
// Also match canonical keys like "agent:default:main" against "main"
|
||||||
|
const parsed = parseAgentSessionKey(row.key);
|
||||||
|
return parsed?.rest === currentSessionKey;
|
||||||
|
});
|
||||||
sessionInfo = {
|
sessionInfo = {
|
||||||
thinkingLevel: entry?.thinkingLevel,
|
thinkingLevel: entry?.thinkingLevel,
|
||||||
verboseLevel: entry?.verboseLevel,
|
verboseLevel: entry?.verboseLevel,
|
||||||
|
|||||||
Reference in New Issue
Block a user