mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
chore: suggest using text/markdown when fetching content (#5854)
This commit is contained in:
@@ -492,13 +492,19 @@ impl ComputerControllerServer {
|
||||
let save_as = params.save_as;
|
||||
|
||||
// Fetch the content
|
||||
let response = self.http_client.get(url).send().await.map_err(|e| {
|
||||
ErrorData::new(
|
||||
ErrorCode::INTERNAL_ERROR,
|
||||
format!("Failed to fetch URL: {}", e),
|
||||
None,
|
||||
)
|
||||
})?;
|
||||
let response = self
|
||||
.http_client
|
||||
.get(url)
|
||||
.header("Accept", "text/markdown, */*")
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
ErrorData::new(
|
||||
ErrorCode::INTERNAL_ERROR,
|
||||
format!("Failed to fetch URL: {}", e),
|
||||
None,
|
||||
)
|
||||
})?;
|
||||
|
||||
let status = response.status();
|
||||
if !status.is_success() {
|
||||
|
||||
@@ -325,6 +325,8 @@ impl ServerHandler for DeveloperServer {
|
||||
**Important**: Each shell command runs in its own process. Things like directory changes or
|
||||
sourcing files do not persist between tool calls. So you may need to repeat them each time by
|
||||
stringing together commands.
|
||||
|
||||
If fetching web content, consider adding Accept: text/markdown header
|
||||
"#};
|
||||
|
||||
let windows_specific = indoc! {r#"
|
||||
|
||||
Reference in New Issue
Block a user