opencode
opencode copied to clipboard
fix: handle deleted file references in prompt rerun
Fixes #9048 #8807
Summary
- Add file existence check before calling
.stat()on file references - Return graceful error message when referenced file is missing
- Add tests for missing file handling
Before
https://github.com/user-attachments/assets/393a9ba8-b952-4195-8372-e4bc09e502dc
After
https://github.com/user-attachments/assets/2e4b9601-cc0b-47ce-80a8-1b7c0abf6c81
How to replicate
- Reference a file
- Run the prompt
- Delete the file
- Press up arrow and rerun
- Should see error message instead of crash