Interface: HistoryTurn<M, TC>
Defined in: src/batteries/context/thrift/relevance.ts:185
One grouped conversation turn: the messages from a user message through the next assistant message (inclusive), plus any tool calls that occurred during it, and qa — the turn's full combined text (every message's content plus every tool call's name args fragment) used for relevance scoring.
Type Parameters
| Type Parameter | Default type |
|---|---|
M extends RelevanceMessage | RelevanceMessage |
TC extends RelevanceToolCall | RelevanceToolCall |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
createdAt | string | The turn's timestamp, updated to the latest message folded into it — used for selectNaiveTurns' recency ordering. | src/batteries/context/thrift/relevance.ts:194 |
messages | M[] | The messages belonging to this turn, in order. | src/batteries/context/thrift/relevance.ts:196 |
qa | string | The turn's combined text (all message content + tool argText(args) fragments), the string relevanceToQuery scores against. | src/batteries/context/thrift/relevance.ts:191 |
toolCalls | TC[] | The tool calls attributed to this turn (by timestamp — see groupHistoryIntoTurns). | src/batteries/context/thrift/relevance.ts:198 |