feat: Improved coloring of LLM tool invocation outputs to make LLM output more readable and cohesive
This commit is contained in:
+7
-3
@@ -148,6 +148,10 @@ pub fn warning_text(input: &str) -> String {
|
||||
color_text(input, nu_ansi_term::Color::Yellow)
|
||||
}
|
||||
|
||||
pub fn muted_warning_text(input: &str) -> String {
|
||||
color_text(input, nu_ansi_term::Color::Fixed(136))
|
||||
}
|
||||
|
||||
pub fn color_text(input: &str, color: nu_ansi_term::Color) -> String {
|
||||
if *NO_COLOR {
|
||||
return input.to_string();
|
||||
@@ -162,7 +166,7 @@ pub fn dimmed_text(input: &str) -> String {
|
||||
if *NO_COLOR {
|
||||
return input.to_string();
|
||||
}
|
||||
nu_ansi_term::Style::new().dimmed().paint(input).to_string()
|
||||
nu_ansi_term::Color::Fixed(243).paint(input).to_string()
|
||||
}
|
||||
|
||||
pub fn cyan_bold_text(input: &str) -> String {
|
||||
@@ -170,14 +174,14 @@ pub fn cyan_bold_text(input: &str) -> String {
|
||||
return input.to_string();
|
||||
}
|
||||
nu_ansi_term::Style::new()
|
||||
.fg(nu_ansi_term::Color::Cyan)
|
||||
.fg(nu_ansi_term::Color::Fixed(73))
|
||||
.bold()
|
||||
.paint(input)
|
||||
.to_string()
|
||||
}
|
||||
|
||||
pub fn magenta_text(input: &str) -> String {
|
||||
color_text(input, nu_ansi_term::Color::Magenta)
|
||||
color_text(input, nu_ansi_term::Color::Fixed(133))
|
||||
}
|
||||
|
||||
pub fn multiline_text(input: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user