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
_pendingRequests: DisposableMap<string, CancellableRequest>
tracks in-flight requests by sessionId, but:
- There is no public API to read _pendingRequests.
- 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.