Skip to content

Commit 737466e

Browse files
committed
Fix for refresh button
1 parent c75b13b commit 737466e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/github/copilotPrWatcher.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ export class CopilotStateModel extends Disposable {
4141
this._onRefresh.fire();
4242
}
4343

44+
forceClear(): void {
45+
this._isInitialized = false;
46+
this._states.clear();
47+
this._showNotification.clear();
48+
this._onRefresh.fire();
49+
}
50+
4451
makeKey(owner: string, repo: string, prNumber?: number): string {
4552
if (prNumber === undefined) {
4653
return `${owner}/${repo}`;

src/github/copilotRemoteAgent.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,8 +1535,9 @@ export class CopilotRemoteAgentManager extends Disposable {
15351535
}
15361536
}
15371537

1538-
public refreshChatSessions(): void {
1539-
this._stateModel.clear();
1538+
public async refreshChatSessions(): Promise<void> {
1539+
this._stateModel.forceClear();
1540+
this._onDidChangeChatSessions.fire();
15401541
}
15411542

15421543
public async cancelMostRecentChatSession(pullRequest: PullRequestModel): Promise<void> {

0 commit comments

Comments
 (0)