Skip to content

Commit dcd38b6

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

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

package.nls.json

Lines changed: 1 addition & 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)'}",

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/extension/test/node/configurations.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ describe('Configurations', () => {
9595
// Validate advanced settings in code are in the advanced section of package.json
9696
advancedPublicKeys.forEach(key => {
9797
expect(key, 'Advanced settings must not start wih github.copilot.chat.advanced.').not.toMatch(/^github\.copilot\.chat\.advanced\./);
98+
if (key === ConfigKey.Advanced.DebugGitHubAuthFailWith.fullyQualifiedId) {
99+
// This setting should be internal, but can't be made TeamInternal because we lose the team and internal flags as part of its testing.
100+
return;
101+
}
98102
expect(advancedConfigurationsInPackageJson, `Advanced setting ${key} should be defined in the advanced section of package.json`).toContain(key);
99103
});
100104

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)