Refactor TUI message formatting: add role label toggle, improve indentation, and adjust role label styling logic. Optimize provider handling.
This commit is contained in:
@@ -30,6 +30,11 @@ impl MessageFormatter {
|
||||
self.wrap_width = width.max(20);
|
||||
}
|
||||
|
||||
/// Whether role labels should be shown alongside messages
|
||||
pub fn show_role_labels(&self) -> bool {
|
||||
self.show_role_labels
|
||||
}
|
||||
|
||||
pub fn format_message(&self, message: &Message) -> Vec<String> {
|
||||
// 1) Normalize line breaks to '\n' (handles CR, NEL, LS, PS)
|
||||
let normalized: String = message
|
||||
|
||||
Reference in New Issue
Block a user