MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handleRename

Function handleRename

packages/react/src/pages/artifacts.tsx:178–186  ·  view source on GitHub ↗
(artifactId: ArtifactId, title: string)

Source from the content-addressed store, hash-verified

176 const doRemove = useAtomSet(removeArtifactOptimistic, { mode: "promiseExit" });
177
178 const handleRename = async (artifactId: ArtifactId, title: string) => {
179 const exit = await doRename({
180 params: { artifactId },
181 payload: { title },
182 reactivityKeys: artifactWriteKeys,
183 });
184 trackEvent("artifact_renamed", { success: Exit.isSuccess(exit) });
185 if (Exit.isFailure(exit)) toast.error("Couldn't rename the artifact. Try again.");
186 };
187
188 const handleRemove = async (artifactId: ArtifactId) => {
189 const exit = await doRemove({

Callers 1

ArtifactsPageFunction · 0.70

Calls 2

trackEventFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected