mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-03 07:03:18 +00:00
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.
11 lines
479 B
TypeScript
11 lines
479 B
TypeScript
export const CLIENT_CAPS = {
|
|
reasoningMergeEnum: "reasoning_merge_enum",
|
|
// COMPAT(customModeIcons): added in v0.1.84. Old clients pin AgentModeIcon to
|
|
// a closed enum and crash rendering unknown values; daemon downgrades icons
|
|
// outside the legacy set to "ShieldCheck" when this cap is absent. Drop the
|
|
// gate when floor >= v0.1.84.
|
|
customModeIcons: "custom_mode_icons",
|
|
} as const;
|
|
|
|
export type ClientCapability = (typeof CLIENT_CAPS)[keyof typeof CLIENT_CAPS];
|