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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

6287 * looked at is not an edit.
6288 */
6289 const artifactsSetPreview = (
6290 input: SetArtifactPreviewInput,
6291 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
6292 Effect.gen(function* () {
6293 const where = artifactById(input.id);
6294 const existing = yield* core.findFirst("artifact", { where });
6295 if (!existing) {
6296 return yield* new ArtifactNotFoundError({
6297 id: ArtifactId.make(input.id),
6298 });
6299 }
6300 yield* core.updateMany("artifact", {
6301 where,
6302 set: { preview: input.preview },
6303 });
6304 });
6305
6306 const artifactsRename = (
6307 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected