@@ -144,3 +144,38 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
144
144
});
145
145
}
146
146
147
+ Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
148
+ ===================================================================
149
+ --- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
150
+ +++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
151
+ @@ -67,21 +67,19 @@ export class TelemetryService extends Di
152
+ productService: IProductService,
153
+ remoteAgentService: IRemoteAgentService
154
+ ) {
155
+ - const telemetrySupported = supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey;
156
+ + const telemetrySupported = supportsTelemetry(productService, environmentService);
157
+ if (telemetrySupported && getTelemetryLevel(configurationService) !== TelemetryLevel.NONE && this.impl === NullTelemetryService) {
158
+ // If remote server is present send telemetry through that, else use the client side appender
159
+ const appenders: ITelemetryAppender[] = [];
160
+ const isInternal = isInternalTelemetry(productService, configurationService);
161
+ - if (!isLoggingOnly(productService, environmentService)) {
162
+ - if (remoteAgentService.getConnection() !== null) {
163
+ - const remoteTelemetryProvider = {
164
+ - log: remoteAgentService.logTelemetry.bind(remoteAgentService),
165
+ - flush: remoteAgentService.flushTelemetry.bind(remoteAgentService)
166
+ - };
167
+ - appenders.push(remoteTelemetryProvider);
168
+ - } else {
169
+ - appenders.push(new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey));
170
+ - }
171
+ + if (remoteAgentService.getConnection() !== null) {
172
+ + const remoteTelemetryProvider = {
173
+ + log: remoteAgentService.logTelemetry.bind(remoteAgentService),
174
+ + flush: remoteAgentService.flushTelemetry.bind(remoteAgentService)
175
+ + };
176
+ + appenders.push(remoteTelemetryProvider);
177
+ + } else if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
178
+ + appenders.push(new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey));
179
+ }
180
+ appenders.push(new TelemetryLogAppender(logService, loggerService, environmentService, productService));
181
+ const config: ITelemetryServiceConfig = {
0 commit comments