@@ -1070,7 +1070,7 @@ function ChatHandler:provider(params)
1070
1070
results = self .available_providers ,
1071
1071
}),
1072
1072
sorter = sorters .values .generic_sorter ({}),
1073
- attach_mappings = function (prompt_bufnr , map )
1073
+ attach_mappings = function (_ , map )
1074
1074
local on_select = function (prompt_bufnr )
1075
1075
local selection = action_state .get_selected_entry (prompt_bufnr )
1076
1076
actions .close (prompt_bufnr )
@@ -1154,7 +1154,7 @@ function ChatHandler:model(params)
1154
1154
}),
1155
1155
sorter = sorters .values .generic_sorter ({}),
1156
1156
attach_mappings = function (_ , map )
1157
- map ( " i " , " <CR> " , function (prompt_bufnr )
1157
+ local on_select = function (prompt_bufnr )
1158
1158
local selected_entry = action_state .get_selected_entry ()
1159
1159
actions .close (prompt_bufnr )
1160
1160
if not selected_entry then
@@ -1163,7 +1163,9 @@ function ChatHandler:model(params)
1163
1163
end
1164
1164
local selected_model = selected_entry [1 ]
1165
1165
self :switch_model (is_chat , selected_model , prov )
1166
- end )
1166
+ end
1167
+ map (" i" , " <CR>" , on_select )
1168
+ map (" n" , " <CR>" , on_select )
1167
1169
1168
1170
return true
1169
1171
end ,
0 commit comments