MCPcopy
hub / github.com/docker/genai-stack / updateMessage

Function updateMessage

front-end/src/lib/chat.store.js:23–39  ·  view source on GitHub ↗
(existingId, text, model = null)

Source from the content-addressed store, hash-verified

21 }
22
23 function updateMessage(existingId, text, model = null) {
24 if (!existingId) {
25 return;
26 }
27 update((state) => {
28 const messages = state.data;
29 const existingIdIndex = messages.findIndex((m) => m.id === existingId);
30 if (existingIdIndex === -1) {
31 return state;
32 }
33 messages[existingIdIndex].text += text;
34 if (model) {
35 messages[existingIdIndex].model = model;
36 }
37 return { ...state, data: messages };
38 });
39 }
40
41 async function send(question, ragMode = false) {
42 if (!question.trim().length) {

Callers 1

sendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected