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

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

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.

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

説明

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.

主要言語
TypeScript
スター
2k
フォーク
301
平均マージ
3日 14時間
マージ済み PR(30日)
103

環境構築

はじめの一歩

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

Zoo-Code-Org/Zoo-Code のほかの issue

Zoo-Code-Org/Zoo-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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