MCPcopy
hub / github.com/ModelEngine-Group/nexent / setMemorySwitch

Function setMemorySwitch

frontend/services/memoryService.ts:104–118  ·  view source on GitHub ↗
(enabled: boolean)

Source from the content-addressed store, hash-verified

102}
103
104export async function setMemorySwitch(enabled: boolean): Promise<boolean> {
105 try {
106 const body = { key: "MEMORY_SWITCH", value: enabled };
107 const res = await requestJson(API_ENDPOINTS.memory.config.set, {
108 method: "POST",
109 headers: getAuthHeaders(),
110 body: JSON.stringify(body),
111 });
112 // Backend returns { success: true } on OK
113 return !!res?.success;
114 } catch (e) {
115 log.error("setMemorySwitch error", e);
116 return false;
117 }
118}
119
120export async function setMemoryAgentShare(
121 option: "always" | "ask" | "never"

Callers 2

ChatHeaderFunction · 0.90
useMemoryFunction · 0.90

Calls 3

getAuthHeadersFunction · 0.90
errorMethod · 0.80
requestJsonFunction · 0.70

Tested by

no test coverage detected