@@ -19,7 +19,8 @@ import { terminalStrings } from '../common/terminalStrings.js';
1919import { ACTIVE_GROUP , AUX_WINDOW_GROUP , SIDE_GROUP } from '../../../services/editor/common/editorService.js' ;
2020import { DisposableStore } from '../../../../base/common/lifecycle.js' ;
2121
22- const enum ContextMenuGroup {
22+ export const enum TerminalContextMenuGroup {
23+ Chat = '0_chat' ,
2324 Create = '1_create' ,
2425 Edit = '3_edit' ,
2526 Clear = '5_clear' ,
@@ -103,34 +104,14 @@ export function setupTerminalMenus(): void {
103104
104105 MenuRegistry . appendMenuItems (
105106 [
106- {
107- id : MenuId . TerminalInstanceContext ,
108- item : {
109- group : ContextMenuGroup . Create ,
110- command : {
111- id : TerminalCommandId . Split ,
112- title : terminalStrings . split . value
113- }
114- }
115- } ,
116- {
117- id : MenuId . TerminalInstanceContext ,
118- item : {
119- command : {
120- id : TerminalCommandId . New ,
121- title : terminalStrings . new
122- } ,
123- group : ContextMenuGroup . Create
124- }
125- } ,
126107 {
127108 id : MenuId . TerminalInstanceContext ,
128109 item : {
129110 command : {
130111 id : TerminalCommandId . KillViewOrEditor ,
131112 title : terminalStrings . kill . value ,
132113 } ,
133- group : ContextMenuGroup . Kill
114+ group : TerminalContextMenuGroup . Kill
134115 }
135116 } ,
136117 {
@@ -140,7 +121,7 @@ export function setupTerminalMenus(): void {
140121 id : TerminalCommandId . CopySelection ,
141122 title : localize ( 'workbench.action.terminal.copySelection.short' , "Copy" )
142123 } ,
143- group : ContextMenuGroup . Edit ,
124+ group : TerminalContextMenuGroup . Edit ,
144125 order : 1
145126 }
146127 } ,
@@ -151,7 +132,7 @@ export function setupTerminalMenus(): void {
151132 id : TerminalCommandId . CopySelectionAsHtml ,
152133 title : localize ( 'workbench.action.terminal.copySelectionAsHtml' , "Copy as HTML" )
153134 } ,
154- group : ContextMenuGroup . Edit ,
135+ group : TerminalContextMenuGroup . Edit ,
155136 order : 2
156137 }
157138 } ,
@@ -162,7 +143,7 @@ export function setupTerminalMenus(): void {
162143 id : TerminalCommandId . Paste ,
163144 title : localize ( 'workbench.action.terminal.paste.short' , "Paste" )
164145 } ,
165- group : ContextMenuGroup . Edit ,
146+ group : TerminalContextMenuGroup . Edit ,
166147 order : 3
167148 }
168149 } ,
@@ -173,7 +154,7 @@ export function setupTerminalMenus(): void {
173154 id : TerminalCommandId . Clear ,
174155 title : localize ( 'workbench.action.terminal.clear' , "Clear" )
175156 } ,
176- group : ContextMenuGroup . Clear ,
157+ group : TerminalContextMenuGroup . Clear ,
177158 }
178159 } ,
179160 {
@@ -183,7 +164,7 @@ export function setupTerminalMenus(): void {
183164 id : TerminalCommandId . SizeToContentWidth ,
184165 title : terminalStrings . toggleSizeToContentWidth
185166 } ,
186- group : ContextMenuGroup . Config
167+ group : TerminalContextMenuGroup . Config
187168 }
188169 } ,
189170
@@ -194,7 +175,7 @@ export function setupTerminalMenus(): void {
194175 id : TerminalCommandId . SelectAll ,
195176 title : localize ( 'workbench.action.terminal.selectAll' , "Select All" ) ,
196177 } ,
197- group : ContextMenuGroup . Edit ,
178+ group : TerminalContextMenuGroup . Edit ,
198179 order : 3
199180 }
200181 } ,
@@ -226,7 +207,7 @@ export function setupTerminalMenus(): void {
226207 {
227208 id : MenuId . TerminalEditorInstanceContext ,
228209 item : {
229- group : ContextMenuGroup . Create ,
210+ group : TerminalContextMenuGroup . Create ,
230211 command : {
231212 id : TerminalCommandId . Split ,
232213 title : terminalStrings . split . value
@@ -240,7 +221,7 @@ export function setupTerminalMenus(): void {
240221 id : TerminalCommandId . New ,
241222 title : terminalStrings . new
242223 } ,
243- group : ContextMenuGroup . Create
224+ group : TerminalContextMenuGroup . Create
244225 }
245226 } ,
246227 {
@@ -250,7 +231,7 @@ export function setupTerminalMenus(): void {
250231 id : TerminalCommandId . KillEditor ,
251232 title : terminalStrings . kill . value
252233 } ,
253- group : ContextMenuGroup . Kill
234+ group : TerminalContextMenuGroup . Kill
254235 }
255236 } ,
256237 {
@@ -260,7 +241,7 @@ export function setupTerminalMenus(): void {
260241 id : TerminalCommandId . CopySelection ,
261242 title : localize ( 'workbench.action.terminal.copySelection.short' , "Copy" )
262243 } ,
263- group : ContextMenuGroup . Edit ,
244+ group : TerminalContextMenuGroup . Edit ,
264245 order : 1
265246 }
266247 } ,
@@ -271,7 +252,7 @@ export function setupTerminalMenus(): void {
271252 id : TerminalCommandId . CopySelectionAsHtml ,
272253 title : localize ( 'workbench.action.terminal.copySelectionAsHtml' , "Copy as HTML" )
273254 } ,
274- group : ContextMenuGroup . Edit ,
255+ group : TerminalContextMenuGroup . Edit ,
275256 order : 2
276257 }
277258 } ,
@@ -282,7 +263,7 @@ export function setupTerminalMenus(): void {
282263 id : TerminalCommandId . Paste ,
283264 title : localize ( 'workbench.action.terminal.paste.short' , "Paste" )
284265 } ,
285- group : ContextMenuGroup . Edit ,
266+ group : TerminalContextMenuGroup . Edit ,
286267 order : 3
287268 }
288269 } ,
@@ -293,7 +274,7 @@ export function setupTerminalMenus(): void {
293274 id : TerminalCommandId . Clear ,
294275 title : localize ( 'workbench.action.terminal.clear' , "Clear" )
295276 } ,
296- group : ContextMenuGroup . Clear ,
277+ group : TerminalContextMenuGroup . Clear ,
297278 }
298279 } ,
299280 {
@@ -303,7 +284,7 @@ export function setupTerminalMenus(): void {
303284 id : TerminalCommandId . SelectAll ,
304285 title : localize ( 'workbench.action.terminal.selectAll' , "Select All" ) ,
305286 } ,
306- group : ContextMenuGroup . Edit ,
287+ group : TerminalContextMenuGroup . Edit ,
307288 order : 3
308289 }
309290 } ,
@@ -314,7 +295,7 @@ export function setupTerminalMenus(): void {
314295 id : TerminalCommandId . SizeToContentWidth ,
315296 title : terminalStrings . toggleSizeToContentWidth
316297 } ,
317- group : ContextMenuGroup . Config
298+ group : TerminalContextMenuGroup . Config
318299 }
319300 }
320301 ]
@@ -329,7 +310,7 @@ export function setupTerminalMenus(): void {
329310 id : TerminalCommandId . NewWithProfile ,
330311 title : localize ( 'workbench.action.terminal.newWithProfile.short' , "New Terminal With Profile..." )
331312 } ,
332- group : ContextMenuGroup . Create
313+ group : TerminalContextMenuGroup . Create
333314 }
334315 } ,
335316 {
@@ -339,7 +320,7 @@ export function setupTerminalMenus(): void {
339320 id : TerminalCommandId . New ,
340321 title : terminalStrings . new
341322 } ,
342- group : ContextMenuGroup . Create
323+ group : TerminalContextMenuGroup . Create
343324 }
344325 }
345326 ]
@@ -551,7 +532,7 @@ export function setupTerminalMenus(): void {
551532 id : TerminalCommandId . SplitActiveTab ,
552533 title : terminalStrings . split . value ,
553534 } ,
554- group : ContextMenuGroup . Create ,
535+ group : TerminalContextMenuGroup . Create ,
555536 order : 1
556537 }
557538 } ,
@@ -562,7 +543,7 @@ export function setupTerminalMenus(): void {
562543 id : TerminalCommandId . MoveToEditor ,
563544 title : terminalStrings . moveToEditor . value
564545 } ,
565- group : ContextMenuGroup . Create ,
546+ group : TerminalContextMenuGroup . Create ,
566547 order : 2
567548 }
568549 } ,
@@ -573,7 +554,7 @@ export function setupTerminalMenus(): void {
573554 id : TerminalCommandId . MoveIntoNewWindow ,
574555 title : terminalStrings . moveIntoNewWindow . value
575556 } ,
576- group : ContextMenuGroup . Create ,
557+ group : TerminalContextMenuGroup . Create ,
577558 order : 2
578559 }
579560 } ,
@@ -584,7 +565,7 @@ export function setupTerminalMenus(): void {
584565 id : TerminalCommandId . RenameActiveTab ,
585566 title : localize ( 'workbench.action.terminal.renameInstance' , "Rename..." )
586567 } ,
587- group : ContextMenuGroup . Edit
568+ group : TerminalContextMenuGroup . Edit
588569 }
589570 } ,
590571 {
@@ -594,7 +575,7 @@ export function setupTerminalMenus(): void {
594575 id : TerminalCommandId . ChangeIconActiveTab ,
595576 title : localize ( 'workbench.action.terminal.changeIcon' , "Change Icon..." )
596577 } ,
597- group : ContextMenuGroup . Edit
578+ group : TerminalContextMenuGroup . Edit
598579 }
599580 } ,
600581 {
@@ -604,7 +585,7 @@ export function setupTerminalMenus(): void {
604585 id : TerminalCommandId . ChangeColorActiveTab ,
605586 title : localize ( 'workbench.action.terminal.changeColor' , "Change Color..." )
606587 } ,
607- group : ContextMenuGroup . Edit
588+ group : TerminalContextMenuGroup . Edit
608589 }
609590 } ,
610591 {
@@ -614,7 +595,7 @@ export function setupTerminalMenus(): void {
614595 id : TerminalCommandId . SizeToContentWidth ,
615596 title : terminalStrings . toggleSizeToContentWidth
616597 } ,
617- group : ContextMenuGroup . Edit
598+ group : TerminalContextMenuGroup . Edit
618599 }
619600 } ,
620601 {
@@ -625,7 +606,7 @@ export function setupTerminalMenus(): void {
625606 title : localize ( 'workbench.action.terminal.joinInstance' , "Join Terminals" )
626607 } ,
627608 when : TerminalContextKeys . tabsSingularSelection . toNegated ( ) ,
628- group : ContextMenuGroup . Config
609+ group : TerminalContextMenuGroup . Config
629610 }
630611 } ,
631612 {
@@ -636,7 +617,7 @@ export function setupTerminalMenus(): void {
636617 title : terminalStrings . unsplit . value
637618 } ,
638619 when : ContextKeyExpr . and ( TerminalContextKeys . tabsSingularSelection , TerminalContextKeys . splitTerminalTabFocused ) ,
639- group : ContextMenuGroup . Config
620+ group : TerminalContextMenuGroup . Config
640621 }
641622 } ,
642623 {
@@ -646,7 +627,7 @@ export function setupTerminalMenus(): void {
646627 id : TerminalCommandId . KillActiveTab ,
647628 title : terminalStrings . kill . value
648629 } ,
649- group : ContextMenuGroup . Kill ,
630+ group : TerminalContextMenuGroup . Kill ,
650631 }
651632 }
652633 ]
0 commit comments