@@ -25,7 +25,7 @@ import { ILabelService } from '../../../../platform/label/common/label.js';
25
25
import { IListService } from '../../../../platform/list/browser/listService.js' ;
26
26
import { INotificationService , Severity } from '../../../../platform/notification/common/notification.js' ;
27
27
import { IOpenerService } from '../../../../platform/opener/common/opener.js' ;
28
- import { IPickOptions , IQuickInputService , IQuickPickItem } from '../../../../platform/quickinput/common/quickInput.js' ;
28
+ import { IPickOptions , IQuickInputService , IQuickPickItem , IQuickPickSeparator , QuickPickItem } from '../../../../platform/quickinput/common/quickInput.js' ;
29
29
import { ITerminalProfile , TerminalExitReason , TerminalIcon , TerminalLocation , TerminalSettingId } from '../../../../platform/terminal/common/terminal.js' ;
30
30
import { IWorkspaceContextService , IWorkspaceFolder } from '../../../../platform/workspace/common/workspace.js' ;
31
31
import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from '../../../browser/actions/workspaceCommands.js' ;
@@ -148,7 +148,7 @@ export const terminalSendSignalCommand = async (accessor: ServicesAccessor, args
148
148
if ( ! signal ) {
149
149
const quickInputService = accessor . get ( IQuickInputService ) ;
150
150
151
- const signalOptions : IQuickPickItem [ ] = [
151
+ const signalOptions : QuickPickItem [ ] = [
152
152
{ label : 'SIGINT' , description : 'Interrupt process (Ctrl+C)' } ,
153
153
{ label : 'SIGTERM' , description : 'Terminate process gracefully' } ,
154
154
{ label : 'SIGKILL' , description : 'Force kill process' } ,
@@ -157,7 +157,9 @@ export const terminalSendSignalCommand = async (accessor: ServicesAccessor, args
157
157
{ label : 'SIGHUP' , description : 'Hangup' } ,
158
158
{ label : 'SIGQUIT' , description : 'Quit process' } ,
159
159
{ label : 'SIGUSR1' , description : 'User-defined signal 1' } ,
160
- { label : 'SIGUSR2' , description : 'User-defined signal 2' }
160
+ { label : 'SIGUSR2' , description : 'User-defined signal 2' } ,
161
+ { type : 'separator' } ,
162
+ { label : localize ( 'manualSignal' , 'Manually enter signal' ) , description : 'Enter custom signal name' }
161
163
] ;
162
164
163
165
const selected = await quickInputService . pick ( signalOptions , {
@@ -168,7 +170,20 @@ export const terminalSendSignalCommand = async (accessor: ServicesAccessor, args
168
170
return ;
169
171
}
170
172
171
- signal = selected . label ;
173
+ if ( selected . label === localize ( 'manualSignal' , 'Manually enter signal' ) ) {
174
+ const inputSignal = await quickInputService . input ( {
175
+ prompt : localize ( 'enterSignal' , 'Enter signal name (e.g., SIGTERM, SIGKILL)' ) ,
176
+ placeHolder : 'SIGTERM'
177
+ } ) ;
178
+
179
+ if ( ! inputSignal ) {
180
+ return ;
181
+ }
182
+
183
+ signal = inputSignal ;
184
+ } else {
185
+ signal = selected . label ;
186
+ }
172
187
}
173
188
174
189
instance . sendSignal ( signal ) ;
0 commit comments