aiconfig
aiconfig copied to clipboard
[vscode][editor] Update Editor for In-Progress Execution while Editor is Not Rendered
Currently in the VS Code extension, toggling away from the editor while a prompt is running and then toggling back before it has completed will result in the UI showing no prompts as running and not updating with the prompt outputs as it streams or when it completes (note, reloading after completion will show the latest updates due to /load of updated config).
This is because our only connection with the prompt stream/response on the editor is the callbacks for the run request. We can improve this so that toggling back shows the prompt in progress (and potentially the current outputs) by:
- updating the editor server implementation to keep track of the running prompts (by name)
- adding an endpoint, e.g. /running_prompts to the server to return this information to the requestor
- updated editor client to leverage the endpoint to initialize the state with running prompt state