Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions crates/goose-cli/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use goose::utils::safe_truncate;

use anyhow::{Context, Result};
use completion::GooseCompleter;
use goose::agents::extension::{Envs, ExtensionConfig};
use goose::agents::extension::{Envs, ExtensionConfig, PLATFORM_EXTENSIONS};
use goose::agents::types::RetryConfig;
use goose::agents::{Agent, SessionConfig, MANUAL_COMPACT_TRIGGER};
use goose::config::{Config, GooseMode};
Expand Down Expand Up @@ -299,15 +299,24 @@ impl CliSession {
/// * `builtin_name` - Name of the builtin extension(s), comma separated
pub async fn add_builtin(&mut self, builtin_name: String) -> Result<()> {
for name in builtin_name.split(',') {
let extension_name = name.trim().to_string();
let config = ExtensionConfig::Builtin {
name: extension_name,
display_name: None,
// TODO: should set a timeout
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
bundled: None,
description: name.trim().to_string(),
available_tools: Vec::new(),
let extension_name = name.trim();

let config = if PLATFORM_EXTENSIONS.contains_key(extension_name) {
ExtensionConfig::Platform {
name: extension_name.to_string(),
bundled: None,
description: name.to_string(),
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent description field usage. Line 308 uses name.to_string() while line 317 also uses name.to_string(), but extension_name was already trimmed on line 302. Line 308 should use extension_name.to_string() to avoid potential whitespace in the description.

Copilot uses AI. Check for mistakes.
available_tools: Vec::new(),
}
} else {
ExtensionConfig::Builtin {
name: extension_name.to_string(),
display_name: None,
timeout: None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the effect of the switch to have no timeout vs the prior

Some(goose::config::DEFAULT_EXTENSION_TIMEOUT)

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interested to know, but doesn't seem like a big deal to me as we wouldn't expect the builtins to time out conceptually

bundled: None,
description: name.to_string(),
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description field should use extension_name.to_string() instead of name.to_string() to ensure it uses the trimmed version of the name and maintains consistency with the name field on line 313.

Copilot uses AI. Check for mistakes.
available_tools: Vec::new(),
}
};
self.agent
.add_extension(config)
Expand Down