Decide how an agent write reports unsaved editor edits before it publishes

Abierto
#2,776 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with src/integrations/editor/DiffViewProvider.ts, especially the code that checks the editor buffer and performs guardedWrite publishing. Follow the existing tests for this provider to determine how tool results and dirty buffers are represented. The change is done when unsaved edits are reported to the model before publishing, without changing the publish order or blocking on a dirty editor.

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

Descripción

Context: PR #1408 review thread on src/integrations/editor/DiffViewProvider.ts (unresolved at 15940326f6).

Today the order is assertWithinCanonicalRoot -> createDirectoriesForFile -> guardedWrite publish -> (only when openFile === false) openTextDocument; the comment above the last step records that a dirty editor buffer is deliberately not saved. The review asks for the step before the publish: notice that the buffer holds unsaved user edits and tell the model, so an agent write cannot silently sit on top of them.

Three answers with different user-visible cost:

  • refuse the publish while the buffer is dirty (an agent write then blocks on a human buffer),
  • publish and warn, publish order unchanged,
  • publish and report the dirty edits in the tool result (smallest change; matches the review's wording 'report its edits to the model').

Direction chosen by the lane owner: the third, as a separate unit. The earlier deferral to "split unit 3" is stale - that unit's content landed on #1408 through 478c10750d, 94ca5fcf47 and fa49239842.

Lenguaje dominante
TypeScript
Estrellas
2k
Forks
301
Merge medio
3 d 14 h
PR fusionados (30 d)
103

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 Zoo-Code-Org/Zoo-Code

Todos los issues de Zoo-Code-Org/Zoo-Code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.