fix(vscode): preserve hidden flag in allAgents and filter internal modes

Forward the hidden flag in the allAgents mapping so the webview can
distinguish internal modes (compaction, title, summary). Filter them
out of the Agent Behaviour settings list to prevent leaking
backend-only modes into the UI.
This commit is contained in:
kiloconnect[bot]
2026-04-08 13:36:24 +02:00
committed by Mark IJbema
parent 97ce20916e
commit cc257fdd30
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -1629,6 +1629,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
description: a.description,
mode: a.mode,
native: a.native,
hidden: a.hidden,
color: a.color,
deprecated: a.deprecated,
permission: a.permission,
@@ -82,7 +82,12 @@ const AgentBehaviourTab: Component = () => {
})
const agentNames = createMemo(() => {
const names = session.allAgents().map((a) => a.name)
// Exclude server-side hidden internal modes (compaction, title, summary)
// from the list. Config-only agents are still added below.
const names = session
.allAgents()
.filter((a) => !a.hidden)
.map((a) => a.name)
// Also include any agents from config that might not be in the agent list
const agents = Object.keys(config().agent ?? {})
for (const name of agents) {