pub enum EntryKind {
Text,
UserMessage,
AssistantTurn {
tool_calls: Vec<SerializedToolCall>,
},
ToolResult {
tool_call_id: String,
tool_name: String,
is_error: bool,
},
}Expand description
The kind of content stored in a region entry.
Entries carry typed metadata instead of relying on text-prefix parsing (e.g., “Assistant: “ / “User: “) to determine message roles. This eliminates the bug where tool results stored outside the conversation region all become “user” role messages.
Variants§
Text
Plain text (system content, summaries, scratch).
UserMessage
User message in conversation.
AssistantTurn
Assistant response with optional tool calls.
Fields
§
tool_calls: Vec<SerializedToolCall>ToolResult
Tool execution result, paired with a tool_call_id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntryKind
impl<'de> Deserialize<'de> for EntryKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for EntryKind
Auto Trait Implementations§
impl Freeze for EntryKind
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnsafeUnpin for EntryKind
impl UnwindSafe for EntryKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more