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

Aberta
#2,776 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
72/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
2k
Forks
301
Merge médio
3d 14h
PRs com merge (30d)
103

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Zoo-Code-Org/Zoo-Code

Todas as issues de Zoo-Code-Org/Zoo-Code

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.