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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

5582 * looked at is not an edit.
5583 */
5584 const artifactsSetPreview = (
5585 input: SetArtifactPreviewInput,
5586 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
5587 Effect.gen(function* () {
5588 const where = artifactById(input.id);
5589 const existing = yield* core.findFirst("artifact", { where });
5590 if (!existing) {
5591 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
5592 }
5593 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
5594 });
5595
5596 const artifactsRename = (
5597 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected