MCPcopy Create free account
hub / github.com/pollinations/pollinations / updateMessage

Function updateMessage

apps/chat/src/hooks/useChat.js:130–144  ·  view source on GitHub ↗
(messageId, updates)

Source from the content-addressed store, hash-verified

128 return updatedChat;
129 };
130 const updateMessage = (messageId, updates) => {
131 setChats((prev) =>
132 prev.map((chat) => {
133 if (chat.id === activeChatId) {
134 return {
135 ...chat,
136 messages: chat.messages.map((msg) =>
137 msg.id === messageId ? { ...msg, ...updates } : msg,
138 ),
139 };
140 }
141 return chat;
142 }),
143 );
144 };
145
146 const removeLastMessage = () => {
147 setChats((prev) =>

Callers 2

applyErrorFunction · 0.85
AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected