feat(cli): add type-to-search filtering to select/multiselect dialogs (#6862)
Signed-off-by: Harrison <hcstebbins@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -565,6 +565,7 @@ pub async fn configure_provider_dialog() -> anyhow::Result<bool> {
|
|||||||
let provider_name = cliclack::select("Which model provider should we use?")
|
let provider_name = cliclack::select("Which model provider should we use?")
|
||||||
.initial_value(&default_provider)
|
.initial_value(&default_provider)
|
||||||
.items(&provider_items)
|
.items(&provider_items)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
// Get the selected provider's metadata
|
// Get the selected provider's metadata
|
||||||
@@ -784,6 +785,7 @@ pub fn toggle_extensions_dialog() -> anyhow::Result<()> {
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
)
|
)
|
||||||
.initial_values(enabled_extensions)
|
.initial_values(enabled_extensions)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
// Update enabled status for each extension
|
// Update enabled status for each extension
|
||||||
@@ -1122,6 +1124,7 @@ pub fn remove_extension_dialog() -> anyhow::Result<()> {
|
|||||||
.map(|(name, _)| (name, name.as_str(), MULTISELECT_VISIBILITY_HINT))
|
.map(|(name, _)| (name, name.as_str(), MULTISELECT_VISIBILITY_HINT))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
)
|
)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
for name in selected {
|
for name in selected {
|
||||||
@@ -1427,6 +1430,7 @@ pub async fn configure_tool_permissions_dialog() -> anyhow::Result<()> {
|
|||||||
.map(|ext| (ext.clone(), ext.clone(), ""))
|
.map(|ext| (ext.clone(), ext.clone(), ""))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
)
|
)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
let config = Config::global();
|
let config = Config::global();
|
||||||
@@ -1507,6 +1511,7 @@ pub async fn configure_tool_permissions_dialog() -> anyhow::Result<()> {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
)
|
)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
// Find the selected tool
|
// Find the selected tool
|
||||||
@@ -1947,6 +1952,7 @@ fn remove_provider() -> anyhow::Result<()> {
|
|||||||
|
|
||||||
let selected_id = cliclack::select("Which custom provider would you like to remove?")
|
let selected_id = cliclack::select("Which custom provider would you like to remove?")
|
||||||
.items(&provider_items)
|
.items(&provider_items)
|
||||||
|
.filter_mode()
|
||||||
.interact()?;
|
.interact()?;
|
||||||
|
|
||||||
remove_custom_provider(selected_id)?;
|
remove_custom_provider(selected_id)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user