pub struct ChatLine {
pub role: ChatRole,
pub text: String,
pub tool: Option<ToolCard>,
}Expand description
One rendered chat entry in the scrollback.
Why: a direct, unmodified port of tagent’s ChatLine
(crates/trusty-agents/src/repl/tui/types.rs) — already fully
engine-agnostic (a role + a string), so no generalization was needed.
Fields§
§role: ChatRole§text: String§tool: Option<ToolCard>The tool call this entry renders as a card, if any (#4596). When
Some, the scrollback draws the card and ignores text; role still
places it — ChatRole::Status at top level, ChatRole::Delegated
inside a delegation block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChatLine
impl RefUnwindSafe for ChatLine
impl Send for ChatLine
impl Sync for ChatLine
impl Unpin for ChatLine
impl UnsafeUnpin for ChatLine
impl UnwindSafe for ChatLine
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more