opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Tool.edit should recieve json object

Open xihale opened this issue 1 week ago • 1 comments

Description

I found LLM is likely to pass json type content to write .json files, thus they directly pass json object to edit tool, however, the tool doesn't parse it well, which waste many tokens to change themselves' ways to stringify it (which is likely to make mistakens) or use cat << EOF fallback.

Plugins

oh my opencode

OpenCode version

1.0.203

Steps to reproduce

  1. just let LLM write a json file may reproduce it.

Screenshot and/or share link

Image

Operating System

6.12.63-1-MANJARO

Terminal

Ghostty

xihale avatar Jan 04 '26 16:01 xihale