pub struct ChatViewConfig {
pub user_prefix: String,
pub system_prefix: String,
pub timestamp_prefix: String,
pub continuation: String,
pub spinner_chars: Vec<char>,
pub default_title: String,
pub empty_message: String,
pub tool_icon: String,
pub tool_executing_arrow: String,
pub tool_completed_checkmark: String,
pub tool_failed_icon: String,
}Expand description
Fields§
§user_prefix: StringPrefix for user messages (e.g., “> “)
system_prefix: StringPrefix for system messages (e.g., “* “)
timestamp_prefix: StringPrefix for timestamps (e.g., “ - “)
continuation: StringContinuation line prefix for wrapped text
spinner_chars: Vec<char>Spinner characters for pending status animation
default_title: StringDefault title for the chat view
empty_message: StringMessage shown when chat is empty
tool_icon: StringIcon for tool headers
tool_executing_arrow: StringArrow for executing tools
tool_completed_checkmark: StringCheckmark for completed tools
tool_failed_icon: StringWarning icon for failed tools
Implementations§
Source§impl ChatViewConfig
impl ChatViewConfig
Sourcepub fn with_user_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_user_prefix(self, prefix: impl Into<String>) -> Self
Set the user message prefix
Sourcepub fn with_system_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_system_prefix(self, prefix: impl Into<String>) -> Self
Set the system message prefix
Sourcepub fn with_timestamp_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_timestamp_prefix(self, prefix: impl Into<String>) -> Self
Set the timestamp prefix
Sourcepub fn with_continuation(self, continuation: impl Into<String>) -> Self
pub fn with_continuation(self, continuation: impl Into<String>) -> Self
Set the continuation line prefix
Sourcepub fn with_spinner_chars(self, chars: &[char]) -> Self
pub fn with_spinner_chars(self, chars: &[char]) -> Self
Set the spinner characters
Sourcepub fn with_default_title(self, title: impl Into<String>) -> Self
pub fn with_default_title(self, title: impl Into<String>) -> Self
Set the default title
Sourcepub fn with_empty_message(self, message: impl Into<String>) -> Self
pub fn with_empty_message(self, message: impl Into<String>) -> Self
Set the empty state message
Sourcepub fn with_tool_icon(self, icon: impl Into<String>) -> Self
pub fn with_tool_icon(self, icon: impl Into<String>) -> Self
Set the tool header icon
Trait Implementations§
Source§impl Clone for ChatViewConfig
impl Clone for ChatViewConfig
Source§fn clone(&self) -> ChatViewConfig
fn clone(&self) -> ChatViewConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChatViewConfig
impl RefUnwindSafe for ChatViewConfig
impl Send for ChatViewConfig
impl Sync for ChatViewConfig
impl Unpin for ChatViewConfig
impl UnwindSafe for ChatViewConfig
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