|
6 | 6 | import { Raw } from '@vscode/prompt-tsx'; |
7 | 7 | import * as vscode from 'vscode'; |
8 | 8 | import { ChatFetchResponseType } from '../../../platform/chat/common/commonTypes'; |
| 9 | +import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService'; |
9 | 10 | import { ILogService } from '../../../platform/log/common/logService'; |
10 | 11 | import { messageToMarkdown } from '../../../platform/log/common/messageStringify'; |
11 | 12 | import { isOpenAiFunctionTool } from '../../../platform/networking/common/fetch'; |
12 | 13 | import { IRequestLogger, LoggedInfoKind, LoggedRequestKind, type LoggedRequest } from '../../../platform/requestLogger/node/requestLogger'; |
| 14 | +import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService'; |
13 | 15 | import { ITrajectoryLogger, ITrajectoryStep } from '../../../platform/trajectory/common/trajectoryLogger'; |
14 | 16 | import { Disposable } from '../../../util/vs/base/common/lifecycle'; |
15 | 17 | import { generateUuid } from '../../../util/vs/base/common/uuid'; |
@@ -570,9 +572,15 @@ export class ChatDebugLogProviderContribution extends Disposable implements IExt |
570 | 572 | @IAgentDebugEventService private readonly _debugEventService: IAgentDebugEventService, |
571 | 573 | @ILogService private readonly _logService: ILogService, |
572 | 574 | @IRequestLogger private readonly _requestLogger: IRequestLogger, |
| 575 | + @IConfigurationService private readonly _configurationService: IConfigurationService, |
| 576 | + @IExperimentationService private readonly _experimentationService: IExperimentationService, |
573 | 577 | ) { |
574 | 578 | super(); |
575 | 579 |
|
| 580 | + if (!this._configurationService.getExperimentBasedConfig(ConfigKey.AgentDebugLogEnabled, this._experimentationService)) { |
| 581 | + return; |
| 582 | + } |
| 583 | + |
576 | 584 | if (typeof vscode.chat?.registerChatDebugLogProvider !== 'function') { |
577 | 585 | this._logService.info('[ChatDebugLogProvider] Chat debug API not available, skipping registration'); |
578 | 586 | return; |
|
0 commit comments