@@ -36,20 +36,17 @@ import {
3636 handle_get_instructions ,
3737 handle_request_editor_state ,
3838 handle_request_editor_selection_state ,
39- handle_configure_api_providers ,
40- handle_setup_api_tool_multi_config ,
41- handle_setup_api_tool ,
42- handle_pick_open_router_model ,
43- handle_save_home_view_type ,
44- handle_get_home_view_type ,
4539 handle_edit_context ,
4640 handle_code_completion ,
4741 handle_get_edit_format ,
4842 handle_at_sign_quick_pick ,
4943 handle_get_mode_web ,
5044 handle_save_mode_web ,
5145 handle_get_mode_api ,
52- handle_save_mode_api
46+ handle_save_mode_api ,
47+ handle_save_home_view_type ,
48+ handle_get_home_view_type ,
49+ handle_open_settings
5350} from './message-handlers'
5451import {
5552 config_preset_to_ui_format ,
@@ -347,7 +344,11 @@ export class ViewProvider implements vscode.WebviewViewProvider {
347344 } else if ( message . command == 'PREVIEW_PRESET' ) {
348345 await handle_preview_preset ( this , message )
349346 } else if ( message . command == 'COPY_PROMPT' ) {
350- await handle_copy_prompt ( this , message . instruction , message . preset_name )
347+ await handle_copy_prompt (
348+ this ,
349+ message . instruction ,
350+ message . preset_name
351+ )
351352 } else if ( message . command == 'SHOW_PRESET_PICKER' ) {
352353 await handle_show_preset_picker ( this )
353354 } else if ( message . command == 'REQUEST_EDITOR_STATE' ) {
@@ -388,36 +389,14 @@ export class ViewProvider implements vscode.WebviewViewProvider {
388389 await handle_save_edit_format ( this , message )
389390 } else if ( message . command == 'CARET_POSITION_CHANGED' ) {
390391 this . caret_position = message . caret_position
391- } else if ( message . command == 'CONFIGURE_API_PROVIDERS' ) {
392- handle_configure_api_providers ( this )
393- } else if ( message . command == 'SETUP_API_TOOL_CODE_COMPLETIONS' ) {
394- await handle_setup_api_tool_multi_config ( {
395- provider : this ,
396- tool : 'code-completions'
397- } )
398- } else if ( message . command == 'SETUP_API_TOOL_EDIT_CONTEXT' ) {
399- await handle_setup_api_tool_multi_config ( {
400- provider : this ,
401- tool : 'edit-context'
402- } )
403- } else if ( message . command == 'SETUP_API_TOOL_INTELLIGENT_UPDATE' ) {
404- await handle_setup_api_tool_multi_config ( {
405- provider : this ,
406- tool : 'intelligent-update'
407- } )
408- } else if ( message . command == 'SETUP_API_TOOL_COMMIT_MESSAGES' ) {
409- await handle_setup_api_tool ( {
410- provider : this ,
411- tool : 'commit-messages'
412- } )
413- } else if ( message . command == 'PICK_OPEN_ROUTER_MODEL' ) {
414- await handle_pick_open_router_model ( this )
415392 } else if ( message . command == 'SAVE_HOME_VIEW_TYPE' ) {
416393 await handle_save_home_view_type ( this , message )
417394 } else if ( message . command == 'GET_HOME_VIEW_TYPE' ) {
418395 handle_get_home_view_type ( this )
419396 } else if ( message . command == 'SHOW_AT_SIGN_QUICK_PICK' ) {
420397 await handle_at_sign_quick_pick ( this , this . context )
398+ } else if ( message . command == 'OPEN_SETTINGS' ) {
399+ await handle_open_settings ( this )
421400 }
422401 } catch ( error : any ) {
423402 console . error ( 'Error handling message:' , message , error )
0 commit comments