0
代码介绍
代码
Issues
Pull Requests
流水线
Actions
讨论
Wiki
项目成员
分析
项目设置
0
  1. PilotDeck
  2. /
  3. src
  4. /
  5. agent
  6. /
  7. turn
GGucc1feat(tool): align edit_file/read_file with robust edit design
19d1c80f创建于 8 天前历史提交
文件最后提交记录最后更新时间
TurnInputProcessor.ts
feat: add tool and agent runtime foundations Build the PolitDeck tool/permission runtime and start the agent loop on canonical model/tool contracts so future refactors can prove parity against legacy behavior. Co-authored-by: Cursor <cursoragent@cursor.com> 26 天前
TurnRunner.ts
feat(tool): align edit_file/read_file with robust edit design - Partial reads now register write snapshots, allowing edits after ranged read_file calls instead of requiring a full read - Layered stale check: full-read snapshots fall back to content hash comparison; partial-read snapshots reject on mtime change directly - Persist writeSnapshots and readFileState across session recreation via AgentLoop.snapshotFileState → TurnRunner → AgentSession → createLocalGateway.recreateSession seedState pipeline - Two-level old_string matching: exact match first, then curly-quote normalized match via new editNormalization.ts module - Pre-process new_string: strip trailing whitespace (except markdown) - Improved error messages: echo old_string on not-found, show match count on ambiguous matches - Tool descriptions now explicitly state read-before-write constraint and character-exact old_string requirement - Updated and added tests covering all new behavior (30 tests pass) Co-authored-by: Cursor <cursoragent@cursor.com> 8 天前