Skip to content

Commit cb39ae7

Browse files
committed
polish 3
1 parent bed6d74 commit cb39ae7

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/github/copilotRemoteAgent.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,22 +289,18 @@ export class CopilotRemoteAgentManager extends Disposable {
289289
this._register(this.repositoriesManager.onDidChangeFolderRepositories((event) => {
290290
if (event.added) {
291291
this._register(event.added.onDidChangeAssignableUsers(() => {
292-
this._isAssignable = undefined; // Invalidate cache
293292
this.updateAssignabilityContext();
294293
}));
295294
}
296-
this._isAssignable = undefined; // Invalidate cache
297295
this.updateAssignabilityContext();
298296
}));
299297
this.repositoriesManager.folderManagers.forEach(manager => {
300298
this._register(manager.onDidChangeAssignableUsers(() => {
301-
this._isAssignable = undefined; // Invalidate cache
302299
this.updateAssignabilityContext();
303300
}));
304301
});
305302
this._register(vscode.workspace.onDidChangeConfiguration((e) => {
306303
if (e.affectsConfiguration(CODING_AGENT)) {
307-
this._isAssignable = undefined; // Invalidate cache
308304
this.updateAssignabilityContext();
309305
}
310306
}));
@@ -411,6 +407,7 @@ export class CopilotRemoteAgentManager extends Disposable {
411407

412408
private async updateAssignabilityContext(): Promise<void> {
413409
try {
410+
this._isAssignable = undefined; // Invalidate cache
414411
const available = await this.isAvailable();
415412
commands.setContext('copilotCodingAgentAssignable', available);
416413
} catch (error) {

0 commit comments

Comments
 (0)