[FEATURE]: Render custom file changes as inline TUI diffs

オープン
#66,809 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

The payload names no source files, so the first step is to find out whether the public plugin API already offers a tool-call-scoped renderer or diff metadata. Read the related issues #15451, #33302, #21018 and #46268 to see what has been decided or rejected. This needs a maintainer decision on the renderer hook and diff schema before any code is written, so there is no clear done state yet.

索引モデルが issue の本文から書いたものです。

説明

area/plugins type/feature

I maintain opencode-fs-plugin, whose namespaced tools (such as fs_write, fs_cp, and fs_rm) create, modify, and delete files. Their results currently appear as generic tool output. Returning unified-diff text or file-change metadata does not make the TUI show the native expandable diff beneath the tool call.

Please provide a supported way for a custom tool to attach structured file changes to its own call and have the TUI render them inline using the native-style diff view. The change data needs to identify the path, patch, additions/deletions, and status (added/modified/deleted); it should support multiple files and define safe limits for binary or very large files. A documented renderer API or tool-call-scoped TUI extension point would also work.

If this is not planned for release, please clarify whether this can be achieved with the current public plugin APIs. If so, what renderer hook and diff metadata should a plugin provide? If not, please say that there is currently no supported way; a side panel is not equivalent to showing the diff under the originating tool call.

Related requests: #15451 (typed diff rendering for custom tools), #33302 and #21018 (extensible TUI tool rendering), and #46268 (per-assistant-message footer slot, not tool-call diff).

主要言語
TypeScript
スター
230k
フォーク
31.3k
平均マージ
5時間 32分
マージ済み PR(30日)
453

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。