mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
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:
committed by
Mark IJbema
parent
97ce20916e
commit
cc257fdd30
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user