@@ -52,7 +52,6 @@ type Props = {
5252 has_active_selection : boolean
5353 chat_input_focus_and_select_key : number
5454 chat_input_focus_key : number
55- commit_button_enabling_trigger_count : number
5655 context_size_warning_threshold : number
5756}
5857
@@ -84,9 +83,6 @@ export const Main: React.FC<Props> = (props) => {
8483 const [ caret_position_to_set , set_caret_position_to_set ] = useState <
8584 number | undefined
8685 > ( )
87- const [ has_changes_to_commit , set_has_changes_to_commit ] =
88- useState < boolean > ( false )
89- const [ can_undo , set_can_undo ] = useState < boolean > ( false )
9086
9187 const is_in_code_completions_mode =
9288 ( props . home_view_type == HOME_VIEW_TYPES . WEB &&
@@ -146,12 +142,6 @@ export const Main: React.FC<Props> = (props) => {
146142 case 'EDIT_FORMAT_INSTRUCTIONS' :
147143 set_edit_format_instructions ( message . instructions )
148144 break
149- case 'GIT_STATE_CHANGED' :
150- set_has_changes_to_commit ( message . has_changes_to_commit )
151- break
152- case 'CAN_UNDO_CHANGED' :
153- set_can_undo ( message . can_undo )
154- break
155145 case 'SELECTED_PRESET_OR_GROUP_CHANGED' :
156146 set_selected_preset_or_group_name_by_mode ( ( prev ) => ( {
157147 ...prev ,
@@ -179,8 +169,7 @@ export const Main: React.FC<Props> = (props) => {
179169 { command : 'GET_INSTRUCTIONS' } ,
180170 { command : 'GET_EDIT_FORMAT' } ,
181171 { command : 'GET_EDIT_FORMAT_INSTRUCTIONS' } ,
182- { command : 'GET_API_TOOL_CONFIGURATIONS' } ,
183- { command : 'REQUEST_GIT_STATE' }
172+ { command : 'GET_API_TOOL_CONFIGURATIONS' }
184173 ]
185174 initial_messages . forEach ( ( message ) => post_message ( props . vscode , message ) )
186175
@@ -556,12 +545,6 @@ export const Main: React.FC<Props> = (props) => {
556545 } )
557546 }
558547
559- const handle_commit_click = ( ) => {
560- post_message ( props . vscode , {
561- command : 'COMMIT_CHANGES'
562- } )
563- }
564-
565548 const handle_response_history_item_click = ( item : {
566549 response : string
567550 raw_instructions ?: string
@@ -575,12 +558,6 @@ export const Main: React.FC<Props> = (props) => {
575558 } )
576559 }
577560
578- const handle_undo_click = ( ) => {
579- post_message ( props . vscode , {
580- command : 'UNDO'
581- } )
582- }
583-
584561 const instructions =
585562 current_mode == 'ask'
586563 ? props . ask_instructions
@@ -651,12 +628,8 @@ export const Main: React.FC<Props> = (props) => {
651628 presets = { presets_for_current_mode }
652629 on_create_preset = { handle_create_preset }
653630 on_quick_action_click = { handle_quick_action_click }
654- on_commit_click = { handle_commit_click }
655- on_undo_click = { handle_undo_click }
656631 has_active_editor = { props . has_active_editor }
657632 has_active_selection = { props . has_active_selection }
658- has_changes_to_commit = { has_changes_to_commit }
659- can_undo = { can_undo }
660633 chat_history = { current_history || [ ] }
661634 token_count = { token_count }
662635 web_mode = { props . web_mode }
@@ -696,9 +669,6 @@ export const Main: React.FC<Props> = (props) => {
696669 on_caret_position_set = { ( ) => set_caret_position_to_set ( undefined ) }
697670 chat_input_focus_and_select_key = { props . chat_input_focus_and_select_key }
698671 chat_input_focus_key = { props . chat_input_focus_key }
699- commit_button_enabling_trigger_count = {
700- props . commit_button_enabling_trigger_count
701- }
702672 response_history = { props . response_history }
703673 on_response_history_item_click = { handle_response_history_item_click }
704674 selected_history_item_created_at = { props . selected_history_item_created_at }
0 commit comments