gui/components/PromptResult

One generated prompt and its image batches. Each "Generate images" press adds a batch beneath the prompt. Per image: open in the OS default app, reveal in Explorer, or remove (with an option to delete from disk). A batch and the whole prompt can be cleared too. Clicking an image opens it in the single view.

The prompt text and its source DPL / original are all click-to-copy (no separate copy button). Hovering shows the full text; hovering the DPL also shows a live example that re-rolls every second (so you can see the range of what that DPL produces).

Description:
  • One generated prompt and its image batches. Each "Generate images" press adds a batch beneath the prompt. Per image: open in the OS default app, reveal in Explorer, or remove (with an option to delete from disk). A batch and the whole prompt can be cleared too. Clicking an image opens it in the single view.

    The prompt text and its source DPL / original are all click-to-copy (no separate copy button). Hovering shows the full text; hovering the DPL also shows a live example that re-rolls every second (so you can see the range of what that DPL produces).

Source:

Methods

(inner) DplHoverCode(props) → {JSX.Element}

Description:
  • The source-DPL line: click-to-copy, with a hover tooltip showing the full DPL and a concrete example that re-rolls every second (the same live preview the building-block chips use).

Source:
Parameters:
Name Type Description
props object

{ dpl, settings }.

Returns:
Type
JSX.Element

(inner) PromptResult(props) → {JSX.Element}

Source:
Parameters:
Name Type Description
props object
Properties
Name Type Attributes Description
prompt object

{ id, text, batches: [{ id, busy, images }] }.

index number

Zero-based index in the list.

settings object

The generation settings (for the DPL example tooltip).

canGenerate boolean

Whether the active provider can render images.

onGenerate function

(promptId).

onCopy function

(text).

onRemoveImage function

(promptId, batchId, img).

onRemoveBatch function

(promptId, batchId).

onClearImages function

(promptId).

onImageClick function <optional>

(img) — open the image in the single view.

Returns:
Type
JSX.Element

(inner) ResultImage(props) → {JSX.Element}

Description:
  • A result image that fades in once it has actually loaded.

Source:
Parameters:
Name Type Description
props object

{ src }.

Returns:
Type
JSX.Element

(inner) sameRow(prev, next) → {boolean}

Description:
  • Re-render a row only when its own data changes. Crucially, an image batch resolving elsewhere updates just that prompt's object (the setPrompts maps keep the SAME reference for every other row), so at 1000 rows a single image landing re-renders one <li>, not the whole list. The handler props are intentionally excluded from the compare: they act via promptId + functional setPrompts + a live prompts ref, so a retained closure stays correct even if its identity is stale.

Source:
Parameters:
Name Type Description
prev object

Previous props.

next object

Next props.

Returns:

True when the row can skip re-rendering.

Type
boolean