Skip to content

Comments

fix: show full path in read/list tool permission dialogs#589

Closed
Githubguy132010 wants to merge 2 commits intoKilo-Org:devfrom
Githubguy132010:fix/585-show-full-path-in-permission-dialog
Closed

fix: show full path in read/list tool permission dialogs#589
Githubguy132010 wants to merge 2 commits intoKilo-Org:devfrom
Githubguy132010:fix/585-show-full-path-in-permission-dialog

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Feb 22, 2026

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 read and list tool renderers in packages/ui/src/components/message-part.tsx to use relativizeProjectPaths() instead of getFilename() for the subtitle:

  • Project files show a relative path (e.g. src/components/foo.tsx) since the project directory prefix is stripped
  • External files show the full absolute path (e.g. /var/home/thomasbrugman/text.txt) since there's no project prefix to strip

Also updated getToolInfo() (used in task child tool summaries) to show the full path instead of just the filename for read and list entries.

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:

image

After — the full path is shown for files outside the workspace:

Schermafdruk van 2026-02-22 12-03-46

How to Test

  1. Start a session and ask the agent to read a file outside the workspace (e.g. a file in your home directory)
  2. When the permission dialog appears, verify the full path is shown in the tool part subtitle
  3. Also verify that files inside the project still show relative paths (e.g. src/foo.ts not the full absolute path)

Get in Touch

thomas07374

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
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 22, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The previous review's warning about getToolInfo returning raw paths has been addressed — the getToolInfo function was reverted to use getFilename(), and only the render functions for the "read" and "list" tools were updated to use relativizeProjectPaths(). This is a clean, minimal change that follows existing patterns in the codebase.

Files Reviewed (1 file)
  • packages/ui/src/components/message-part.tsx — subtitle computation for "read" and "list" tool renderers changed from getFilename()/getDirectory() to relativizeProjectPaths(), showing relative paths for project files and full paths for external files

@markijbema
Copy link
Contributor

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!

@markijbema markijbema closed this Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After streamline of approval boxes the full path is never shown

2 participants