PowerShell / ProjectMercury

An interactive shell to work with AI-powered assistance providers
MIT License
43 stars 11 forks source link

Make the Aish module able to queue the "code post" action when PSReadLine is not yet ready (code is still executing in PowerShell) #119

Open daxian-dbw opened 4 months ago

daxian-dbw commented 4 months ago

Summary of the new feature / enhancement

Make the Aish module able to queue the "code post" action when PSReadLine is not yet ready (code is still executing in PowerShell), so that a user can run askai '/code post' to get the code posted to the PS session, without having to go the AISH side to run /code post. Today this doesn't work because when Aish module receives the code post request, the PS default session hasn't got back to the prompt yet.

Proposed technical implementation details (optional)

Use the OnIdel event to signal Aish module that PSReadLine is ready.