0

In my VSCode extension, I can send a message to Copilot Chat using:

prompt = "add feature"
await vscode.commands.executeCommand('workbench.action.chat.open', prompt);

However, I have no way to know whether the AI is currently generating its response or has finished. Browsing the VS Code source, it appears that the private field

https://github.com/microsoft/vscode/blob/94a250260181297ca183a963f3d059e380f2da26/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts#L113

_pendingRequests: DisposableMap<string, CancellableRequest>

tracks in-flight requests by sessionId, but:

  1. There is no public API to read _pendingRequests.
  2. I don't know how to obtain the correct sessionId key for my request.

I need to show in my extension when the AI is still generating its reply and when it has completed.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.