File References
File references allow you to seamlessly integrate any workspace file into your conversation with Bwat. Instead of manually copying code sections, simply type @/ and specify the file path to give Bwat complete context.
How to Use File References
When you enter @/ in chat, Bwat displays your project file structure. Browse through directories, select your target file, and its complete contents become immediately available - including all imports, related functions, and surrounding code context.
Practical Usage
Use file references when troubleshooting issues. Rather than guessing which code segments to share, simply reference the entire file:
Getting this validation error: Terminal Output (see below for output)
Relevant form component: 'src/components/RegistrationForm.vue' (see below for file content)
Backend handler: 'src/api/authService.js' (see below for file content)
What's causing this mismatch?
This approach provides Bwat with:
- The complete error output
- Full component implementation
- Entire API endpoint logic All without any manual copying.
Key Benefits
- Eliminates manual code section identification
- Provides complete file context automatically
- Maintains awareness of imports and dependencies
- Reduces context-missing errors
Technical Implementation
When you use a file reference, Bwat:
- Detects file path patterns in your message
- Resolves absolute file paths relative to project root
- Verifies file type (text vs binary)
- For text files:
- Reads complete contents
- Preserves original formatting
- Maintains syntax structure
- Structures the enhanced message with file content
- Processes with full file context for accurate analysis