Procházet zdrojové kódy

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 před 2 týdny
rodič
revize
34ff8b4e8f
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  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 tuiAgentVariants: Record<string, string> = {};
       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
           | Record<string, unknown>