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

Function artifactsSetPreview

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

Source from the content-addressed store, hash-verified

4852 * looked at is not an edit.
4853 */
4854 const artifactsSetPreview = (
4855 input: SetArtifactPreviewInput,
4856 ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> =>
4857 Effect.gen(function* () {
4858 const where = artifactById(input.id);
4859 const existing = yield* core.findFirst("artifact", { where });
4860 if (!existing) {
4861 return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) });
4862 }
4863 yield* core.updateMany("artifact", { where, set: { preview: input.preview } });
4864 });
4865
4866 const artifactsRename = (
4867 input: RenameArtifactInput,

Callers

nothing calls this directly

Calls 1

artifactByIdFunction · 0.85

Tested by

no test coverage detected