Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit f728c43

Browse files
pwang347Copilot
andauthored
Improve initial experience for /troubleshoot (#4405)
* feature flag * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix * update * update * comment * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove unused * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d605d81 commit f728c43

5 files changed

Lines changed: 21 additions & 39 deletions

File tree

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,15 +3216,6 @@
32163216
"preview",
32173217
"onExp"
32183218
]
3219-
},
3220-
"github.copilot.agentDebugLog.enabled": {
3221-
"type": "boolean",
3222-
"default": false,
3223-
"markdownDescription": "%github.copilot.config.agentDebugLog.enabled%",
3224-
"tags": [
3225-
"preview",
3226-
"onExp"
3227-
]
32283219
}
32293220
}
32303221
},
@@ -4534,10 +4525,19 @@
45344525
"onExp"
45354526
]
45364527
},
4528+
"github.copilot.chat.agentDebugLog.enabled": {
4529+
"type": "boolean",
4530+
"default": false,
4531+
"markdownDescription": "%github.copilot.config.chat.agentDebugLog.enabled%",
4532+
"tags": [
4533+
"advanced",
4534+
"experimental"
4535+
]
4536+
},
45374537
"github.copilot.chat.agentDebugLog.fileLogging.enabled": {
45384538
"type": "boolean",
45394539
"default": false,
4540-
"markdownDescription": "%github.copilot.config.agentDebugLog.fileLogging.enabled%",
4540+
"markdownDescription": "%github.copilot.config.chat.agentDebugLog.fileLogging.enabled%",
45414541
"tags": [
45424542
"advanced",
45434543
"experimental",
@@ -4548,7 +4548,7 @@
45484548
"type": "number",
45494549
"default": 4000,
45504550
"minimum": 2000,
4551-
"markdownDescription": "%github.copilot.config.agentDebugLog.fileLogging.flushIntervalMs%",
4551+
"markdownDescription": "%github.copilot.config.chat.agentDebugLog.fileLogging.flushIntervalMs%",
45524552
"tags": [
45534553
"advanced",
45544554
"experimental"

package.nls.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,11 @@
371371
"github.copilot.config.notebook.alternativeNESFormat.enabled": "Enable alternative format for Next Edit Suggestions in notebooks.",
372372
"github.copilot.config.localWorkspaceRecording.enabled": "Enable local workspace recording for analysis.",
373373
"github.copilot.config.editRecording.enabled": "Enable edit recording for analysis.",
374-
"github.copilot.config.inlineChat.selectionRatioThreshold": "Threshold at which to switch editing strategies for inline chat. When a selection porition of code matches a parse tree node, only that is presented to the language model. This speeds up response times but might have lower quality results. Requires having a parse tree for the document and the `inlineChat.enableV2` setting. Values must be between 0 and 1, where 0 means off and 1 means the selection perfectly matches a parse tree node.",
374+
"github.copilot.config.inlineChat.selectionRatioThreshold": "Threshold at which to switch editing strategies for inline chat. When a selection portion of code matches a parse tree node, only that is presented to the language model. This speeds up response times but might have lower quality results. Requires having a parse tree for the document and the `inlineChat.enableV2` setting. Values must be between 0 and 1, where 0 means off and 1 means the selection perfectly matches a parse tree node.",
375375
"github.copilot.config.debug.requestLogger.maxEntries": "Maximum number of entries to keep in the request logger for debugging purposes.",
376-
"github.copilot.config.agentDebugLog.fileLogging.enabled": "Enable writing chat debug events to JSONL files on disk for diagnostics. When disabled, the built-in `troubleshoot` skill is also disabled. Requires VS Code reload.",
377-
"github.copilot.config.agentDebugLog.fileLogging.flushIntervalMs": "How often (in milliseconds) buffered debug log entries are flushed to disk. Lower values provide more up-to-date logs at the cost of more frequent disk writes.",
376+
"github.copilot.config.chat.agentDebugLog.enabled": "When enabled, collect agent request information (tool calls, LLM requests, token usage, and errors) for viewing and troubleshooting in VS Code. Requires window reload to take effect.",
377+
"github.copilot.config.chat.agentDebugLog.fileLogging.enabled": "Enable writing chat debug events to JSONL files on disk for diagnostics. When disabled, the built-in `troubleshoot` skill is also disabled. Requires window reload to take effect.",
378+
"github.copilot.config.chat.agentDebugLog.fileLogging.flushIntervalMs": "How often (in milliseconds) buffered debug log entries are flushed to disk. Lower values provide more up-to-date logs at the cost of more frequent disk writes.",
378379
"github.copilot.config.inlineEdits.diagnosticsContextProvider.enabled": "Enable diagnostics context provider for next edit suggestions.",
379380
"github.copilot.config.inlineEdits.chatSessionContextProvider.enabled": "Enable chat session context provider for next edit suggestions.",
380381
"github.copilot.config.codesearch.agent.enabled": "Enable code search capabilities in agent mode.",
@@ -386,7 +387,6 @@
386387
"github.copilot.config.instantApply.shortContextLimit": "Token limit for short context instant apply.",
387388
"github.copilot.config.summarizeAgentConversationHistoryThreshold": "Threshold for compacting agent conversation history.",
388389
"github.copilot.config.agentHistorySummarizationMode": "Mode for agent history summarization.",
389-
"github.copilot.config.agentDebugLog.enabled": "When enabled, collect agent request information (tool calls, LLM requests, token usage, and errors) for viewing and troubleshooting in VS Code. Requires window reload to take effect.",
390390
"github.copilot.config.backgroundCompaction": "Enable background compaction of conversation history.",
391391
"github.copilot.config.agentHistorySummarizationWithPromptCache": "Use prompt caching for agent history summarization.",
392392
"github.copilot.config.agentHistorySummarizationForceGpt41": "Force GPT-4.1 for agent history summarization.",

src/extension/agents/vscode-node/promptFileContrib.ts

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

66
import * as vscode from 'vscode';
77
import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService';
8-
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
98
import { Disposable, MutableDisposable } from '../../../util/vs/base/common/lifecycle';
109
import { SyncDescriptor } from '../../../util/vs/platform/instantiation/common/descriptors';
1110
import { IInstantiationService } from '../../../util/vs/platform/instantiation/common/instantiation';
@@ -25,7 +24,6 @@ export class PromptFileContribution extends Disposable implements IExtensionCont
2524
constructor(
2625
@IInstantiationService instantiationService: IInstantiationService,
2726
@IConfigurationService configurationService: IConfigurationService,
28-
@IExperimentationService experimentationService: IExperimentationService,
2927
) {
3028
super();
3129

@@ -84,25 +82,9 @@ export class PromptFileContribution extends Disposable implements IExtensionCont
8482
const agentCustomizationSkillProvider: vscode.ChatSkillProvider = instantiationService.createInstance(new SyncDescriptor(AgentCustomizationSkillProvider));
8583
this._register(vscode.chat.registerSkillProvider(agentCustomizationSkillProvider));
8684

87-
const troubleshootSkillRegistration = this._register(new MutableDisposable<vscode.Disposable>());
88-
const updateTroubleshootSkill = () => {
89-
const enabled = configurationService.getExperimentBasedConfig(ConfigKey.Advanced.ChatDebugFileLogging, experimentationService);
90-
if (enabled) {
91-
if (!troubleshootSkillRegistration.value) {
92-
const troubleshootSkillProvider: vscode.ChatSkillProvider = instantiationService.createInstance(new SyncDescriptor(TroubleshootSkillProvider));
93-
troubleshootSkillRegistration.value = vscode.chat.registerSkillProvider(troubleshootSkillProvider);
94-
}
95-
} else {
96-
troubleshootSkillRegistration.clear();
97-
}
98-
};
99-
100-
updateTroubleshootSkill();
101-
this._register(configurationService.onDidChangeConfiguration(e => {
102-
if (e.affectsConfiguration(ConfigKey.Advanced.ChatDebugFileLogging.fullyQualifiedId)) {
103-
updateTroubleshootSkill();
104-
}
105-
}));
85+
// Enablement is controlled in core
86+
const troubleshootSkillProvider: vscode.ChatSkillProvider = instantiationService.createInstance(new SyncDescriptor(TroubleshootSkillProvider));
87+
this._register(vscode.chat.registerSkillProvider(troubleshootSkillProvider));
10688
}
10789
}
10890
}

src/extension/trajectory/vscode-node/otelChatDebugLogProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class OTelChatDebugLogProviderContribution extends Disposable implements
137137
) {
138138
super();
139139

140-
if (!this._configurationService.getExperimentBasedConfig(ConfigKey.AgentDebugLogEnabled, this._experimentationService)) {
140+
if (!this._configurationService.getExperimentBasedConfig(ConfigKey.Advanced.AgentDebugLogEnabled, this._experimentationService)) {
141141
return;
142142
}
143143

src/platform/configuration/common/configurationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ export namespace ConfigKey {
679679
/** Simulate GitHub authentication failures for testing. Can't be TeamInternal because we lose these flags as part of testing. */
680680
export const DebugGitHubAuthFailWith = defineSetting<'NotAuthorized' | 'RequestFailed' | 'ParseFailed' | 'HTTP401' | 'RateLimited' | 'GitHubLoginFailed' | null>('chat.debug.githubAuthFailWith', ConfigType.Simple, null);
681681

682-
// Chat debug file logging settings
682+
// Agent debug logging settings
683+
export const AgentDebugLogEnabled = defineAndMigrateExpSetting<boolean>('agentDebugLog.enabled', 'chat.agentDebugLog.enabled', false);
683684
export const ChatDebugFileLogging = defineAndMigrateExpSetting<boolean>('chat.chatDebug.fileLogging.enabled', 'chat.agentDebugLog.fileLogging.enabled', false);
684685
export const ChatDebugFileLoggingFlushInterval = defineAndMigrateSetting<number>('chat.chatDebug.fileLogging.flushIntervalMs', 'chat.agentDebugLog.fileLogging.flushIntervalMs', 4000);
685686

@@ -919,7 +920,6 @@ export namespace ConfigKey {
919920
export const AutomaticRenameSuggestions = defineSetting('renameSuggestions.triggerAutomatically', ConfigType.Simple, true);
920921
export const TerminalToDebuggerEnabled = defineSetting('chat.copilotDebugCommand.enabled', ConfigType.Simple, true);
921922
export const CodeSearchAgentEnabled = defineSetting<boolean>('chat.codesearch.enabled', ConfigType.Simple, false);
922-
export const AgentDebugLogEnabled = defineSetting<boolean>('agentDebugLog.enabled', ConfigType.ExperimentBased, false);
923923
export const ClaudeAgentEnabled = defineSetting<boolean>('chat.claudeAgent.enabled', ConfigType.Simple, true);
924924
export const ClaudeAgentAllowDangerouslySkipPermissions = defineSetting<boolean>('chat.claudeAgent.allowDangerouslySkipPermissions', ConfigType.Simple, false);
925925
export const InlineEditsEnabled = defineSetting<boolean>('nextEditSuggestions.enabled', ConfigType.ExperimentBased, true);

0 commit comments

Comments
 (0)