codestoryai / aide

The open-source AI-native IDE
https://aide.dev
GNU Affero General Public License v3.0
472 stars 20 forks source link

If AI decides it wants to create a file, it gets a permission denied error #945

Open jamesjrg opened 5 days ago

jamesjrg commented 5 days ago

Before submitting your bug report

Environment

- OS: x64 Ubuntu
- Sidecar commit:
- IDE commit:

Description

image

Reproduction

No response

Log output

No response

sweat-tiger commented 4 days ago

when chat with ai ,if answer create file,the default path is '/' which is not write able on macos,so file unable create.default path should project active directory

theskcd commented 4 days ago

I believe what happened here is that the path which AI generated is not absolute, that's a prompting bug. Could you share your pwd with me, should be easy to replicate.

jamesjrg commented 4 days ago

It is reproducable in an empty directory as well, e.g. create a folder and prompt "Create a cheesemonger class", and the same thing will happen. Perhaps the names of all new files and folders that start with a "/" should automatically have a "." prepended.

E.g. if LLM says "/cheesemonger.py", it could be auto-translated to "./cheesemonger.py"