SummaryBlock
Defined in: src/types/messages.ts:672
A summary of earlier conversation history that takes the summarized messages’ place.
Through an agent, a model without serverSideSummary, or one that did not write it (provider), gets the text.
Implements
Section titled “Implements”SummaryBlockDataJSONSerializable<{summary:SummaryBlockData; }>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SummaryBlock(data): SummaryBlock;Defined in: src/types/messages.ts:693
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | SummaryBlockData |
Returns
Section titled “Returns”SummaryBlock
Properties
Section titled “Properties”readonly type: "summaryBlock";Defined in: src/types/messages.ts:676
Discriminator for summary content.
provider?
Section titled “provider?”readonly provider?: string;Defined in: src/types/messages.ts:681
Name of the provider that wrote the summary server-side, for example 'anthropic'.
Implementation of
Section titled “Implementation of”signature?
Section titled “signature?”readonly signature?: string;Defined in: src/types/messages.ts:686
Signature the provider returned with the summary, sent back unchanged.
Implementation of
Section titled “Implementation of”readonly text: string;Defined in: src/types/messages.ts:691
The summary text.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): { summary: SummaryBlockData;};Defined in: src/types/messages.ts:703
Serializes the SummaryBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify().
Returns
Section titled “Returns”{ summary: SummaryBlockData;}| Name | Type | Defined in |
|---|---|---|
summary | SummaryBlockData | src/types/messages.ts:703 |
Implementation of
Section titled “Implementation of”JSONSerializable.toJSON
fromJSON()
Section titled “fromJSON()”static fromJSON(data): SummaryBlock;Defined in: src/types/messages.ts:719
Creates a SummaryBlock instance from its wrapped data format.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | { summary: SummaryBlockData; } | Wrapped SummaryBlockData to deserialize |
data.summary | SummaryBlockData | - |
Returns
Section titled “Returns”SummaryBlock
SummaryBlock instance