Browse Source

fix(tui): hide council and dynamic councillors from sidebar

The TUI model-recording loop only skipped the exact name 'councillor',
so 'council' and dynamic seats (councillor-alpha, councillor-beta, ...)
were written into tui-state.json and rendered as sidebar rows.

Skip all council-related names, mirroring the classification in
agents/index.ts getAgentConfigs.

Fixes #824
Michael Henke 2 weeks ago
parent
commit
34ff8b4e8f
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/index.ts

+ 6 - 1
src/index.ts

@@ -759,7 +759,12 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
       const tuiAgentModels: Record<string, string> = {};
       const tuiAgentModels: Record<string, string> = {};
       const tuiAgentVariants: Record<string, string> = {};
       const tuiAgentVariants: Record<string, string> = {};
       for (const agentDef of agentDefs) {
       for (const agentDef of agentDefs) {
-        if (agentDef.name === 'councillor') continue;
+        if (
+          agentDef.name === 'council' ||
+          agentDef.name === 'councillor' ||
+          agentDef.name.startsWith('councillor-')
+        )
+          continue;
 
 
         const entry = configAgent[agentDef.name] as
         const entry = configAgent[agentDef.name] as
           | Record<string, unknown>
           | Record<string, unknown>