zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.82k stars 2.67k forks source link

AI Assistant: /files missing from system prompt library #15540

Open kamilelukosiute opened 1 month ago

kamilelukosiute commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

In the assistant panel, I can call /file path/to/file.txt to attach a file, but when doing the same in a prompt in the prompt library, the file disappears. Both relative and absolute paths do not work. The /file command auto-completes in the prompt library prompts, but the drop down menu of available files does not appear.

I wasn't able to find much documentation about this feature, so it's totally possible that I'm just using it wrong :')

image

(Can confirm that these files exist when attaching in the assistant panel directly.)

Environment

Zed: v0.145.1 (Zed) OS: macOS 14.4.0 Memory: 18 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


notpeter commented 1 month ago

I think I can reproduce this. For me /file works as expected for files that are within my current Zed project workspace directory, but if I try to provide a file outside the workspace (e.g. absolute path to elsewhere) it disappears when I press enter.

Is this the behavior you are observing?

kamilelukosiute commented 1 month ago

Within the prompts library, also files within my current Zed project workspace do not appear for me.

Within the assistant pane, absolute paths also disappear, yes, but I'm less concerned about that I suppose. The flaky drop down selection menu of files implies that only files in the current project are valid.