fix: show full path in read/list tool permission dialogs#589
fix: show full path in read/list tool permission dialogs#589Githubguy132010 wants to merge 2 commits intoKilo-Org:devfrom
Conversation
Previously the read and list tool parts only showed the filename (e.g. 'text.txt') via getFilename(), making it impossible to tell where a file was located — especially for files outside the workspace. Now uses relativizeProjectPaths() to show the full path for external files while still showing relative paths for project files. Also updates getToolInfo() to show full paths in task child tool summaries. Closes Kilo-Org#585
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previous review's warning about Files Reviewed (1 file)
|
|
Hi! Thank you for taking the time to contribute to this project—we really appreciate it. 🙏 We are currently working on re-platforming the core of our VS Code and JetBrains extensions to be based on our new Kilo CLI, with a complete rebuild based on OpenCode as our new foundation, and the moment has come to promote this repository to become the main repository. To do that, we moved the code from this repository to the kilocode repository. This unfortunately means we cannot merge this branch here anymore. Please add https://github.com/Kilo-Org/kilocode.git as a remote, and push your branch there and create a new PR in https://github.com/Kilo-Org/kilocode . We unfortunately cannot do this for you as then the PR would not be in your name anymore. If you need any help, feel free to ask on our Discord in #kilo-dev-contributors Sorry for the inconvenience and thank you for contributing to Kilo! |
Context
Fixes Kilo-Org/kilocode#6092. After the streamlining of approval boxes into inline tool-part permission prompts, the read and list tools only showed the filename (e.g.
text.txt) instead of the full path. This made it impossible to tell where a file was located, especially for files outside the workspace.Implementation
Changed the
readandlisttool renderers inpackages/ui/src/components/message-part.tsxto userelativizeProjectPaths()instead ofgetFilename()for the subtitle:src/components/foo.tsx) since the project directory prefix is stripped/var/home/thomasbrugman/text.txt) since there's no project prefix to stripAlso updated
getToolInfo()(used in task child tool summaries) to show the full path instead of just the filename forreadandlistentries.The change is minimal — only the subtitle computation changes, keeping the clean single-line
{title, subtitle}trigger format.Screenshots
Before — only the filename is shown, no context about where the file lives:
After — the full path is shown for files outside the workspace:
How to Test
src/foo.tsnot the full absolute path)Get in Touch
thomas07374