Open MattFlower opened 9 months ago
I have some preliminary code that will fix with cmd.exe. I'll try to get this out tomorrow.
Update: I was able to get aider to execute in windows. Unfortunately, there appears to be a problem -- when I attempt to send "/add
This only appears with aider -- sending commands to cmd.exe, wsl.exe, or powershell.exe all seemed to work fine. If been looking at the aider source code and io.py, but I have quite figured out what's wrong.
TL;DR: Windows is still busted. Sorry about that.
does it mean that the plugin isn't working on Windows at the moment? I mean, I can't even see the icon on the left panel where is other plugins. No errors either, just won't open.
any update?
@MattFlower Hey there, I think I've figured out the root of the problem. On Windows, the prompt toolkit used by aider is mistakenly treating command text along with the '\r' character as a 'paste action'. This is why it's not working like when you manually press Enter in the terminal. Here's a somewhat unrelated but potentially useful link: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/548
Because of a flaw in aider's code, it's not straightforward to fix this directly. One workaround is to send the command and the Enter key separately to the terminal within your plugin:
step1. Send: /add xxx step2. Wait for 50ms or more step3. Send: \r"
Currently, the plugin doesn't work with windows.