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.
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 thecode 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.