Skip to content

Commit f5c7178

Browse files
committed
Polish and fix test failure
1 parent 721a5af commit f5c7178

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4024,6 +4024,27 @@
40244024
"experimental"
40254025
]
40264026
},
4027+
"github.copilot.chat.debug.gitHubAuthFailWith": {
4028+
"type": [
4029+
"string",
4030+
"null"
4031+
],
4032+
"enum": [
4033+
null,
4034+
"NotAuthorized",
4035+
"RequestFailed",
4036+
"ParseFailed",
4037+
"HTTP401",
4038+
"RateLimited",
4039+
"GitHubLoginFailed"
4040+
],
4041+
"default": null,
4042+
"markdownDescription": "%github.copilot.config.debug.gitHubAuthFailWith%",
4043+
"tags": [
4044+
"advanced",
4045+
"experimental"
4046+
]
4047+
},
40274048
"github.copilot.chat.inlineEdits.diagnosticsContextProvider.enabled": {
40284049
"type": "boolean",
40294050
"default": false,

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
]
4646
},
4747
"github.copilot.viewsWelcome.invalidToken": {
48-
"message": "Your GitHub token is invalid. Please sign out from your GitHub account and sign in again.\n\n[Sign In](command:workbench.action.chat.triggerSetupForceSignIn)\n\nSee also [Copilot log](command:github.copilot.debug.showOutputChannel.internal) and [run diagnostics](command:github.copilot.debug.collectDiagnostics.internal).",
48+
"message": "Your GitHub token is invalid. Please sign in again to refresh your authentication.\n\n[Sign In](command:workbench.action.chat.triggerSetupForceSignIn)\n\nSee also [Copilot log](command:github.copilot.debug.showOutputChannel.internal) and [run diagnostics](command:github.copilot.debug.collectDiagnostics.internal).",
4949
"comment": [
5050
"{Locked='['}",
5151
"{Locked='](command:workbench.action.chat.triggerSetupForceSignIn)'}",
@@ -371,6 +371,7 @@
371371
"github.copilot.config.editRecording.enabled": "Enable edit recording for analysis.",
372372
"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.",
373373
"github.copilot.config.debug.requestLogger.maxEntries": "Maximum number of entries to keep in the request logger for debugging purposes.",
374+
"github.copilot.config.debug.gitHubAuthFailWith": "Simulate a specific GitHub authentication failure for testing purposes.",
374375
"github.copilot.config.inlineEdits.diagnosticsContextProvider.enabled": "Enable diagnostics context provider for next edit suggestions.",
375376
"github.copilot.config.inlineEdits.chatSessionContextProvider.enabled": "Enable chat session context provider for next edit suggestions.",
376377
"github.copilot.config.codesearch.agent.enabled": "Enable code search capabilities in agent mode.",

src/extension/contextKeys/vscode-node/contextKeys.contribution.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class ContextKeysContribution extends Disposable {
4646
private _needsOfflineCheck = false;
4747
private _scheduledOfflineCheck: TimeoutHandle | undefined;
4848
private _showLogView = false;
49+
private _lastContextKey: string | undefined;
4950

5051
constructor(
5152
@IAuthenticationService private readonly _authenticationService: IAuthenticationService,
@@ -157,7 +158,10 @@ export class ContextKeysContribution extends Disposable {
157158
}
158159

159160
if (key) {
160-
this._logService.info(`[context keys] Setting context key: ${key}`);
161+
if (key !== this._lastContextKey) {
162+
this._logService.info(`[context keys] Setting context key: ${key}`);
163+
this._lastContextKey = key;
164+
}
161165
commands.executeCommand('setContext', key, true);
162166
}
163167

src/platform/configuration/common/configurationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,8 @@ export namespace ConfigKey {
719719

720720
/** Enable the built-in agent customization skill provider */
721721
export const AgentCustomizationSkillEnabled = defineSetting<boolean>('chat.agentCustomizationSkill.enabled', ConfigType.ExperimentBased, false);
722-
/** Simulate GitHub authentication failures for testing. Can't be TeamInternal because we loose these flags as part of testing. */
723-
export const DebugGitHubAuthFailWith = defineSetting<'NotAuthorized' | 'RequestFailed' | 'ParseFailed' | 'HTTP401' | 'RateLimited' | 'GitHubLoginFailed' | null>('chat.advanced.debug.gitHubAuthFailWith', ConfigType.Simple, null);
722+
/** Simulate GitHub authentication failures for testing. Can't be TeamInternal because we lose these flags as part of testing. */
723+
export const DebugGitHubAuthFailWith = defineSetting<'NotAuthorized' | 'RequestFailed' | 'ParseFailed' | 'HTTP401' | 'RateLimited' | 'GitHubLoginFailed' | null>('chat.debug.githubAuthFailWith', ConfigType.Simple, null);
724724
}
725725

726726
/**

0 commit comments

Comments
 (0)