Skip to content

Commit d8b76b5

Browse files
committed
Only send data on insiders
1 parent 45d2bb4 commit d8b76b5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { Event } from 'vs/base/common/event';
77
import { Disposable } from 'vs/base/common/lifecycle';
8+
import { IProductService } from 'vs/platform/product/common/productService';
89
import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities';
910
import { ExtHostContext, MainContext, type ExtHostTerminalShellIntegrationShape, type MainThreadTerminalShellIntegrationShape } from 'vs/workbench/api/common/extHost.protocol';
1011
import { ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal';
@@ -16,7 +17,8 @@ export class MainThreadTerminalShellIntegration extends Disposable implements Ma
1617

1718
constructor(
1819
extHostContext: IExtHostContext,
19-
@ITerminalService private readonly _terminalService: ITerminalService
20+
@ITerminalService private readonly _terminalService: ITerminalService,
21+
@IProductService productService: IProductService
2022
) {
2123
super();
2224

@@ -47,10 +49,13 @@ export class MainThreadTerminalShellIntegration extends Disposable implements Ma
4749
// Clean up after dispose
4850
this._store.add(this._terminalService.onDidDisposeInstance(e => this._proxy.$closeTerminal(e.instanceId)));
4951

50-
// TODO: Only do this if there is a consumer
51-
// TODO: This needs to go via the server on remote for performance reasons
52-
// TerminalShellExecution.dataStream
53-
this._store.add(this._terminalService.onAnyInstanceData(e => this._proxy.$shellExecutionData(e.instance.instanceId, e.data)));
52+
// TerminalShellExecution.createDataStream
53+
// HACK: While proposed, this will only work in Insiders so as to not hurt performance in
54+
// stable
55+
if (productService.quality === 'insiders') {
56+
// TODO: This should to go via the server on remote
57+
this._store.add(this._terminalService.onAnyInstanceData(e => this._proxy.$shellExecutionData(e.instance.instanceId, e.data)));
58+
}
5459
}
5560

5661
$executeCommand(terminalId: number, commandLine: string): void {

0 commit comments

Comments
 (0)