MCPcopy
hub / github.com/codeaashu/claude-code / restoreConversationDirectly

Function restoreConversationDirectly

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

Source from the content-addressed store, hash-verified

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

Callers 1

handleSelectFunction · 0.85

Calls 1

logErrorFunction · 0.50

Tested by

no test coverage detected