文件最后提交记录最后更新时间
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 天前
fix(model): deep-clone nested content in cloneMessages cloneMessages used spread to shallow-copy content blocks, leaving CanonicalToolResultBlock.content and CanonicalToolCallBlock.input as shared references between original and clone. Extract a shared clone utility that deep-copies these nested structures and replace three duplicate private implementations. Co-authored-by: Cursor <cursoragent@cursor.com> 8 天前
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 天前