Skip to content

Render inline artifact cards from response.artifact_created#218

Open
torrmal wants to merge 2 commits into
stagingfrom
feat/inline-artifact-cards
Open

Render inline artifact cards from response.artifact_created#218
torrmal wants to merge 2 commits into
stagingfrom
feat/inline-artifact-cards

Conversation

@torrmal

@torrmal torrmal commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Render inline artifact cards in chat from a single deterministic source: response.artifact_created events the harness emits at turn end for every artifact type (HTML, dataset, document, image, …).

Previously cards came only from the HTML-only publish_or_preview two-event marker. This:

  • adds a response.artifact_created case to responseStreamAdapter that pushes the same badge:'Artifact' step the old path produced (so all downstream rendering — StepArtifacts, ArtifactCard — is unchanged), deduped by slug/path so a replay can't double a card;
  • retires the publish_or_preview / awaitingArtifactPayload marker logic.

Pairs with the cowork-server PR that emits the events (both Anton and Hermes harnesses). Older messages created before the backend index simply render no card — acceptable by design.

🤖 Generated with Claude Code

torrmal and others added 2 commits June 22, 2026 16:34
Replace the HTML-only publish_or_preview card path with a single
deterministic source: response.artifact_created events the harness emits
at turn end for every artifact type. The reducer pushes the same
badge='Artifact' step it used before (so all downstream rendering is
unchanged), deduped by slug/path so a replay can't double a card. Retire
the awaitingArtifactPayload two-event marker logic.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an 'Export ▾' menu to document artifact cards (markdown/HTML/text
sources) that calls POST /artifacts/export and, on desktop, opens the
converted file. Closes on outside click; shows inline status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@torrmal

torrmal commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Added the Export ▾ menu on document artifact cards (PDF / Word / HTML) → calls POST /artifacts/export (cowork-server#81) and opens the result on desktop. Pairs with that backend PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant