TranscriptMarkup

works.iterative.claude.ui.transcript.TranscriptMarkup

A transcript as the elements a host styles.

The vocabulary is semantic and prefixed: cc-transcript, cc-message, cc-activity, and the parts inside them. A host selects by tag and by attribute — cc-message[from="agent"], cc-activity[label="Bash"] — with the whole CSS language available, because the elements live in the page's own DOM and carry no style of their own. Choosing how a transcript looks is the host's, and nothing here takes it back.

A tool call is its own element rather than one more activity, because it has a shape a reader needs: the fields it was called with, each of them an element a host can select by the name the tool gave it. So is the answer to one, and both rows carry the token of the exchange they belong to, so a host can join a call to what came back from it.

Two things stay HTML's. Disclosure is details/summary wherever there is anything to open, so a row opens by the browser's own machinery rather than by a script, and keeps the keyboard behaviour that comes with it. Prose inside cc-body is HTML too — headings, lists, code, tables, as the writer marked them up. We own the structure of a conversation; HTML owns the rest.

The clock text is the producer's, because only the producer knows whose timezone to read the instant in. The instant itself rides along as the at attribute, so a host that wants a different format has the value.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def of(transcript: Transcript, clock: TranscriptClock): Markup

One session's conversation as the vocabulary.

One session's conversation as the vocabulary.

Value parameters

clock

how this producer writes the wall-clock time of an entry

transcript

the conversation to render

Attributes

def rowsOf(transcript: Transcript, clock: TranscriptClock): List[Markup]

The same conversation as the rows alone, without the element holding them.

The same conversation as the rows alone, without the element holding them.

A page that follows a session replaces part of what it holds rather than all of it, so it needs the rows as a sequence it can count into. They are the same rows of places, produced once here — the row saying where the session began included, because a followed page must be able to show it too and a row only one of the two paths can draw is a row that goes missing on the other.

Attributes

def trouble(message: String): Markup

A refusal or a failure, said in the transcript's place.

A refusal or a failure, said in the transcript's place.

It is not attributed to anyone: nobody in the conversation said it, so it is neither a message nor an activity.

Attributes