@@ -445,10 +445,12 @@ export class PanelProvider implements vscode.WebviewViewProvider {
445445 this . _config_listener = vscode . workspace . onDidChangeConfiguration (
446446 ( event ) => {
447447 if ( ! this . _webview_view ) return
448- const all_web_configuration_keys = [
449- 'codeWebChat.chatPresets'
450- ]
451- if ( all_web_configuration_keys . some ( ( key ) => event . affectsConfiguration ( key ) ) ) {
448+ const all_web_configuration_keys = [ 'codeWebChat.webConfigurations' ]
449+ if (
450+ all_web_configuration_keys . some ( ( key ) =>
451+ event . affectsConfiguration ( key )
452+ )
453+ ) {
452454 this . send_web_configurations_to_webview ( this . _webview_view . webview )
453455 }
454456
@@ -624,7 +626,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
624626 }
625627
626628 public get_web_configurations_config_key ( ) : string {
627- return 'chatPresets '
629+ return 'webConfigurations '
628630 }
629631
630632 public cancel_all_intelligent_updates ( ) {
@@ -795,11 +797,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
795797 } else if ( message . command == 'UPDATE_WEB_CONFIGURATION' ) {
796798 await handle_update_web_configuration ( this , message , webview_view )
797799 } else if ( message . command == 'DELETE_WEB_CONFIGURATION' ) {
798- await handle_delete_web_configuration (
799- this ,
800- message ,
801- webview_view
802- )
800+ await handle_delete_web_configuration ( this , message , webview_view )
803801 } else if ( message . command == 'DUPLICATE_WEB_CONFIGURATION' ) {
804802 await handle_duplicate_web_configuration (
805803 this ,
@@ -835,9 +833,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
835833 await handle_get_api_configurations ( this )
836834 } else if ( message . command == 'REORDER_API_CONFIGURATIONS' ) {
837835 await handle_reorder_api_configurations ( this , message )
838- } else if (
839- message . command == 'TOGGLE_PINNED_API_CONFIGURATION'
840- ) {
836+ } else if ( message . command == 'TOGGLE_PINNED_API_CONFIGURATION' ) {
841837 await handle_toggle_pinned_api_configuration ( this , message )
842838 } else if ( message . command == 'SAVE_WEB_PROMPT_TYPE' ) {
843839 await handle_save_web_prompt_type ( this , message . prompt_type )
@@ -871,7 +867,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
871867 await handle_hash_sign_quick_pick (
872868 this ,
873869 this . context ,
874- message . is_for_code_completions ,
870+ message . is_for_code_completions
875871 )
876872 } else if ( message . command == 'GO_TO_FILE' ) {
877873 handle_go_to_file ( message )
@@ -1012,22 +1008,17 @@ export class PanelProvider implements vscode.WebviewViewProvider {
10121008
10131009 public send_web_configurations_to_webview ( _ : vscode . Webview ) {
10141010 const config = vscode . workspace . getConfiguration ( 'codeWebChat' )
1015- const web_prompt_types : WebPromptType [ ] = [
1016- 'ask-about-context' ,
1017- 'find-relevant-files' ,
1018- 'edit-context' ,
1019- 'code-at-cursor' ,
1020- 'no-context'
1021- ]
10221011
1023- const web_configurations_config = config . get < ConfigWebConfigurationFormat [ ] > ( 'chatPresets' , [ ] ) || [ ]
1012+ const web_configurations_config =
1013+ config . get < ConfigWebConfigurationFormat [ ] > ( 'webConfigurations' , [ ] ) || [ ]
10241014 const web_configurations_ui = web_configurations_config
10251015 . filter ( ( config ) => config . chatbot && CHATBOTS [ config . chatbot ] )
10261016 . map ( ( config ) => {
10271017 let model = config . model
10281018 if ( config . chatbot && model ) {
10291019 const chatbot_info = CHATBOTS [ config . chatbot ]
1030- const is_user_provided_supported = chatbot_info . supports_user_provided_model
1020+ const is_user_provided_supported =
1021+ chatbot_info . supports_user_provided_model
10311022 const is_model_predefined = chatbot_info . models ?. [ model ]
10321023
10331024 if ( ! is_user_provided_supported && ! is_model_predefined ) {
@@ -1037,6 +1028,14 @@ export class PanelProvider implements vscode.WebviewViewProvider {
10371028 return config_web_configuration_to_ui_format ( { ...config , model } )
10381029 } )
10391030
1031+ const web_prompt_types : WebPromptType [ ] = [
1032+ 'ask-about-context' ,
1033+ 'find-relevant-files' ,
1034+ 'edit-context' ,
1035+ 'code-at-cursor' ,
1036+ 'no-context'
1037+ ]
1038+
10401039 this . send_message ( {
10411040 command : 'WEB_CONFIGURATIONS' ,
10421041 web_configurations : web_configurations_ui ,
0 commit comments