feat: [anthropic] Claude 3.7 Sonnet with extended thinking (#1370)

- only works with anthropic provider (wont work with databricks)
This commit is contained in:
Salman Mohammed
2025-02-28 13:38:40 -05:00
committed by GitHub
parent 0d3d9ca5ae
commit e799e80eb3
6 changed files with 282 additions and 8 deletions
+12 -1
View File
@@ -107,8 +107,19 @@ pub fn render_message(message: &Message) {
MessageContent::Image(image) => {
println!("Image: [data: {}, type: {}]", image.data, image.mime_type);
}
MessageContent::Thinking(thinking) => {
if std::env::var("GOOSE_CLI_SHOW_THINKING").is_ok() {
println!("\n{}", style("Thinking:").dim().italic());
print_markdown(&thinking.thinking, theme);
}
}
MessageContent::RedactedThinking(_) => {
// For redacted thinking, print thinking was redacted
println!("\n{}", style("Thinking:").dim().italic());
print_markdown("Thinking was redacted", theme);
}
_ => {
println!("Message type could not be rendered");
println!("WARNING: Message content type could not be rendered");
}
}
}