mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
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:
@@ -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 });
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user