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

Function updatePrompt

app/store/prompt.ts:110–123  ·  view source on GitHub ↗
(id: string, updater: (prompt: Prompt) => void)

Source from the content-addressed store, hash-verified

108 },
109
110 updatePrompt(id: string, updater: (prompt: Prompt) => void) {
111 const prompt = get().prompts[id] ?? {
112 title: "",
113 content: "",
114 id,
115 };
116
117 SearchService.remove(id);
118 updater(prompt);
119 const prompts = get().prompts;
120 prompts[id] = prompt;
121 set(() => ({ prompts }));
122 SearchService.add(prompt);
123 },
124
125 search(text: string) {
126 if (text.length === 0) {

Callers

nothing calls this directly

Calls 2

getFunction · 0.70
setFunction · 0.50

Tested by

no test coverage detected