MCPcopy Index your code
hub / github.com/winfunc/opcode / confirmDelete

Function confirmDelete

src/components/SlashCommandsManager.tsx:204–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202 };
203
204 const confirmDelete = async () => {
205 if (!commandToDelete) return;
206
207 try {
208 setDeleting(true);
209 setError(null);
210 await api.slashCommandDelete(commandToDelete.id, projectPath);
211 setDeleteDialogOpen(false);
212 setCommandToDelete(null);
213 await loadCommands();
214 } catch (err) {
215 console.error("Failed to delete command:", err);
216 const errorMessage = err instanceof Error ? err.message : "Failed to delete command";
217 setError(errorMessage);
218 } finally {
219 setDeleting(false);
220 }
221 };
222
223 const cancelDelete = () => {
224 setDeleteDialogOpen(false);

Callers

nothing calls this directly

Calls 1

loadCommandsFunction · 0.70

Tested by

no test coverage detected