scope filetimes to session

This commit is contained in:
Dax Raad
2025-06-02 20:24:32 -04:00
parent 786db364d2
commit 54b99cd88a
4 changed files with 24 additions and 23 deletions

View File

@@ -92,7 +92,7 @@ export const EditTool = Tool.define({
return
}
const read = FileTimes.get(filePath)
const read = FileTimes.get(ctx.sessionID, filePath)
if (!read)
throw new Error(
`You must read the file ${filePath} before editing it. Use the View tool first`,
@@ -129,8 +129,7 @@ export const EditTool = Tool.define({
const changes = diffLines(contentOld, contentNew)
FileTimes.write(filePath)
FileTimes.read(filePath)
FileTimes.read(ctx.sessionID, filePath)
let output = ""
await LSP.file(filePath)