Skip to content

AssistantCardPart

AssistantCardPart = object

Defined in: packages/schema/src/assistant/protocol.ts:75

A card with a title, and in this order whichever of body, code, fields, steps and diffs it has, then its note and actions: what a backend proposes or reports, such as a query waiting for approval.

optional actions?: AssistantAction[]

Defined in: packages/schema/src/assistant/protocol.ts:104

Buttons at the card’s bottom.


optional badge?: string

Defined in: packages/schema/src/assistant/protocol.ts:85

Short text at the end of the title row.


optional body?: string

Defined in: packages/schema/src/assistant/protocol.ts:87

A paragraph of text.


optional code?: string

Defined in: packages/schema/src/assistant/protocol.ts:89

Monospace text, such as a query.


optional diffs?: AssistantDiff[]

Defined in: packages/schema/src/assistant/protocol.ts:100

Changed lines, such as of a file or a record.


optional fields?: object[]

Defined in: packages/schema/src/assistant/protocol.ts:91

Labelled values, one per line.

label: string

The value’s label.

value: string

The value, as text.


id: string

Defined in: packages/schema/src/assistant/protocol.ts:79

The part’s id, unique in its message; a part with the same id replaces it, and button clicks post it as partId.


optional note?: string

Defined in: packages/schema/src/assistant/protocol.ts:102

A muted line under the content, such as what happened to the card.


optional steps?: AssistantStep[]

Defined in: packages/schema/src/assistant/protocol.ts:98

The steps of the card’s work, each with its state.


title: string

Defined in: packages/schema/src/assistant/protocol.ts:81

The card’s title.


optional tone?: AssistantTone

Defined in: packages/schema/src/assistant/protocol.ts:83

The card’s colour; neutral when omitted.


type: "card"

Defined in: packages/schema/src/assistant/protocol.ts:77

Marks a card part.