@@ -7,11 +7,7 @@ import {
77 KeybindingRegistry ,
88 KeybindingScope ,
99} from '@opensumi/ide-core-browser' ;
10- import {
11- AI_CODE_EDITS_ACCEPT ,
12- AI_CODE_EDITS_DISCARD ,
13- AI_CODE_EDITS_TRIGGER ,
14- } from '@opensumi/ide-core-browser/lib/ai-native/command' ;
10+ import { AI_CODE_EDITS_COMMANDS } from '@opensumi/ide-core-browser/lib/ai-native/command' ;
1511import { MultiLineEditsIsVisible } from '@opensumi/ide-core-browser/lib/contextkey/ai-native' ;
1612import { CommandContribution , CommandRegistry , Domain } from '@opensumi/ide-core-common' ;
1713import { WorkbenchEditorService } from '@opensumi/ide-editor' ;
@@ -29,7 +25,7 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
2925 private readonly aiNativeConfigService : AINativeConfigService ;
3026
3127 registerCommands ( commands : CommandRegistry ) : void {
32- commands . registerCommand ( AI_CODE_EDITS_DISCARD , {
28+ commands . registerCommand ( AI_CODE_EDITS_COMMANDS . DISCARD , {
3329 execute : ( ) => {
3430 const editor = this . workbenchEditorService . currentCodeEditor ;
3531 if ( editor ) {
@@ -38,7 +34,7 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
3834 } ,
3935 } ) ;
4036
41- commands . registerCommand ( AI_CODE_EDITS_ACCEPT , {
37+ commands . registerCommand ( AI_CODE_EDITS_COMMANDS . ACCEPT , {
4238 execute : ( ) => {
4339 const editor = this . workbenchEditorService . currentCodeEditor ;
4440 if ( editor ) {
@@ -47,7 +43,7 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
4743 } ,
4844 } ) ;
4945
50- commands . registerCommand ( AI_CODE_EDITS_TRIGGER , {
46+ commands . registerCommand ( AI_CODE_EDITS_COMMANDS . TRIGGER , {
5147 execute : ( ) => {
5248 const editor = this . workbenchEditorService . currentCodeEditor ;
5349 if ( editor ) {
@@ -63,23 +59,23 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
6359 const { codeEdits } = this . aiNativeConfigService ;
6460
6561 keybindings . registerKeybinding ( {
66- command : AI_CODE_EDITS_DISCARD . id ,
62+ command : AI_CODE_EDITS_COMMANDS . DISCARD . id ,
6763 keybinding : Key . ESCAPE . code ,
6864 when : MultiLineEditsIsVisible . raw ,
6965 priority : 100 ,
7066 } ) ;
7167
7268 keybindings . registerKeybinding (
7369 {
74- command : AI_CODE_EDITS_ACCEPT . id ,
70+ command : AI_CODE_EDITS_COMMANDS . ACCEPT . id ,
7571 keybinding : Key . TAB . code ,
7672 when : MultiLineEditsIsVisible . raw ,
7773 } ,
7874 KeybindingScope . USER ,
7975 ) ;
8076
8177 keybindings . registerKeybinding ( {
82- command : AI_CODE_EDITS_TRIGGER . id ,
78+ command : AI_CODE_EDITS_COMMANDS . TRIGGER . id ,
8379 keybinding : codeEdits . triggerKeybinding ,
8480 when : 'editorFocus' ,
8581 } ) ;
0 commit comments