MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / deleteExperiment

Function deleteExperiment

codeclash/viewer/static/js/experiment.js:4–36  ·  view source on GitHub ↗
(folderPath)

Source from the content-addressed store, hash-verified

2
3// Delete experiment function
4function deleteExperiment(folderPath) {
5 const confirmed = confirm(
6 "Are you sure you want to delete this experiment? This action cannot be undone.\n\nFolder: " +
7 folderPath,
8 );
9 if (confirmed) {
10 fetch("/delete-experiment", {
11 method: "POST",
12 headers: {
13 "Content-Type": "application/json",
14 },
15 body: JSON.stringify({
16 folder_path: folderPath,
17 }),
18 })
19 .then((response) => response.json())
20 .then((data) => {
21 if (data.success) {
22 alert("Experiment deleted successfully.");
23 // Redirect to picker
24 window.location.href = "/picker";
25 } else {
26 alert(
27 "Error deleting experiment: " + (data.error || "Unknown error"),
28 );
29 }
30 })
31 .catch((error) => {
32 console.error("Error:", error);
33 alert("Error deleting experiment: " + error.message);
34 });
35 }
36}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected