We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93989c7 commit cc20843Copy full SHA for cc20843
1 file changed
src/github/copilotRemoteAgent/chatSessionContentBuilder.ts
@@ -30,9 +30,13 @@ export class ChatSessionContentBuilder {
30
capi: CopilotApi,
31
timelineEventsPromise: Promise<TimelineEvent[]>
32
): Promise<Array<vscode.ChatRequestTurn | vscode.ChatResponseTurn2>> {
33
- const sortedSessions = sessions.slice().sort((a, b) =>
34
- new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
35
- );
+ const sortedSessions = sessions
+ .filter((session, index, array) =>
+ array.findIndex(s => s.id === session.id) === index
36
+ )
37
+ .slice().sort((a, b) =>
38
+ new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
39
+ );
40
41
// Process all sessions concurrently while maintaining order
42
const sessionResults = await Promise.all(
0 commit comments