@@ -36,7 +36,7 @@ import {
3636 handle_save_mode_web ,
3737 handle_get_mode_api ,
3838 handle_save_mode_api ,
39- handle_get_home_view_type ,
39+ handle_get_main_view_type ,
4040 handle_get_version ,
4141 handle_show_prompt_template_quick_pick ,
4242 handle_get_api_tool_configurations ,
@@ -85,7 +85,7 @@ import {
8585} from '@/views/panel/backend/utils/preset-format-converters'
8686import { OriginalFileState } from '@/commands/apply-chat-response-command/types/original-file-state'
8787import { CHATBOTS } from '@shared/constants/chatbots'
88- import { HOME_VIEW_TYPES , HomeViewType } from '../types/home-view-type'
88+ import { MAIN_VIEW_TYPES , MainViewType } from '../types/home-view-type'
8989import { ApiMode , WebMode } from '@shared/types/modes'
9090import { response_preview_promise_resolve } from '@/commands/apply-chat-response-command/utils/preview'
9191import { Logger } from '@shared/utils/logger'
@@ -107,7 +107,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
107107 public chat_edit_format : EditFormat
108108 public api_edit_format : EditFormat
109109 public api_mode : ApiMode
110- public home_view_type : HomeViewType = HOME_VIEW_TYPES . WEB
110+ public main_view_type : MainViewType = MAIN_VIEW_TYPES . WEB
111111 public intelligent_update_cancel_token_sources : CancelTokenSource [ ] = [ ]
112112 public api_call_cancel_token_source : CancelTokenSource | null = null
113113 public commit_was_staged_by_script : boolean = false
@@ -310,9 +310,9 @@ export class PanelProvider implements vscode.WebviewViewProvider {
310310 event . document === vscode . window . activeTextEditor . document
311311 ) {
312312 if (
313- ( this . home_view_type == HOME_VIEW_TYPES . WEB &&
313+ ( this . main_view_type == MAIN_VIEW_TYPES . WEB &&
314314 this . web_mode == 'code-completions' ) ||
315- ( this . home_view_type == HOME_VIEW_TYPES . API &&
315+ ( this . main_view_type == MAIN_VIEW_TYPES . API &&
316316 this . api_mode == 'code-completions' )
317317 ) {
318318 this . calculate_token_count ( )
@@ -323,7 +323,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
323323
324324 public get_presets_config_key ( ) : string {
325325 const mode =
326- this . home_view_type == HOME_VIEW_TYPES . API ? this . api_mode : this . web_mode
326+ this . main_view_type == MAIN_VIEW_TYPES . API ? this . api_mode : this . web_mode
327327 switch ( mode ) {
328328 case 'ask' :
329329 return 'chatPresetsForAskAboutContext'
@@ -493,11 +493,11 @@ export class PanelProvider implements vscode.WebviewViewProvider {
493493 await handle_save_edit_format ( this , message )
494494 } else if ( message . command == 'CARET_POSITION_CHANGED' ) {
495495 this . caret_position = message . caret_position
496- } else if ( message . command == 'SAVE_HOME_VIEW_TYPE ' ) {
497- this . home_view_type = message . view_type
496+ } else if ( message . command == 'SAVE_MAIN_VIEW_TYPE ' ) {
497+ this . main_view_type = message . view_type
498498 this . calculate_token_count ( )
499- } else if ( message . command == 'GET_HOME_VIEW_TYPE ' ) {
500- handle_get_home_view_type ( this )
499+ } else if ( message . command == 'GET_MAIN_VIEW_TYPE ' ) {
500+ handle_get_main_view_type ( this )
501501 } else if ( message . command == 'GET_VERSION' ) {
502502 handle_get_version ( this )
503503 } else if ( message . command == 'SHOW_AT_SIGN_QUICK_PICK' ) {
@@ -585,7 +585,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
585585
586586 public calculate_token_count ( ) {
587587 if (
588- this . home_view_type == HOME_VIEW_TYPES . WEB &&
588+ this . main_view_type == MAIN_VIEW_TYPES . WEB &&
589589 this . web_mode == 'no-context'
590590 ) {
591591 this . send_message ( {
@@ -598,9 +598,9 @@ export class PanelProvider implements vscode.WebviewViewProvider {
598598 const active_editor = vscode . window . activeTextEditor
599599
600600 const is_code_completions_mode =
601- ( this . home_view_type == HOME_VIEW_TYPES . WEB &&
601+ ( this . main_view_type == MAIN_VIEW_TYPES . WEB &&
602602 this . web_mode == 'code-completions' ) ||
603- ( this . home_view_type == HOME_VIEW_TYPES . API &&
603+ ( this . main_view_type == MAIN_VIEW_TYPES . API &&
604604 this . api_mode == 'code-completions' )
605605
606606 Promise . all ( [
@@ -889,16 +889,16 @@ export class PanelProvider implements vscode.WebviewViewProvider {
889889
890890 public add_text_at_cursor_position ( text : string , chars_to_remove_before = 0 ) {
891891 const is_in_code_completions_mode =
892- ( this . home_view_type == HOME_VIEW_TYPES . WEB &&
892+ ( this . main_view_type == MAIN_VIEW_TYPES . WEB &&
893893 this . web_mode == 'code-completions' ) ||
894- ( this . home_view_type == HOME_VIEW_TYPES . API &&
894+ ( this . main_view_type == MAIN_VIEW_TYPES . API &&
895895 this . api_mode == 'code-completions' )
896896
897897 let current_instructions = ''
898898 let new_instructions = ''
899899 const mode : WebMode | ApiMode = is_in_code_completions_mode
900900 ? 'code-completions'
901- : this . home_view_type == HOME_VIEW_TYPES . WEB
901+ : this . main_view_type == MAIN_VIEW_TYPES . WEB
902902 ? this . web_mode
903903 : this . api_mode
904904
0 commit comments