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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

4118 * looked at is not an edit.
4119 */
4120 const artifactsSetPreview = (
4121 input: SetArtifactPreviewInput,
4122 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
4123 Effect.gen(function* () {
4124 const where = artifactById(input.id);
4125 const existing = yield* core.findFirst("artifact", { where });
4126 if (!existing) {
4127 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
4128 }
4129 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
4130 });
4131
4132 const artifactsRename = (
4133 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected