MCPcopy Create free account
hub / github.com/Noumena-Network/code / restoreConversationDirectly

Function restoreConversationDirectly

src/components/MessageSelector.tsx:143–155  ·  view source on GitHub ↗
(message: UserMessage)

Source from the content-addressed store, hash-verified

141
142 // Helper to restore conversation without confirmation
143 async function restoreConversationDirectly(message: UserMessage) {
144 onPreRestore();
145 setIsRestoring(true);
146 try {
147 await onRestoreMessage(message);
148 setIsRestoring(false);
149 onClose();
150 } catch (error_0) {
151 logError(error_0 as Error);
152 setIsRestoring(false);
153 setError(`Failed to restore the conversation:\n${error_0}`);
154 }
155 }
156 async function handleSelect(message_0: UserMessage) {
157 const index = messages.indexOf(message_0);
158 const indexFromEnd = messages.length - 1 - index;

Callers 1

handleSelectFunction · 0.85

Calls 1

logErrorFunction · 0.50

Tested by

no test coverage detected