@@ -30,6 +30,8 @@ import { AccessibilityHelpAction } from 'vs/workbench/contrib/accessibility/brow
3030import { Disposable } from 'vs/base/common/lifecycle' ;
3131import { CommandsRegistry } from 'vs/platform/commands/common/commands' ;
3232import { Position } from 'vs/editor/common/core/position' ;
33+ import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
34+ import { Categories } from 'vs/platform/action/common/actionCommonCategories' ;
3335
3436CommandsRegistry . registerCommandAlias ( 'interactiveEditor.start' , 'inlineChat.start' ) ;
3537
@@ -453,18 +455,22 @@ export class ToggleInlineDiff extends AbstractInlineChatAction {
453455 title : localize ( 'toggleDiff' , 'Toggle Diff' ) ,
454456 icon : Codicon . diff ,
455457 precondition : ContextKeyExpr . and ( CTX_INLINE_CHAT_VISIBLE ) ,
456- toggled : { condition : CTX_INLINE_CHAT_SHOWING_DIFF , title : localize ( 'toggleDiff2' , "Show Inline Diff" ) } ,
458+ category : Categories . View ,
459+ toggled : {
460+ condition : CTX_INLINE_CHAT_SHOWING_DIFF ,
461+ title : localize ( 'toggleDiff2' , "Show Inline Diff" )
462+ } ,
457463 menu : {
458464 id : MENU_INLINE_CHAT_WIDGET_TOGGLE ,
459- when : CTX_INLINE_CHAT_EDIT_MODE . notEqualsTo ( EditMode . Preview ) ,
460- group : '1_config' ,
461- order : 9
465+ when : CTX_INLINE_CHAT_EDIT_MODE . notEqualsTo ( EditMode . Preview )
462466 }
463467 } ) ;
464468 }
465469
466- override runInlineChatCommand ( _accessor : ServicesAccessor , ctrl : InlineChatController ) : void {
467- ctrl . toggleDiff ( ) ;
470+ override runInlineChatCommand ( accessor : ServicesAccessor , _ctrl : InlineChatController ) : void {
471+ const configurationService = accessor . get ( IConfigurationService ) ;
472+ const newValue = ! configurationService . getValue ( 'inlineChat.showDiff' ) ;
473+ configurationService . updateValue ( 'inlineChat.showDiff' , newValue ) ;
468474 }
469475}
470476
0 commit comments