sw-ui-transcript-view

View as MarkdownOpen in Claude

Chat-bubble timeline that renders an array of TranscriptEntry items, each tagged as user / agent / system with optional rich content.

1<sw-ui-transcript-view></sw-ui-transcript-view>

Designed to live inside <sw-ui-call-layout>’s transcript slot or <sw-ui-content-drawer> body. The view auto-scrolls to the latest entry, distinguishes “partial” (in-progress) entries with a subtle pulse, and renders rich meta payloads:

  • Links — clickable anchors injected as a footer beneath the bubble.
  • Code — Prism-highlighted snippet (language is loaded lazily).
  • Display content — content the agent pushed via a display_content user event; preserved verbatim so the download button can serialise the full payload back to markdown.

The header includes a download icon that exports the entire transcript as a .md file via transcriptToMarkdown() so users can save the conversation.

Class: SwUiTranscriptView · Module: packages/web-components/src/components/UI/sw-ui-transcript-view.ts

class: SwUiTranscriptView, sw-ui-transcript-view

Fields

entries
TranscriptEntry[]Defaults to []

entries field.

stringDefaults to 'Transcript'

header field.

emptyText
stringDefaults to ''

emptyText field.

Attributes

NameFieldInherited From
headerheader
empty-textemptyText

CSS Properties

NameDefaultDescription
--bg-pageBackground of the transcript surface.
--bg-surfaceBackground of agent/system bubbles.
--bg-surface-raisedBackground of user bubbles.
--fg-defaultPrimary text color.
--border-defaultHeader divider and bubble borders.
--type-family-bodyBody font family.
--type-size-smallBody font size.
--transition-fastTransition duration for hover / state changes.

CSS Parts

NameDescription
containerOuter flex column.
headerSticky header row with the download button.
download-btnThe download icon button.
entriesScrollable container for transcript bubbles.
entryOne transcript entry bubble.
entry-userEntry bubble when from the user.
entry-agentEntry bubble when from the agent.
entry-systemEntry bubble when from system events.
entry-partialBubble while still streaming (`state === ‘partial’`).

Events

NameDetailDescription
sw-transcript-downloadUser clicked the download button.