Skip to content

zidane-ui/chat/transcript

Transcript row components, renderer slots and row actions.

import { … } from 'zidane-ui/chat/transcript'ui/src/chat/transcript/index.ts

Use this entry point to change how the transcript draws. TranscriptRenderersProvider overrides slots such as the code block and markdown, and TranscriptActionsProvider turns on controls such as loading full tool output. zidane-ui/chat re-exports all of it. See Transcript.

TSX
import type { ChatEvent } from 'zidane-ui/chat/headless'
import type { CodeBlockSlotProps, TranscriptRenderers } from 'zidane-ui/chat'
import { Transcript, TranscriptRenderersProvider } from 'zidane-ui/chat'

function Code({ code, language }: CodeBlockSlotProps) {
  return <pre data-language={language}>{code}</pre>
}

const RENDERERS: Partial<TranscriptRenderers> = { CodeBlock: Code }

export function Replay({ id, events }: { id: string, events: readonly ChatEvent[] }) {
  return (
    <TranscriptRenderersProvider value={RENDERERS}>
      <Transcript events={events} streaming={false} sessionId={id} />
    </TranscriptRenderersProvider>
  )
}
Transcript: full density, every row kind
traffic.png
Rate limit the chat endpoint: 20 requests a minute per IP, and say how long to wait when it trips.

The chat route now takes a token from a per-IP bucket (20 a minute, bursts of 5). A request over the limit gets 429 with a Retry-After header:

if (!verdict.ok) return tooMany(verdict.retryAfterMs);

The server tests pass.

Opus 5.541s5$0.0818k1.3k
Document it, and keep the context small while you do.
claude-opus-5-5 is overloaded; continuing on gpt-6.1-sol.
Link check failed: /docs/limits does not exist.

Documented under Limits in docs/server.mdx and committed.

GPT 6.1 Sol +11m12s4$0.219.9k2.0k
committed 83dfea7

Components#

AnsiSpansComponent#

One line of terminal output, already parsed (an output line's spans).

AnsiTextComponent#

Terminal output in the theme's colors, a line per line; parsed only when it holds an escape (else the text as is), once per text.

AttachmentIconComponent#

An attachment's icon, or its short badge (e.g. TS) for icon-less kinds, in its tone.

AuthFailureCardComponent#

Renders a sign-in failure as a card with its fixes; see the module comment for the rules.

BadgeMenuProviderComponent#

Provides the badge menu to the badges below it and renders it (and its notice) when one opens.

CardMarkdownComponent#

A hover card's body as compact Markdown (see the module comment).

CaretComponent#

The disclosure caret of a collapsible header: points right, turns down while open.

ChipCardComponent#

The one hover card every chip opens (see the module comment for its layout).

ChipHoverComponent#

A chip with its card: opens on hover / focus, under the chip.

CodemodeScriptComponent#

A codemode script with its line numbers and, while it streams its progress, the state of each line.

CommandCardComponent#

A command chip's card.

CommandDetailRowComponent#

Supporting output from a / command, in the ToolRow idiom: the info Dot in the gutter (drawn by TranscriptRow), a capitalized label, a trailing caret; COLLAPSED by default like tool results. The expanded body renders through the Markdown slot — command emits are markdown text (prose, fenced code the app may highlight), not raw terminal output, so a capped monospace <pre> would misrender them as a wall of mono.

CommandNoteRowComponent#

A / command's receipt: what it recorded for the model, one muted line beside its check dot. Its commits, PRs, branches, links and `code` are whatever the InlineText slot draws (the desktop app: the badges a message shows).

CommitCardComponent#

A sha chip's card.

CompactSummaryRowComponent#

Renders a compaction boundary: how many turns were compacted, the model, cost, and tokens, with the summary text behind a toggle.

CvRowComponent#

Renders a transcript row that is always mounted, such as a row inside an open fold or a subagent block.

DefaultInlineTextComponent#

Renders the text as is. The default InlineText slot.

DefaultMarkdownComponent#

The kit's Markdown, its fences drawn by the CodeBlock slot in effect. The default Markdown slot.

DefaultPromptComponent#

The prompt's text as typed, a block per line (PromptLines).

DefaultSessionTitleComponent#

The session's id as a link that opens it (TranscriptActions.openSession; without it, plain text). A link inside the tool row's header button: the click is stopped before the button toggles the row, and role=link + Enter keeps it reachable without a nested <button>, which HTML forbids.

DiffLinesComponent#

Tight diff rendering: green/red tints, gutter glyph (+ / − / space), whitespace-pre so leading indentation survives. Consecutive lines with the same op paint as one block (one tint, one gutter, one text node): a 500-line hunk would otherwise be 1,500 elements to build, style and lay out every time its row scrolled into a long transcript.

DotComponent#

Renders the status dot that leads a transcript row, centered on the row's first text line. Nothing in a transcript without row icons (RowIconsContext).

EditDiffBlockComponent#

Per-hunk diff renderer with approval-outcome badges. When edit.outcomes is set (per-edit approval landed live, or replay re-parsed it off the tool result body), each hunk gets its own card with a ✓/✕/⊘/⚠/⋯ badge; the header summarizes via canonical summarizeOutcomes. Single-hunk edits with all-applied outcomes collapse back to the flat layout so the common case doesn't grow extra chrome.

ErrorRowComponent#

Renders an error line in the transcript's error tone.

ExchangeFoldRowComponent#

Renders a folded exchange: one header line summarizing the work, a live stack of the latest steps while it runs, and the full step list when expanded.

FailedMarkComponent#

A failed step's mark in its own line, in a transcript without row icons: the red cross its icon would have shown.

FailureRowComponent#

How a run that ended early reads: one quiet line (Stopped, then the reason in muted text, for a failure; Stopped by you for a stop), and on the transcript's last word a small button that picks the work back up: Continue when the run had done something, Retry (the same prompt) when it had not. Both hand their prompt to onResume (the desktop app: the composer's send); without it there is no button. A run stopped by a failed sign-in (detail.auth) shows the sign-in's card instead (AuthFailureCard).

FileBadgeIconComponent#

A file's type icon (or its language's two letters), as the badge's leading icon. The letters are drawn by CSS, so the badge's text is the name alone (what a copy or a screen reader gets).

FoldHeaderComponent#

A fold's header line (the exchange's work, a group of earlier messages): a toggle with its caret when opening shows something more, otherwise the same line, inert. Same box, tone and spacing either way.

ImageGenerationBlockComponent#

Renders a generate_image call's loader while it runs and its images once they land.

InfoRowComponent#

Renders a plain informational line from the harness, in muted text.

InlineChipTextComponent#

A receipt line with its chips (see the module comment).

InlineCodeComponent#

Inline code in prose, as what it names (see above).

InteractionToolBodyComponent#

The expanded body of a present_plan, ask_user or todowrite call (see the module comment); null for any other.

LazyRowComponent#

Renders a transcript row that mounts its content only when it nears the viewport. Until then it is an empty box at its estimated height; once mounted it stays mounted.

LinkBadgeComponent#

A link as a badge: the site's icon and the short address; the whole URL on hover. Opens externally.

LinkIconComponent#

The site's icon before a link in prose; nothing until (or unless) the site has one.

LiveOutputComponent#

A live output window.

LoadEarlierRowComponent#

Explicit scrollback at the top of the timeline, drawn as one of its rows: the rail's quiet ring (an arrow up, the running arc while a page loads) and a muted line on the conversation's text size, with the hover pill the fold's action lines use. Scroll-to-load needs an overflowing viewport; this works regardless, and by keyboard. Without row icons (showIcon, the Row icons setting) the ring goes too, so its text lines up with the rows'.

LoadFullOutputButtonComponent#

"Load full output" under a clipped result.

MarkdownComponent#

Renders markdown in the .zg-md prose box. Long texts (a pasted 60 KB prompt, a long report) render in chunks (splitMarkdown): each is its own memoised parse, so a streaming reply re-parses only its tail, and a long text mounting ahead of the view (useBackgroundMount) parses a couple of chunks per frame instead of all of it in one. Chunks are siblings in the one box, so block spacing, the first/last-child rules and the streaming caret are unchanged. While a transcript search runs, everything renders at once (it walks the DOM). A fence still open at the end of a streaming reply skips the parse: the code block draws its text until it closes.

MarkdownDiagramsComponent#

Sets whether the Markdown below draws ```mermaid fences as diagrams. Without one they do. Transcript sets it from its renderDiagrams option.

MermaidDiagramComponent#

Draws a Mermaid source as a themed SVG diagram, with zoom and a toggle to its source. Falls back to the highlighted source when Pele cannot draw it.

MessageGroupRowComponent#

Renders a group of an exchange's messages: earlier messages stacked behind the latest one, which shows in full. Expands to list every message.

ModelVerdictComponent#

The decision model's verdict on the call. A denial reads "auto-denied" with the model and its confidence as chips; an approval is only a sparkle (most calls of a model-approved session are), its verdict in the tooltip.

NestedToolCallsComponent#

The calls a tool made (a codemode script's tools.*, its row's children), one step in under its row, open or not: they are the call's children, not its body. Each one is a regular ToolRow with its own state.

NoticeRowComponent#

Structured notice: the headline as a severity-toned badge, facts beneath. GUI counterpart of the TUI's NoticeRow (which keeps the glyph + label, this surface has color). Rendered for info events that carry notice (run-end stop reasons, model fallback, repeat guard, …); plain info events keep the quiet InfoRow.

PromptEchoComponent#

A sent prompt with the composer's badges (see above).

PromptLinesComponent#

A prompt's content as the composer lays it out: every typed line its own block (.zg-prompt-line), so a sent prompt keeps the rhythm it had while being written (.zg-prompt-bubble, transcript.css). items is the text and its inline badges, in order; a badge never spans a line break.

ProseMarkdownComponent#

Markdown prose with chips: inline code as file / ref chips, links as reference and PR badges, extension references parsed in.

ReadFileBlockComponent#

The highlighted file a read_file call returned, its language from the path it read.

RefChipComponent#

A #N or sha chip: a GitHub issue or PR with its state and card when the repo is on GitHub, else the plain chip.

ReferenceChipComponent#

An extension reference as its badge (and hover card) once its view names something; the text until then.

ReferenceTextComponent#

text with its references as badges; plain text when there are none.

RowFrameComponent#

Lays out one transcript row: a flex line that holds the row's dot and its content.

RunnableCodeBlockComponent#

A shell block with its run controls and its last run under it. A block with nothing to run, or an app that offers neither way to run, draws the plain block.

RunReceiptInlineComponent#

The run receipt as a row of small chips (model, time, round trips, cost, tokens, speed), each tinted by meaning and explained on hover. The hairline chips (.zg-meta-chip) keep the values apart.

RunSummaryRowComponent#

Standalone receipt row — only for a run whose closing turn has no assistant row to dock onto.

SearchHighlightStyleComponent#

The ::highlight() color rules, resolved once per mount. ::highlight() pseudos can't reliably resolve CSS custom properties in all Chromium versions, so the accent is resolved to a concrete color and interpolated into the injected rules. Theme changes mid-search show the old accent until reopen — acceptable for a transient surface. Render exactly one instance while search is active (overlay OR composer mode).

SelectCursorComponent#

Renders the select-turn highlight behind the transcript rows marked data-sel, and scrolls the selection into view.

SelectTurnExitComponent#

The mode's exit key, as a button.

SelectTurnHintKeysComponent#

The mode's key list (or its notice); null unless the mode is on in sessionId.

SelectTurnProviderComponent#

Holds select-turn mode for the surfaces below it (one mode for the whole app).

SessionCardComponent#

A #chat chip's card; its title opens the chat (OpenSessionContext).

SessionEventRowComponent#

Orchestration: a worker session reported an outcome. Drawn as a session thread draws its steps (the fold head / ToolRow idiom): a flat .zg-disclosure row, the title in the content voice, the receipt in .zg-meta, and a muted two-line excerpt of the worker's last word. No card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the reporting session (onOpenSession; without it the row is inert); needs-attention is the loud one, since it is the one status a human, not the main, has to act on. Falls back to a plain, non-clickable text row when sessionEvent is absent (malformed signal).

ShellBlockProviderComponent#

Lets the shell blocks of the reply below run (RunnableCodeBlock).

SkillCardComponent#

A skill chip's card.

SpawnEndRowComponent#

The worker's end: a sentence, then what it cost and used as chips (describeSpawnEnd, shared with the TUI).

SpawnStartRowComponent#

Spawn lifecycle markers — rendered INSIDE the SubagentBlock (every spawn row carries a childId, so clusterByOwner always folds them into a cluster). The block header already carries the identity + outcome, so these stay quiet: a plain "Task" / "Finished" lead-in and the marker text in normal (non-mono) type — task previews and outcome summaries are prose, not code. The raw child label survives as a tooltip for debugging.

SubagentBlockComponent#

A contiguous run of subagent output behind one header, drawn as a tool call is: the outcome Dot in the gutter, "Agent" and the task preview, the duration and turn count inline, a trailing caret. The raw child label survives only as a tooltip.

Always individually collapsible — defaultCollapsed (driven by the hideSubagentOutput setting) only seeds the initial state; a manual toggle wins for the lifetime of the block.

TextRowComponent#

Renders an assistant reply as markdown through the Markdown renderer slot. While streaming it marks the reply as still arriving.

ThinkingBatchRowComponent#

Chained-thoughts group — mirrors ToolBatchRow's affordance exactly: one quiet header ("Thought 4 times", then the summed time as inline ToolTiming like a tool batch's) that expands to the individual ThinkingRow entries, each still individually collapsible. The duration only shows when at least one segment carried timing (live-session groups); replayed groups render a bare count.

ThinkingRowComponent#

Collapsible reasoning block — same zg-collapsible affordance as ToolRow / ToolBatchRow.

Header states:

  • live (segment still streaming): "Thinking…", collapsed to its header unless autoExpand (Settings.thinkingAutoExpand) opens it so the text streams in view.
  • closed with duration: "Thought for Ns" — thinkingMs is stamped when a live segment ends; the row auto-collapses at that moment.
  • replay: "Thoughts" — persisted thinking blocks carry no timing metadata (canonical shape is { type: 'thinking', text, signature? }), so reloaded rows collapse without a duration.

Manual toggling always wins over the auto state: userOpen starts null (follow auto) and, once the user clicks, pins the row — the live→closed transition can't re-collapse a row the user opened because the row id is ordinal-based and stable across the segment's close (see the thinking case in collapseEvents).

ToolBatchRowComponent#

Claude-Code-style batch header — collapsed by default, expands to reveal each child ToolRow. Mirrors the chevron / press-soft pattern the rest of the transcript already uses so the user reads it as "the same affordance" even though the underlying row is synthetic.

ToolDetailsComponent#

A tool call's payload: the command and its output, the diff, the file read, or input and output.

ToolGlyphComponent#

Renders the icon for a tool: a glyph by tool name, a puzzle piece for MCP tools, and a wrench otherwise.

ToolInputComponent#

A tool call's input panel, syntax-highlighted: the code it runs (a Codemode script line by line, CodemodeScript; a shell command, via toolInputCode), or else its JSON input.

ToolMediaComponent#

Renders a tool result's media inline: images as thumbnails that open the lightbox, video and audio with native controls. An item that fails to load shows its stand-in text.

ToolRowComponent#

Renders a tool call as a collapsible row: glyph, name and target, timing, and, when opened, its input, output, diff, or media.

ToolTimingComponent#

Live elapsed while the call runs, the final duration once it lands, both from the host's timing (the row's startedAt / durationMs). Same data the TUI shows for running work; muted mono so it reads as a receipt cell. No spinner: the ticking number is the progress cue, and the tool glyph already anchors the row's left edge.

TranscriptActionsProviderComponent#

Provides the transcript's actions to every row below it.

TranscriptRenderersProviderComponent#

Overrides any subset of the slots; the rest keep the enclosing (or default) renderers.

TranscriptRowComponent#

Renders one transcript row by switching on its kind: prompts, replies, thinking, tool calls, notices, folds, and groups.

TranscriptRowSlotComponent#

One root transcript row in its lazy wrapper, memoised on the row's own inputs.

TranscriptSearchComponent#

The ⌘F overlay: the query, the match counter, ▲▼ and Esc (see the module comment). Needs the app's ModalProvider.

UserBashRowComponent#

Dedicated row for user-initiated ! shell runs: ! <command> header with a stop button while running / an exit-code badge after, and a monospace tail window of the merged output (last 10 lines by default, full when showFull is on). Live streaming and reloaded transcripts render identically — both read the same persisted result text.

UserPromptAttachmentsComponent#

A sent prompt's attachments, above its bubble: images as 64px thumbnails, PDFs and text files as chips, all opening the lightbox (one gallery over them) when the transcript has their bytes or an address for them; other files as plain chips (the transcript has their name, not their bytes).

UserPromptRowComponent#

The prompt row: its dot, its attachments, its bubble. The bubble's pointer handlers are the app's (the desktop app opens the turn's actions on right-click).

WorkerDetailsComponent#

A worker, opened: what it was asked (the Task step, closed by default), then its own progress folded like an exchange (foldWorkerRows): its calls behind one "Working" row, earlier messages stacked behind one group, its last message in full. No second "Agent" block: the fold line above already is the agent.

Functions#

classifyInlineRefFunction#

Inline code that is exactly an issue or PR number or a SHA becomes a ref chip too.

copyPromptLinesFunction#

Copying from a bubble: the selected lines as typed, one line break between them and blank lines kept. The browser's own copy would drop the blank lines (an empty block has no text) and add breaks of its own.

createTurnCommandsFunction#

Creates the turn commands over a session host's stored turns.

defaultAttachmentLabelFunction#

Returns a generic file icon and the file name. The default attachmentLabel slot.

drawsImageGenerationFunction#

True when the row draws images: it made image requests, itself or through a script.

fileBadgeNameFunction#

A file badge's name: long names end in an ellipsis rather than crowding the line.

fileBadgeSpecFunction#

A file badge as an editor node renders it (the composer has no React inside its nodes).

findRefsFunction#

The #123s and SHAs in a plain text, in order (outside markdown: receipts, titles).

hasInteractionBodyFunction#

The tools this body knows how to render.

holdForceMountRowsFunction#

Every lazy row mounts while held (and stays mounted after release). Returns the release.

imageRequestsOfFunction#

The image requests a row draws: its own generate_image call, or the ones a script (a row with nested calls) made. Empty for anything else, a model listing, and a nested call (its script's row draws it).

isHiddenRowFunction#

Reasoning rows render nothing while showThinking is off (and get no wrapper).

lineStateOfFunction#

The LineState a row icon stands for, or undefined when the row's line says its state already (a reply, a note, an error in its own tone).

linkGlyphFunction#

A link badge's glyph: the site's icon once loaded (set --zg-site-icon), the globe until then or without one.

mountRowNowFunction#

Mount a lazy row's content now, wherever it is: a view putting its place back (useStickToBottom's restorePosition) lands on rows it never came near. A row already mounted, or not a lazy row, is left alone. Call it outside React's render and effects: it commits synchronously.

numberRefFunction#

The number of a text that is exactly #N (an issue or PR), else null.

parseReferenceUrlFunction#

The extension reference a zg-ref:ext: link names; null for any other URL.

parseRefUrlFunction#

The ref a zg-ref: link names; null for any other URL.

referenceUrlFunction#

The zg-ref:ext: URL for an extension reference (what the remark plugin writes).

refHrefFunction#

Where a ref leads on the repo's site (a PR or issue, a commit); null without a web base.

remarkReferencesFunction#

The remark plugin: the providers' matches in prose become zg-ref:ext: links.

remarkRefsFunction#

The remark plugin: #123 and commit SHAs in prose become zg-ref: links (see the module comment).

savedPathsFunction#

The saved paths, from the result's Saved: <path> (<size>) lines.

siteIconValueFunction#

The --zg-site-icon value for a loaded icon's data URL.

useBackgroundMountFunction#

True inside a row mounted ahead of the view, where content may render over a few frames.

useBadgeMenuFunction#

Opens the badge menu for a badge. Outside the provider (a test, a detached surface) the event is left alone, so the surrounding menu still opens.

useChipResolutionFunction#

Current answer for text in cwd, refreshed when stale.

useCommandFunction#

The command a chip's text names, in a folder on a host (hostId null: this one).

useCommitInfoFunction#

A sha's commit in cwd's repository.

useComposerSearchFunction#

The composer's ? search: its query, the engine over the transcript, and a change another window made (remoteApply) for the composer to show.

useFillViewportScrollbackFunction#

Fill a viewport that cannot scroll. On a long live run the tail page is all one exchange, folded into a single Working row: nothing overflows, no scroll event ever fires, and the history above stays unreachable. Load pages until the content overflows (slackPx past the viewport) and holds FILL_MIN_PROMPTS of the user's prompts (rows marked data-prompt), capped per activation so a 10k-turn fold doesn't drag the whole run over IPC. Past the cap, LoadEarlierRow takes over.

useForceMountRowsFunction#

Returns whether every lazy row must be mounted now, for example while a search needle is active.

useFullOutputFunction#

The whole text of a clipped tool result, fetched on demand through TranscriptActions.toolOutput. full: null = not fetched, a string = the full text (replaces the clipped preview), 'loading' while the roundtrip runs. available is false when the app cannot fetch outputs: the row then offers no button.

useModelNameFunction#

How the transcript names a model: the app's modelName, else from the id.

useReferencedSessionFunction#

The chat a #token names, and its context gauge.

useReferenceMatchesFunction#

The references in text for surface; empty until the providers are known.

useReferenceProvidersFunction#

The providers for cwd ('': user-level), asked for on first use. peek: only if the host already built that folder's registry.

useReferenceViewFunction#

A reference's view: undefined while unknown, null when it names nothing (no badge). Asked for on first use.

useResolveChipNowFunction#

Asks again now, bypassing the cache (a click: the file may exist since). null without a host's paths.

useRowIconsFunction#

Whether the rows of the transcript around draw their icons (RowIconsContext).

useSelectStopsFunction#

Select-turn stops (computeSelectStops): which turns the cursor walks and which rows light up. Derived per transcript change while the mode is on, never per keypress, and not at all outside it. registerStops hands the app a function that answers from the rows painted right now (it asks before the mode is on, and on every arrow), cached per input so a burst of arrows computes once.

useSelectTurnFunction#

The select-turn mode. K: the app's session id type. Throws outside a SelectTurnProvider.

useSelectTurnKeysFunction#

Drives select-turn mode for the session on show.

useSettledRevealFunction#

Whether the thread is still veiled (see the module comment).

useShellBlockScopeFunction#

The reply whose blocks can run here, or null (a streaming reply, a thought, a tool's input).

useSiteIconFunction#

The site icon of url once loaded; null until then, for a site without one, or without a host's icons.

useSkillFunction#

The skill a chip's text names in cwd.

useStickToBottomFunction#

Keeps a transcript's scroller on the bottom while it grows, and its reader's line in place once they leave it (the contract above).

useToolMediaFunction#

The media a result shows inline, with the text left around it; null when it shows none.

useTranscriptActionsFunction#

Returns the TranscriptActions from the nearest TranscriptActionsProvider. Without one it returns an object with no session and no actions.

useTranscriptFindFunction#

The find in the conversation: ⌘F opens it on the session on show (keeping a query already there), a switch to another session closes it.

useTranscriptFindKeyFunction#

Routes ⌘F / ⌘⇧F to the tab scope in reach, else to the conversation. The listener attaches once.

useTranscriptRenderersFunction#

Returns the renderer slots in effect: the defaults merged with every enclosing TranscriptRenderersProvider, and the extensions' language and tool renderers routed in.

useTranscriptRowsFunction#

Runs the headless pipeline over a transcript's events, one useMemo per pass, and returns the rows to paint.

useTranscriptScrollFunction#

The transcript's scroll: stick-to-bottom, where a conversation opens, the from-top signal and lazy scrollback (see the module comment).

useTranscriptSearchFunction#

revision is any value whose identity changes when the transcript re-renders (the host's events array) — it triggers a match recompute without moving the viewport, so streaming deltas don't yank the user away from the match they're reading. Only a needle CHANGE scrolls.

useTranscriptSelectionCopyFunction#

Drag-select transcript copy — mirrors the TUI's OSC-52 hook. On mouseup inside the timeline, if the live selection intersects the transcript and is non-empty, write its plain-text contents to the clipboard. Debounced via lastCopiedRef so dragging across the same selection doesn't spam the clipboard.

Web equivalent of the TUI's OSC-52 path. We don't subscribe to selectionchange directly because that event fires per-character during a drag — mouseup is the natural "I'm done picking" boundary.

useTurnCommandsFunction#

The turn commands over the session host's turns (stable while they are); null when the host has none.

useTurnMenuFunction#

The transcript's turn menu: onContextMenu for a row, prefetch on hover (the send time), and the menu element to render once (memoized).

useWheelHoverPauseFunction#

Pauses hover effects while the wheel scrolls the transcript, so rows passing under the pointer don't light up.

Constants#

AUTO_FILL_PAGESConstant#

Pages auto-loaded per activation before the explicit row takes over.

BADGE_GLYPHConstant#

Literal classes (UnoCSS scans this file): the ::before glyph of each badge kind.

CHIP_CARD_WIDTHConstant#

The hover card's width, px.

CODE_PANELConstant#

Tool input / output panels: set into the row on the code tone (quiet text, the code panel's inset edge).

COMMAND_DETAIL_LINEConstant#

The gutter line height of a command-detail row's Dot: a text-sm × 1.6 line (22.4px) plus the header button's py-0.5. A body-less detail has no button but keeps the same padding, so both share it.

CommandScopeContextConstant#

The transcript's command scope (its container provides the session's).

DEFAULT_TRANSCRIPT_RENDERERSConstant#

The default renderer slots: safe markdown, highlighted code, plain inline text, and a generic attachment icon. Used when no TranscriptRenderersProvider is present.

FILL_MIN_PROMPTSConstant#

Prompts the opened conversation should show: fewer, and the fill keeps loading.

GUTTER_STEP_PXConstant#

Horizontal distance in pixels from one nesting level of the transcript's glyph column to the next: a 16px glyph slot plus a 12px gap.

INLINE_CODE_CLASSConstant#

Inline code in running prose: the code tone, no outline. A path or identifier longer than the line breaks instead of running past the column.

MarkdownContextConstant#

The chips' session facts (no session: nothing resolves, nothing links).

MAX_MATCHESConstant#

Range cap — a short query ("e") over a long transcript can produce tens of thousands of matches; building Ranges + a Highlight for all of them stalls the frame for no navigational benefit. The counter shows "500+" when the cap is hit.

OpenSessionContextConstant#

Shows a chat by its id (a #chat card's title). The app provides it once; absent, the title is plain.

RowIconsContextConstant#

Whether the transcript draws its row icons: the Dot that leads each row (you, the agent, how a step went). Transcript provides it from its showRowIcons option. Without them the icon column goes and the rows take its room.

TranscriptSettlingConstant#

True while the transcript is first painting a conversation (switching to it, or its history landing). Rows mounted then were already there: they must not play their enter animation.

Interfaces#

AnsiSpansPropsInterface#

Props for AnsiSpans.

AnsiTextPropsInterface#

Props for AnsiText.

AttachmentIconPropsInterface#

Props for AttachmentIcon.

AttachmentLabelPartsInterface#

What a non-image attachment shows: an icon (or a short badge) and its name.

AuthFailureCardPropsInterface#

Props for AuthFailureCard.

BadgeEffectContextInterface#

What applyBadgeEffect applies an effect with.

BadgeMenuBrowserInterface#

Where web links open: the default browser, and the app's own browser pane.

BadgeMenuComposerInterface#

Where "Add to prompt" and an action's insert go: the focused composer.

BadgeMenuProviderPropsInterface#

Props for BadgeMenuProvider.

BadgeMenuSystemInterface#

Opens and reveals paths (open / reveal effects); each resolves false when the path is unavailable.

CardMarkdownPropsInterface#

Props for CardMarkdown.

CaretPropsInterface#

Props for Caret.

ChipCardPropsInterface#

Props for ChipCard.

ChipHoverPropsInterface#

Props for ChipHover.

CodeBlockSlotPropsInterface#

Props of the CodeBlock renderer slot.

CodemodeScriptPropsInterface#

Props for CodemodeScript.

CommandCardPropsInterface#

Props for CommandCard.

CommandDetailRowPropsInterface#

Props for CommandDetailRow.

CommandNoteRowPropsInterface#

Props for CommandNoteRow.

CommandScopeInterface#

Where a session's commands come from: its folder, on this computer or a server.

CommitCardPropsInterface#

Props for CommitCard.

CompactSummaryRowPropsInterface#

Props for CompactSummaryRow.

CvRowPropsInterface#

Props for CvRow.

DefaultMarkdownPropsInterface#

Props for DefaultMarkdown: the MarkdownSlotProps plus the root's style.

DiffLinesPropsInterface#

Props for DiffLines.

DotPropsInterface#

Props for Dot.

EditDiffBlockPropsInterface#

Props for EditDiffBlock.

ErrorRowPropsInterface#

Props for ErrorRow.

ExchangeFoldRowPropsInterface#

Props for ExchangeFoldRow.

FailedMarkPropsInterface#

Props for FailedMark.

FailureRowPropsInterface#

Props for FailureRow.

FileBadgeIconPropsInterface#

Props for FileBadgeIcon.

FoldHeaderPropsInterface#

Props for FoldHeader.

ImageGenerationBlockPropsInterface#

Props for ImageGenerationBlock.

InfoRowPropsInterface#

Props for InfoRow.

InlineChipTextPropsInterface#

Props for InlineChipText.

InlineCodePropsInterface#

Props for InlineCode.

InlineTextSlotPropsInterface#

Props of the InlineText renderer slot.

InteractionToolInterface#

The call an InteractionToolBody draws.

InteractionToolBodyPropsInterface#

Props for InteractionToolBody.

LazyRowPropsInterface#

Props for LazyRow.

LinkBadgePropsInterface#

Props for LinkBadge.

LinkIconPropsInterface#

Props for LinkIcon.

LiveOutputPropsInterface#

Props for LiveOutput.

LoadEarlierRowPropsInterface#

Props for LoadEarlierRow.

LoadFullOutputButtonPropsInterface#

Props for LoadFullOutputButton.

MarkdownContextValueInterface#

Session-scoped facts prose chips need. cwd and repoWebBase are null outside a session. host: the server a server session's files are on; its file chips are inert (this machine's disk is not that server's), with a tooltip saying so.

MarkdownDiagramsPropsInterface#

Props of MarkdownDiagrams.

MarkdownLinkPropsInterface#

Props of a MarkdownProps.Link.

MarkdownPropsInterface#

Props of Markdown.

MarkdownSlotPropsInterface#

Props of the Markdown renderer slot.

MermaidDiagramPropsInterface#

Props of MermaidDiagram.

MessageGroupRowPropsInterface#

Props for MessageGroupRow.

ModelVerdictPropsInterface#

Props for ModelVerdict.

NestedToolCallsPropsInterface#

Props for NestedToolCalls: the display props every nested ToolRow gets, plus the child calls.

NoticeRowPropsInterface#

Props for NoticeRow.

ParsedRefInterface#

A ref a zg-ref: link or inline code names.

ParsedReferenceUrlInterface#

An extension reference a zg-ref:ext: link names.

PromptEchoPropsInterface#

A submitted prompt as typed: its lines as the composer lays them out (PromptLines, the bubble keeps whitespace), with the composer's badges around its references (files, skills, links, and a command invocation's /name), so a prompt reads the same sent as typed. Badges are atomic inline boxes, so wrapping leaves them whole. An app's transcript Prompt slot.

PromptLinesPropsInterface#

Props for PromptLines.

PromptSlotPropsInterface#

Props of the Prompt renderer slot.

ProseMarkdownPropsInterface#

Props for ProseMarkdown.

ReadFileBlockPropsInterface#

Props for ReadFileBlock.

RefChipPropsInterface#

Props for RefChip.

ReferenceChipPropsInterface#

Props for ReferenceChip.

ReferenceTextPropsInterface#

Props for ReferenceText.

RefMatchInterface#

A #123 or SHA found in plain text.

RowContextInterface#

What every row reads besides its own data: one memoized object per transcript.

RowFramePropsInterface#

Props for RowFrame.

RowPlaceInterface#

A row of a ScrollPosition, and where it was on screen.

RunnableCodeBlockPropsInterface#

Props for RunnableCodeBlock.

RunReceiptInlinePropsInterface#

Props for RunReceiptInline.

RunSummaryRowPropsInterface#

Props for RunSummaryRow.

SelectCursorPropsInterface#

Props for SelectCursor.

SelectTurnCommandsInterface#

The turn commands an app implements for the mode (open the details, copy, fork).

SelectTurnHintKeysPropsInterface#

Props for SelectTurnHintKeys.

SelectTurnKeysOptionsInterface#

Options for useSelectTurnKeys.

SelectTurnProviderPropsInterface#

Props for SelectTurnProvider.

SelectTurnStateInterface#

The mode's cursor: the session that owns it and the selected stop.

SelectTurnValueInterface#

What useSelectTurn returns: the mode's state and its actions.

SessionCardPropsInterface#

Props for SessionCard.

SessionEventRowPropsInterface#

Props for SessionEventRow.

SessionTitleSlotPropsInterface#

Props of the SessionTitle renderer slot.

ShellBlockProviderPropsInterface#

Props for ShellBlockProvider.

ShellBlockScopeInterface#

The reply a block is in.

SkillCardPropsInterface#

Props for SkillCard.

SlotEntryInterface#

A cached root row element and the inputs it was built from. The transcript reuses the element while the inputs are unchanged.

SpawnEndRowPropsInterface#

Props for SpawnEndRow.

SpawnStartRowPropsInterface#

Props for SpawnStartRow.

StickToBottomOptionsInterface#

Options of useStickToBottom.

SubagentBlockPropsInterface#

Props for SubagentBlock.

TextPreviewSlotPropsInterface#

Props of the TextPreview renderer slot: a text attachment opened in the lightbox.

TextRowPropsInterface#

Props for TextRow.

ThinkingBatchRowPropsInterface#

Props for ThinkingBatchRow.

ThinkingRowPropsInterface#

Props for ThinkingRow.

ToolBatchRowPropsInterface#

Props for ToolBatchRow.

ToolBodySlotPropsInterface#

Props of the ToolBody renderer slot.

ToolDetailsPropsInterface#

Props for ToolDetails.

ToolGlyphPropsInterface#

Props for ToolGlyph.

ToolInputPropsInterface#

Props for ToolInput.

ToolMediaPropsInterface#

Props for ToolMedia.

ToolRowPropsInterface#

Props for ToolRow.

ToolTimingPropsInterface#

Props for ToolTiming.

TranscriptAccountsInterface#

The accounts of the host that holds a session's credentials, for the card a run stopped by a failed sign-in shows (AuthFailureCard). Each member is optional, and the card's button that needs it hides without it.

TranscriptActionsInterface#

What a transcript row can ask of the app that hosts it. Every action but sessionId is optional, and its control is hidden when the app leaves it out.

TranscriptActionsProviderPropsInterface#

Props for TranscriptActionsProvider.

TranscriptFindInterface#

What useTranscriptFind returns: hand open, query and close to your TranscriptSearch.

TranscriptFindKeyOptionsInterface#

Options for useTranscriptFindKey.

TranscriptFindOptionsInterface#

Options for useTranscriptFind.

TranscriptFindTargetInterface#

Where the find is open, and with what.

TranscriptRenderersInterface#

The set of renderer slots a transcript draws through. Each is a component or function an app can replace with TranscriptRenderersProvider.

TranscriptRenderersProviderPropsInterface#

Props for TranscriptRenderersProvider.

TranscriptRowPropsInterface#

Props for TranscriptRow.

TranscriptRowsInterface#

The rows a Transcript paints and what it derives from them.

TranscriptRowsInputInterface#

The display options that shape the rows.

TranscriptRowSlotPropsInterface#

Props for TranscriptRowSlot: the TranscriptRowProps of its row, plus its lazy wrapper's.

TranscriptScrollInputsInterface#

What useTranscriptScroll reads from its container.

TranscriptSearchOptionsInterface#

Opt-ins of a search opened from a palette match (see the module comment).

TranscriptSearchPropsInterface#

Props for TranscriptSearch.

TranscriptSearchStateInterface#

What useTranscriptSearch returns: the match count and cursor, and the hop.

TranscriptTurnMenuInterface#

A turn's actions on its prompt bubble and settled replies (the app's turn menu).

TurnCommandsInterface#

What createTurnCommands returns.

TurnCommandsOptionsInterface#

Options of createTurnCommands.

TurnMenuActionsInterface#

What the turn menu's items do, for one transcript. Memoize it: the items rebuild when it changes.

TurnMenuTargetInterface#

What a turn-menu right-click landed on.

UserBashRowPropsInterface#

Props for UserBashRow.

UserPromptAttachmentsPropsInterface#

Props for UserPromptAttachments.

UserPromptRowPropsInterface#

Props for UserPromptRow.

WorkerDetailsPropsInterface#

Props for WorkerDetails.

Types#

ChipOpenerType#

How a file chip opens what it names: a file at at (1-based) when the text gave a line (schema.ts:258).

ComposerSearchType#

What useComposerSearch returns.

DefaultInlineTextPropsType#

Props for DefaultInlineText: the InlineTextSlotProps.

DefaultPromptPropsType#

Props for DefaultPrompt: the PromptSlotProps.

DefaultSessionTitlePropsType#

LineStateType#

A step's state that only its row icon shows: a call or a worker still running, or one that failed. Without the icons the row's own line says it: a light sweep over its name while it runs, a FailedMark once it failed.

OpenBadgeMenuType#

Opens the badge menu for a badge at the event's point.

ScrollPositionType#

Where a transcript's view is (useStickToBottom's readPosition): following the bottom, or the row under the reader's line and then each row around it, out to the transcript's own.

Re-exports#

These names are documented on the entry point that owns them.