Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-chat-file-saver

Save uploaded files to disk — even when the model rejects them.

When you attach an image and the model says "this model does not support image input", the file is lost. This plugin catches those files and saves them anyway.

  • Saves every file you upload, regardless of model support
  • Recovers rejected files by scanning OpenCode's database after errors
  • Tells the model where files are by injecting paths into the system prompt

Install

git clone https://github.com/procodingtools/opencode-chat-file-saver.git
cd opencode-chat-file-saver
npm install && npm run build

Then copy the compiled plugin:

cp dist/index.js ~/.opencode/plugins/file-saver.js

Or install locally into your OpenCode config directory:

npm install ./opencode-chat-file-saver

Where files go

.opencode/uploads/<session-id>/
  1747145600000_photo.jpeg
  1747145600000_prt_xxx_screenshot.png

No config needed. It just works.

License

MIT

About

OpenCode plugin that saves file attachments from chat messages to disk, organized by session

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages