MCPcopy Create free account
hub / github.com/ShipSecAI/studio / deleteArtifact

Function deleteArtifact

frontend/src/store/artifactStore.ts:119–138  ·  view source on GitHub ↗
(artifactId: string)

Source from the content-addressed store, hash-verified

117 }
118 },
119 async deleteArtifact(artifactId: string) {
120 set((state) => ({
121 deleting: { ...state.deleting, [artifactId]: true },
122 }));
123 try {
124 await api.artifacts.delete(artifactId);
125 // Remove artifact from library after successful deletion
126 set((state) => ({
127 library: state.library.filter((a) => a.id !== artifactId),
128 }));
129 } catch (error) {
130 console.error('Failed to delete artifact', error);
131 throw error;
132 } finally {
133 set((state) => {
134 const { [artifactId]: _removed, ...next } = state.deleting;
135 return { deleting: next };
136 });
137 }
138 },
139}));

Callers 1

ArtifactLibraryFunction · 0.85

Calls 2

errorMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected