@@ -18,7 +18,7 @@ export interface IExtHostTerminalShellIntegration extends ExtHostTerminalShellIn
18
18
readonly _serviceBrand : undefined ;
19
19
20
20
readonly onDidChangeTerminalShellIntegration : Event < vscode . TerminalShellIntegrationChangeEvent > ;
21
- readonly onDidStartTerminalShellExecution : Event < vscode . TerminalShellExecution > ;
21
+ readonly onDidStartTerminalShellExecution : Event < vscode . TerminalShellExecutionStartEvent > ;
22
22
readonly onDidEndTerminalShellExecution : Event < vscode . TerminalShellExecutionEndEvent > ;
23
23
}
24
24
export const IExtHostTerminalShellIntegration = createDecorator < IExtHostTerminalShellIntegration > ( 'IExtHostTerminalShellIntegration' ) ;
@@ -33,7 +33,7 @@ export class ExtHostTerminalShellIntegration extends Disposable implements IExtH
33
33
34
34
protected readonly _onDidChangeTerminalShellIntegration = new Emitter < vscode . TerminalShellIntegrationChangeEvent > ( ) ;
35
35
readonly onDidChangeTerminalShellIntegration = this . _onDidChangeTerminalShellIntegration . event ;
36
- protected readonly _onDidStartTerminalShellExecution = new Emitter < vscode . TerminalShellExecution > ( ) ;
36
+ protected readonly _onDidStartTerminalShellExecution = new Emitter < vscode . TerminalShellExecutionStartEvent > ( ) ;
37
37
readonly onDidStartTerminalShellExecution = this . _onDidStartTerminalShellExecution . event ;
38
38
protected readonly _onDidEndTerminalShellExecution = new Emitter < vscode . TerminalShellExecutionEndEvent > ( ) ;
39
39
readonly onDidEndTerminalShellExecution = this . _onDidEndTerminalShellExecution . event ;
@@ -162,7 +162,7 @@ class InternalTerminalShellIntegration extends Disposable {
162
162
163
163
constructor (
164
164
private readonly _terminal : vscode . Terminal ,
165
- private readonly _onDidStartTerminalShellExecution : Emitter < vscode . TerminalShellExecution >
165
+ private readonly _onDidStartTerminalShellExecution : Emitter < vscode . TerminalShellExecutionStartEvent >
166
166
) {
167
167
super ( ) ;
168
168
@@ -200,13 +200,13 @@ class InternalTerminalShellIntegration extends Disposable {
200
200
} else {
201
201
if ( this . _currentExecution ) {
202
202
this . _currentExecution . endExecution ( undefined ) ;
203
- this . _onDidRequestEndExecution . fire ( { execution : this . _currentExecution . value , exitCode : undefined } ) ;
203
+ this . _onDidRequestEndExecution . fire ( { terminal : this . _terminal , shellIntegration : this . value , execution : this . _currentExecution . value , exitCode : undefined } ) ;
204
204
}
205
- const currentExecution = this . _currentExecution = new InternalTerminalShellExecution ( this . _terminal , commandLine , cwd ) ;
205
+ const currentExecution = this . _currentExecution = new InternalTerminalShellExecution ( commandLine , cwd ) ;
206
206
if ( fireEventInMicrotask ) {
207
- queueMicrotask ( ( ) => this . _onDidStartTerminalShellExecution . fire ( currentExecution . value ) ) ;
207
+ queueMicrotask ( ( ) => this . _onDidStartTerminalShellExecution . fire ( { terminal : this . _terminal , shellIntegration : this . value , execution : currentExecution . value } ) ) ;
208
208
} else {
209
- this . _onDidStartTerminalShellExecution . fire ( this . _currentExecution . value ) ;
209
+ this . _onDidStartTerminalShellExecution . fire ( { terminal : this . _terminal , shellIntegration : this . value , execution : this . _currentExecution . value } ) ;
210
210
}
211
211
}
212
212
return this . _currentExecution ;
@@ -219,7 +219,7 @@ class InternalTerminalShellIntegration extends Disposable {
219
219
endShellExecution ( commandLine : vscode . TerminalShellExecutionCommandLine | undefined , exitCode : number | undefined ) : void {
220
220
if ( this . _currentExecution ) {
221
221
this . _currentExecution . endExecution ( commandLine ) ;
222
- this . _onDidRequestEndExecution . fire ( { execution : this . _currentExecution . value , exitCode } ) ;
222
+ this . _onDidRequestEndExecution . fire ( { terminal : this . _terminal , shellIntegration : this . value , execution : this . _currentExecution . value , exitCode } ) ;
223
223
this . _currentExecution = undefined ;
224
224
}
225
225
}
@@ -246,15 +246,11 @@ class InternalTerminalShellExecution {
246
246
readonly value : vscode . TerminalShellExecution ;
247
247
248
248
constructor (
249
- readonly terminal : vscode . Terminal ,
250
249
private _commandLine : vscode . TerminalShellExecutionCommandLine ,
251
250
readonly cwd : URI | undefined ,
252
251
) {
253
252
const that = this ;
254
253
this . value = {
255
- get terminal ( ) : vscode . Terminal {
256
- return that . terminal ;
257
- } ,
258
254
get commandLine ( ) : vscode . TerminalShellExecutionCommandLine {
259
255
return that . _commandLine ;
260
256
} ,
0 commit comments