Reading a file with the @files
tool
#466
-
I want to give the llm the directory tree, so it can choose what files it needs for context. But I cannot get the For example: ## Me
> Sharing:
> - FILES tool
test the @files tool by reading a file of your choosing and show me the contents
## CodeCompanion
I'll read a common configuration file and display its contents.
```xml
<tools>
<tool name="files">
<action type="read">
<path>/home/beavis/repositories/dotfiles/.bashrc</path>
</action>
</tool>
</tools>
```
The contents of the file should appear above. Once you see them, we can:
1. Analyze the file contents
2. Make modifications to the file
3. Create a backup copy of the file
## Me
> Sharing:
> - FILES tool
The READ action was executed successfully.
did you get something?
## CodeCompanion
No, I don't actually see the contents of the file in our conversation. While the read action was successful, I don't have direct access to the output. This is a limitation on my end - I can request to read files, but I can't see the actual contents that were read.
Let me try something simpler to demonstrate:
```xml
<tools>
<tool name="files">
<action type="read">
<path>/home/beavis/repositories/dotfiles/README.md</path>
</action>
</tool>
</tools>
```
Next steps:
1. You could share the contents with me if you'd like me to analyze them
2. We could try creating or editing a file instead
3. We could explore other files in the dotfiles repository The debug window does not show any file contents transferred in the background. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The files tool doesn't share any directory tree. It just works with files in your OS. You could combine it with the A future roadmap item is to have a workspace tool or slash command that will create a symbolic outline of a working directory and share that with the LLM. |
Beta Was this translation helpful? Give feedback.
This needs to be a bug report rather than a discussion. Can you raise it as an issue?