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

Ouverte
#66,809 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
8/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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).

Langage dominant
TypeScript
Étoiles
230k
Forks
31.3k
Merge moyen
5 h 32 min
PR mergées (30 j)
453

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de anomalyco/opencode

Toutes les issues de anomalyco/opencode

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.