Skip to content

Tool.edit should recieve json object #6838

@xihale

Description

@xihale

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions