Treat agent mode icons as open strings

Old clients pinned AgentModeIcon to a closed enum and rendered
undefined for unknown values, crashing the route in production
Hermes with no stack trace. Loosen the type to a plain string,
let the client skip rendering when an icon is unregistered, and
add the customModeIcons capability so the daemon downgrades
non-legacy icons to ShieldCheck for clients that pre-date the
open-string contract.
This commit is contained in:
Mohamed Boudra
2026-05-27 09:30:50 +07:00
parent a5b82d2a3b
commit 4911b627f2
6 changed files with 62 additions and 17 deletions
@@ -4264,6 +4264,7 @@ export class DaemonClient {
protocolVersion: 1,
capabilities: {
[CLIENT_CAPS.reasoningMergeEnum]: true,
[CLIENT_CAPS.customModeIcons]: true,
},
...(this.config.appVersion ? { appVersion: this.config.appVersion } : {}),
}),