pub enum ChatRole {
User,
Assistant,
Error,
Status,
Delegation,
Delegated,
}Expand description
Source/role of a chat line — drives the leader glyph and color chosen by
crate::widgets::scrollback::build_chat_lines.
Why: a direct port of tagent’s ChatRole — the four roles (who’s
speaking, or a system status line) are universal to any chat-shaped TUI,
not specific to tagent’s personas.
Variants§
User
User input.
Assistant
Assistant/agent response.
Error
An error response (rendered in the scrollback’s error color).
Status
An informational status line (e.g. “Connection lost”), or a
top-level tool card when the entry carries ChatLine::tool.
Delegation
The header or footer line framing one delegated sub-agent’s block (#7940). Rendered flush-left with its own glyph so the block’s start and end are scannable.
Delegated
Output or a tool notice produced by a delegated sub-agent (#7940).
Rendered indented inside the ChatRole::Delegation frame above it.
Trait Implementations§
impl Copy for ChatRole
impl Eq for ChatRole
impl StructuralPartialEq for ChatRole
Auto Trait Implementations§
impl Freeze for ChatRole
impl RefUnwindSafe for ChatRole
impl Send for ChatRole
impl Sync for ChatRole
impl Unpin for ChatRole
impl UnsafeUnpin for ChatRole
impl UnwindSafe for ChatRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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