File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/vs/workbench/contrib/terminal/browser Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class TerminalSpeechToTextSession extends Disposable {
33
33
return TerminalSpeechToTextSession . _instance ;
34
34
}
35
35
private _cancellationTokenSource : CancellationTokenSource | undefined ;
36
- private _disposables = new DisposableStore ( ) ;
36
+ private readonly _disposables : DisposableStore ;
37
37
constructor (
38
38
@ISpeechService private readonly _speechService : ISpeechService ,
39
39
@ITerminalService readonly _terminalService : ITerminalService ,
@@ -43,6 +43,7 @@ export class TerminalSpeechToTextSession extends Disposable {
43
43
super ( ) ;
44
44
this . _register ( this . _terminalService . onDidChangeActiveInstance ( ( ) => this . stop ( ) ) ) ;
45
45
this . _register ( this . _terminalService . onDidDisposeInstance ( ( ) => this . stop ( ) ) ) ;
46
+ this . _disposables = this . _register ( new DisposableStore ( ) ) ;
46
47
}
47
48
48
49
start ( ) : void {
@@ -55,7 +56,7 @@ export class TerminalSpeechToTextSession extends Disposable {
55
56
this . _terminalService . activeInstance ?. sendText ( this . _input , false ) ;
56
57
this . stop ( ) ;
57
58
} , voiceTimeout ) ) ;
58
- this . _cancellationTokenSource = new CancellationTokenSource ( ) ;
59
+ this . _cancellationTokenSource = this . _register ( new CancellationTokenSource ( ) ) ;
59
60
const session = this . _disposables . add ( this . _speechService . createSpeechToTextSession ( this . _cancellationTokenSource ! . token ) ) ;
60
61
61
62
this . _disposables . add ( session . onDidChange ( ( e ) => {
You can’t perform that action at this time.
0 commit comments