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

Abierto
#66,809 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
230k
Forks
31.3k
Merge medio
5 h 32 min
PR fusionados (30 d)
453

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.