MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / updatePlugin

Function updatePlugin

app/store/plugin.ts:191–201  ·  view source on GitHub ↗
(id: string, updater: (plugin: Plugin) => void)

Source from the content-addressed store, hash-verified

189 return plugins[id];
190 },
191 updatePlugin(id: string, updater: (plugin: Plugin) => void) {
192 const plugins = get().plugins;
193 const plugin = plugins[id];
194 if (!plugin) return;
195 const updatePlugin = { ...plugin };
196 updater(updatePlugin);
197 plugins[id] = updatePlugin;
198 FunctionToolService.add(updatePlugin, true);
199 set(() => ({ plugins }));
200 get().markUpdate();
201 },
202 delete(id: string) {
203 const plugins = get().plugins;
204 delete plugins[id];

Callers

nothing calls this directly

Calls 2

getFunction · 0.70
setFunction · 0.50

Tested by

no test coverage detected