@@ -191,9 +191,7 @@ export const run_generate_action = async (params: {
191191 if ( additional_tokens > 0 ) {
192192 items . push ( {
193193 label : include_files_and_context_label ,
194- description : `+${ display_token_count (
195- additional_tokens
196- ) } `,
194+ description : `+${ display_token_count ( additional_tokens ) } ` ,
197195 id : 'attach'
198196 } )
199197 }
@@ -353,11 +351,15 @@ export const run_generate_action = async (params: {
353351 prompt_without_context . api_prompt . length / 4
354352 )
355353 const additional_tokens = prompt_with_context
356- ? Math . ceil ( prompt_with_context . api_prompt . length / 4 ) - skip_tokens
354+ ? Math . ceil ( prompt_with_context . api_prompt . length / 4 ) -
355+ skip_tokens
357356 : 0
358- const can_go_back_to_context = setting === 'ask' && ( additional_tokens > 0 || diffs_only_tokens < skip_tokens )
359-
360- const show_back_btn_here = show_back_button || can_go_back_to_context
357+ const can_go_back_to_context =
358+ setting === 'ask' &&
359+ ( additional_tokens > 0 || diffs_only_tokens < skip_tokens )
360+
361+ const show_back_btn_here =
362+ show_back_button || can_go_back_to_context
361363
362364 quick_pick . ignoreFocusOut = show_back_btn_here
363365
@@ -367,7 +369,9 @@ export const run_generate_action = async (params: {
367369 }
368370
369371 quick_pick . buttons = [
370- ...( show_back_btn_here ? [ vscode . QuickInputButtons . Back ] : [ ] ) ,
372+ ...( show_back_btn_here
373+ ? [ vscode . QuickInputButtons . Back ]
374+ : [ ] ) ,
371375 close_button
372376 ]
373377
@@ -411,7 +415,8 @@ export const run_generate_action = async (params: {
411415 prompt_without_context . api_prompt . length / 4
412416 )
413417 const additional_tokens = prompt_with_context
414- ? Math . ceil ( prompt_with_context . api_prompt . length / 4 ) - skip_tokens
418+ ? Math . ceil ( prompt_with_context . api_prompt . length / 4 ) -
419+ skip_tokens
415420 : 0
416421 if (
417422 setting === 'ask' &&
@@ -516,7 +521,8 @@ export const run_generate_action = async (params: {
516521 const last_selected_name =
517522 params . extension_context . workspaceState . get < string > (
518523 recents_key
519- ) ?? params . extension_context . globalState . get < string > ( recents_key )
524+ ) ??
525+ params . extension_context . globalState . get < string > ( recents_key )
520526
521527 const result = await show_configurations_quick_pick ( {
522528 items : valid_web_configurations ,
@@ -580,6 +586,7 @@ export const run_generate_action = async (params: {
580586 notification_title : t (
581587 'command.generate-commit-message-command.progress.title'
582588 ) ,
589+ execution_mode : 'headless' ,
583590 last_selected_workspace_state_key :
584591 LAST_SELECTED_WORKSPACE_FOR_COMMIT_MESSAGE_STATE_KEY ,
585592 agent_state_key : LAST_USED_AGENT_FOR_COMMIT_MESSAGE_STATE_KEY ,
@@ -596,7 +603,10 @@ export const run_generate_action = async (params: {
596603
597604 if ( ! invoke_cli_result ) {
598605 if ( was_empty_stage ) {
599- await vscode . commands . executeCommand ( 'git.unstageAll' , repository )
606+ await vscode . commands . executeCommand (
607+ 'git.unstageAll' ,
608+ repository
609+ )
600610 }
601611 return
602612 }
@@ -613,7 +623,9 @@ export const run_generate_action = async (params: {
613623
614624 if ( ! response_text . trim ( ) ) {
615625 vscode . window . showErrorMessage (
616- t ( 'command.generate-commit-message-command.error.empty-response' )
626+ t (
627+ 'command.generate-commit-message-command.error.empty-response'
628+ )
617629 )
618630 current_action = undefined
619631 step = 'action'
@@ -623,10 +635,11 @@ export const run_generate_action = async (params: {
623635 commit_message = response_text
624636 action_completed = true
625637 } else if ( action === 'manual' ) {
626- commit_message = params . extension_context . workspaceState . get < string > (
627- LAST_ACCEPTED_COMMIT_MESSAGE_STATE_KEY ,
628- ''
629- )
638+ commit_message =
639+ params . extension_context . workspaceState . get < string > (
640+ LAST_ACCEPTED_COMMIT_MESSAGE_STATE_KEY ,
641+ ''
642+ )
630643 action_completed = true
631644 } else {
632645 const api_configuration_data =
@@ -646,7 +659,10 @@ export const run_generate_action = async (params: {
646659
647660 if ( ! api_configuration_data ) {
648661 if ( was_empty_stage ) {
649- await vscode . commands . executeCommand ( 'git.unstageAll' , repository )
662+ await vscode . commands . executeCommand (
663+ 'git.unstageAll' ,
664+ repository
665+ )
650666 }
651667 return
652668 }
0 commit comments