Guides
Chat and Files
High-signal file-aware chat workflows for reliable coding outcomes.
Chat and Files
This guide focuses on getting reliable outcomes from file-aware chat workflows.
Why File Context Discipline Matters
Agent output quality depends on context precision.
Best practice:
- reference exact files
- keep prompts bounded
- validate outputs against expected files
Recommended Workflow
- Open target workspace in Explorer.
- Use Search to locate exact files.
- Reference files in chat with
@mentions. - Send a narrow task prompt.
- Validate changes in file/diff panels.
For non-text updates:
- image proposals support side-by-side diff review plus apply/discard in Editor
- PDF proposals support staged text diff review when payload includes
dataUrl,currentText, andproposedText - unsupported audio/video/office binary types show explicit fallback guidance
Example PDF proposal payload:
{
"dataUrl": "data:application/pdf;base64,...",
"currentText": "Extracted text from current PDF",
"proposedText": "Extracted text from proposed PDF"
}Prompt Pattern For File Work
Use this structure:
- objective
- files in scope
- constraints
- expected output
Example:
"Update src/main/todo-runner.ts to improve error reporting for blocked items. Do not change retry semantics. Return a short summary and list edited files."
Image-Aided Debugging
For UI issues:
- paste screenshot directly in chat
- reference affected file paths
- request a fix plus visual verification steps
This is much more reliable than purely textual bug reports.
Verification Checklist
After each run:
- Confirm only expected files changed.
- Confirm output summary matches actual edits.
- Run relevant checks/tests.
- Capture any residual errors before next run.
Common Pitfalls
- broad prompts across many files
- missing file references for critical changes
- skipping post-change verification
- relying on implicit repository context
Recovery Pattern
If result quality drops:
- reduce scope to one file/task
- restate constraints explicitly
- rerun with concrete success criteria
- scale back up once stable