NextTurnContext class final

Context passed to PrepareNextTurnHook after a turn fully completes.

Ported from pi's PrepareNextTurnContext.

Constructors

NextTurnContext({required AssistantMessage message, required List<ToolResultMessage> toolResults, required Context context, required List<Message> newMessages})
const

Properties

context → Context
The loop's context after the turn's messages have been appended.
final
hashCode → int
The hash code for this object.
no setterinherited
message → AssistantMessage
The assistant message that completed the turn.
final
newMessages → List<Message>
The messages this run will return if it exits now (prompts included for agentLoop/runAgentLoop, excluded for continuations).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolResults → List<ToolResultMessage>
Tool results produced this turn, in assistant source order.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited