feat(hermes): memory enable switch + clearer migration warning copy

Replaces the greyed-out "Memory is disabled" banner with a real Switch
at the top of each memory tab. Users can now toggle Hermes' memory/user
blobs without leaving CC Switch; the underlying write goes through the
merge-aware `set_memory_enabled`, so budgets and external-provider
settings survive toggle operations. The new `useToggleHermesMemoryEnabled`
mutation invalidates the limits query so the Switch state and the
amber disabled-hint update in lockstep.

Reworks the `schema_migrated_v12` health banner copy to match the
simplified "CC Switch only manages custom_providers" posture — it now
tells users to reconcile migrated dict entries via Hermes Web UI,
instead of the earlier (and now inaccurate) "CC Switch reads both".
This commit is contained in:
Jason
2026-04-20 09:49:23 +08:00
parent b8a3534cb5
commit 185ac2be9b
4 changed files with 104 additions and 4 deletions
+11
View File
@@ -53,4 +53,15 @@ export const hermesApi = {
async getMemoryLimits(): Promise<HermesMemoryLimits> {
return await invoke("get_hermes_memory_limits");
},
/**
* Toggle the on/off flag for one memory blob. Other fields in the `memory:`
* section (budgets, external provider config) are preserved.
*/
async setMemoryEnabled(
kind: HermesMemoryKind,
enabled: boolean,
): Promise<void> {
await invoke("set_hermes_memory_enabled", { kind, enabled });
},
};