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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

4190 * looked at is not an edit.
4191 */
4192 const artifactsSetPreview = (
4193 input: SetArtifactPreviewInput,
4194 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
4195 Effect.gen(function* () {
4196 const where = artifactById(input.id);
4197 const existing = yield* core.findFirst("artifact", { where });
4198 if (!existing) {
4199 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
4200 }
4201 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
4202 });
4203
4204 const artifactsRename = (
4205 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected