Hello team!
I've noticed a change in behavior since version 0.36.0 regarding how file paths are resolved for @ mentions when running gemini-cli inside the VSCode integrated terminal.
Before v0.36.0: When I launched gemini-cli (in VSCode) from a specific folder, for example my_project/src/component1/, any file I referenced with @ would use a path relative to that components directory. For instance, a file at my_project/src/component1/button.js could be referenced simply as @button.js. I found this quite logical, and easy to use.
From v0.36.0 onwards: The context for @ mentions seems to be the entire path. Using the same example, if my workspace root is my_project, the reference to the same file becomes @c:/Users/User/path_to_project/src/component1/button.js. In addition, it also shows files outside of the cwd, that are in the project. This becomes very inconventient if your project contains many folders that are called similarly, for example, if I also have a button in another component (e.g. c:/Users/User/path_to_project/src/component2/button.js)
Interestingly, if I run gemini-cli v0.36.0 in a standalone terminal, it still operates with the old, desired behavior. This leads me to believe the change is specific to the VSCode integration.
After looking through the changelog, I believe this change might have been introduced by the following pull request:
#21380: fix(cli): automatically add all VSCode workspace folders to Gemini context
While I understand the idea of making the context the entire workspace, it would be great to have control over this behavior. Would it be possible to introduce a setting (perhaps in settings.json) that allows users to choose the desired context for @ file mentions?
Alternatively, if there's an existing workflow to achieve the old behavior within VSCode that I'm not aware of, I would also be helped to get to know more about that instead!
Thanks in advance!
Hello team!
I've noticed a change in behavior since version 0.36.0 regarding how file paths are resolved for @ mentions when running gemini-cli inside the VSCode integrated terminal.
Before v0.36.0: When I launched gemini-cli (in VSCode) from a specific folder, for example my_project/src/component1/, any file I referenced with @ would use a path relative to that components directory. For instance, a file at my_project/src/component1/button.js could be referenced simply as @button.js. I found this quite logical, and easy to use.
From v0.36.0 onwards: The context for @ mentions seems to be the entire path. Using the same example, if my workspace root is my_project, the reference to the same file becomes @c:/Users/User/path_to_project/src/component1/button.js. In addition, it also shows files outside of the cwd, that are in the project. This becomes very inconventient if your project contains many folders that are called similarly, for example, if I also have a button in another component (e.g. c:/Users/User/path_to_project/src/component2/button.js)
Interestingly, if I run gemini-cli v0.36.0 in a standalone terminal, it still operates with the old, desired behavior. This leads me to believe the change is specific to the VSCode integration.
After looking through the changelog, I believe this change might have been introduced by the following pull request:
#21380: fix(cli): automatically add all VSCode workspace folders to Gemini context
While I understand the idea of making the context the entire workspace, it would be great to have control over this behavior. Would it be possible to introduce a setting (perhaps in settings.json) that allows users to choose the desired context for @ file mentions?
Alternatively, if there's an existing workflow to achieve the old behavior within VSCode that I'm not aware of, I would also be helped to get to know more about that instead!
Thanks in advance!