Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/extension/chatSessions/vscode-node/chatSessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ export class ChatSessionsContrib extends Disposable implements IExtensionContrib
this.copilotCloudRegistrations.add(
vscode.chat.registerChatSessionItemProvider(CopilotCloudSessionsProvider.TYPE, cloudSessionsProvider)
);
const cloudChatParticipant = vscode.chat.createChatParticipant(CopilotCloudSessionsProvider.TYPE, cloudSessionsProvider.createHandler());
this.copilotCloudRegistrations.add(
vscode.chat.registerChatSessionContentProvider(
CopilotCloudSessionsProvider.TYPE,
cloudSessionsProvider,
cloudSessionsProvider.chatParticipant,
cloudChatParticipant,
{ supportsInterruptions: true }
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
private chatSessions: Map<number, PullRequestSearchItem> = new Map();
private chatSessionItemsPromise: Promise<vscode.ChatSessionItem[]> | undefined;
private sessionAgentMap: Map<Uri, string> = new Map();
public chatParticipant = vscode.chat.createChatParticipant(CopilotCloudSessionsProvider.TYPE, async (request, context, stream, token) =>
await this.chatParticipantImpl(request, context, stream, token)
);
private cachedSessionsSize: number = 0;

constructor(
Expand Down Expand Up @@ -98,6 +95,10 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
this._onDidChangeChatSessionItems.fire();
}

createHandler(): vscode.ChatExtendedRequestHandler {
return this.chatParticipantImpl.bind(this);
}

async provideChatSessionProviderOptions(token: vscode.CancellationToken): Promise<vscode.ChatSessionProviderOptions> {
const repoId = await getRepoId(this._gitService);
if (!repoId) {
Expand Down
Loading