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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

4144 * looked at is not an edit.
4145 */
4146 const artifactsSetPreview = (
4147 input: SetArtifactPreviewInput,
4148 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
4149 Effect.gen(function* () {
4150 const where = artifactById(input.id);
4151 const existing = yield* core.findFirst("artifact", { where });
4152 if (!existing) {
4153 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
4154 }
4155 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
4156 });
4157
4158 const artifactsRename = (
4159 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected