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

Function artifactsSetPreview

packages/core/sdk/src/executor.ts:6197–6212  ·  view source on GitHub ↗
(
      input: SetArtifactPreviewInput,
    )

Source from the content-addressed store, hash-verified

6195 * looked at is not an edit.
6196 */
6197 const artifactsSetPreview = (
6198 input: SetArtifactPreviewInput,
6199 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
6200 Effect.gen(function* () {
6201 const where = artifactById(input.id);
6202 const existing = yield* core.findFirst("artifact", { where });
6203 if (!existing) {
6204 return yield* new ArtifactNotFoundError({
6205 id: ArtifactId.make(input.id),
6206 });
6207 }
6208 yield* core.updateMany("artifact", {
6209 where,
6210 set: { preview: input.preview },
6211 });
6212 });
6213
6214 const artifactsRename = (
6215 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected