Skip to content

Commit 1a00f21

Browse files
authored
Contribution for chat session refresh (#7398)
1 parent 339c446 commit 1a00f21

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,12 @@
17101710
"command": "codingAgent.openSessionLog",
17111711
"title": "%command.codingAgent.openSessionLog.title%",
17121712
"category": "%command.pull.request.category%"
1713+
},
1714+
{
1715+
"command": "pr.refreshChatSessions",
1716+
"title": "%command.pr.refreshChatSessions.title%",
1717+
"icon": "$(refresh)",
1718+
"category": "%command.pull.request.category%"
17131719
}
17141720
],
17151721
"viewsWelcome": [
@@ -2599,6 +2605,11 @@
25992605
"command": "notifications.refresh",
26002606
"when": "gitHubOpenRepositoryCount != 0 && github:initialized && view == notifications:github",
26012607
"group": "navigation@1"
2608+
},
2609+
{
2610+
"command": "pr.refreshChatSessions",
2611+
"when": "view == workbench.view.chat.sessions.copilot-swe-agent",
2612+
"group": "navigation@1"
26022613
}
26032614
],
26042615
"view/item/context": [

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
"command.review.createSuggestionFromChange.title": "Convert to Pull Request Suggestion",
211211
"command.review.copyPrLink.title": "Copy Pull Request Link",
212212
"command.pr.refreshList.title": "Refresh Pull Requests List",
213+
"command.pr.refreshChatSessions.title": "Refresh Chat Sessions",
213214
"command.pr.setFileListLayoutAsTree.title": "View as Tree",
214215
"command.pr.setFileListLayoutAsFlat.title": "View as List",
215216
"command.pr.refreshChanges.title": "Refresh",

src/commands.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,4 +1849,10 @@ ${contents}
18491849
}
18501850
})
18511851
);
1852+
1853+
context.subscriptions.push(
1854+
vscode.commands.registerCommand('pr.refreshChatSessions', async () => {
1855+
copilotRemoteAgentManager.refreshChatSessions();
1856+
})
1857+
);
18521858
}

src/github/copilotRemoteAgent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,4 +771,8 @@ export class CopilotRemoteAgentManager extends Disposable {
771771
return new ThemeIcon('circle-filled', new vscode.ThemeColor('list.warningForeground'));
772772
}
773773
}
774+
775+
public refreshChatSessions(): void {
776+
this._onDidChangeChatSessions.fire();
777+
}
774778
}

0 commit comments

Comments
 (0)