@@ -74,10 +74,12 @@ function _forge_action_agent() {
7474
7575# Action handler: Select provider
7676function _forge_action_provider() {
77+ local input_text=" $1 "
7778 echo
7879 local selected
7980 # Only show LLM providers (exclude context_engine and other non-LLM types)
80- selected=$( _forge_select_provider " " " " " llm" )
81+ # Pass input_text as query parameter for fuzzy search
82+ selected=$( _forge_select_provider " " " " " llm" " $input_text " )
8183
8284 if [[ -n " $selected " ]]; then
8385 # Extract the second field (provider ID) from the selected line
@@ -90,7 +92,8 @@ function _forge_action_provider() {
9092
9193# Action handler: Select model
9294function _forge_action_model() {
93- _forge_select_and_set_config " list models" " model" " Model" " $( $_FORGE_BIN config get model --porcelain) " " 2,3.."
95+ local input_text=" $1 "
96+ _forge_select_and_set_config " list models" " model" " Model" " $( $_FORGE_BIN config get model --porcelain) " " 2,3.." " $input_text "
9497}
9598
9699# Action handler: Sync workspace for codebase search
@@ -108,6 +111,7 @@ function _forge_select_and_set_config() {
108111 local prompt_text=" $3 "
109112 local default_value=" $4 "
110113 local with_nth=" ${5:- } " # Optional column selection parameter
114+ local query=" ${6:- } " # Optional query parameter for fuzzy search
111115 (
112116 echo
113117 local output
@@ -128,6 +132,11 @@ function _forge_select_and_set_config() {
128132 fzf_args+=(--with-nth=" $with_nth " )
129133 fi
130134
135+ # Add query parameter if provided
136+ if [[ -n " $query " ]]; then
137+ fzf_args+=(--query=" $query " )
138+ fi
139+
131140 if [[ -n " $default_value " ]]; then
132141 # For models, compare against the first field (model_id)
133142 local index=$( _forge_find_index " $output " " $default_value " 1)
0 commit comments