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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

4574 * looked at is not an edit.
4575 */
4576 const artifactsSetPreview = (
4577 input: SetArtifactPreviewInput,
4578 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
4579 Effect.gen(function* () {
4580 const where = artifactById(input.id);
4581 const existing = yield* core.findFirst("artifact", { where });
4582 if (!existing) {
4583 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
4584 }
4585 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
4586 });
4587
4588 const artifactsRename = (
4589 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected