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
27 changes: 18 additions & 9 deletions crates/goose-cli/src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,14 @@ pub fn toggle_extensions_dialog() -> Result<(), Box<dyn Error>> {
}

// Create a list of extension names and their enabled status
let extension_status: Vec<(String, bool)> = extensions
let mut extension_status: Vec<(String, bool)> = extensions
.iter()
.map(|entry| (entry.config.name().to_string(), entry.enabled))
.collect();

// Sort extensions alphabetically by name
extension_status.sort_by(|a, b| a.0.cmp(&b.0));

// Get currently enabled extensions for the selection
let enabled_extensions: Vec<&String> = extension_status
.iter()
Expand Down Expand Up @@ -503,21 +506,22 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
// TODO we'll want a place to collect all these options, maybe just an enum in goose-mcp
"built-in" => {
let extension = cliclack::select("Which built-in extension would you like to enable?")
.item(
"developer",
"Developer Tools",
"Code editing and shell access",
)
.item(
"computercontroller",
"Computer Controller",
"controls for webscraping, file caching, and automations",
)
.item(
"developer",
"Developer Tools",
"Code editing and shell access",
)
.item(
"googledrive",
"Google Drive",
"Search and read content from google drive - additional config required",
)
.item("jetbrains", "JetBrains", "Connect to jetbrains IDEs")
.item(
"memory",
"Memory",
Expand All @@ -528,7 +532,6 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
"Tutorial",
"Access interactive tutorials and guides",
)
.item("jetbrains", "JetBrains", "Connect to jetbrains IDEs")
.interact()?
.to_string();

Expand Down Expand Up @@ -773,11 +776,14 @@ pub fn remove_extension_dialog() -> Result<(), Box<dyn Error>> {
let extensions = ExtensionConfigManager::get_all()?;

// Create a list of extension names and their enabled status
let extension_status: Vec<(String, bool)> = extensions
let mut extension_status: Vec<(String, bool)> = extensions
.iter()
.map(|entry| (entry.config.name().to_string(), entry.enabled))
.collect();

// Sort extensions alphabetically by name
extension_status.sort_by(|a, b| a.0.cmp(&b.0));

if extensions.is_empty() {
cliclack::outro(
"No extensions configured yet. Run configure and add some extensions first.",
Expand Down Expand Up @@ -887,7 +893,7 @@ pub fn configure_goose_mode_dialog() -> Result<(), Box<dyn Error>> {
let mode = cliclack::select("Which Goose mode would you like to configure?")
.item(
"auto",
"Auto Mode",
"Auto Mode",
"Full file modification, extension usage, edit, create and delete files freely"
)
.item(
Expand Down Expand Up @@ -1052,6 +1058,9 @@ pub async fn configure_tool_permissions_dialog() -> Result<(), Box<dyn Error>> {
.collect();
extensions.push("platform".to_string());

// Sort extensions alphabetically by name
extensions.sort();

let selected_extension_name = cliclack::select("Choose an extension to configure tools")
.items(
&extensions
Expand Down
Loading