mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
sync
This commit is contained in:
parent
05974ea109
commit
f76cdfff9b
3 changed files with 93 additions and 19 deletions
|
|
@ -3,7 +3,7 @@ import * as path from "path"
|
|||
import { Tool } from "./tool"
|
||||
import { FileTimes } from "./util/file-times"
|
||||
import { LSP } from "../lsp"
|
||||
import { createTwoFilesPatch, diffLines } from "diff"
|
||||
import { createTwoFilesPatch } from "diff"
|
||||
import { Permission } from "../permission"
|
||||
import DESCRIPTION from "./edit.txt"
|
||||
|
||||
|
|
@ -85,7 +85,6 @@ export const EditTool = Tool.define({
|
|||
await file.write(contentNew)
|
||||
})()
|
||||
|
||||
const changes = diffLines(contentOld, contentNew)
|
||||
const diff = createTwoFilesPatch(filepath, filepath, contentOld, contentNew)
|
||||
|
||||
FileTimes.read(ctx.sessionID, filepath)
|
||||
|
|
@ -105,7 +104,6 @@ export const EditTool = Tool.define({
|
|||
return {
|
||||
metadata: {
|
||||
diagnostics,
|
||||
changes,
|
||||
diff,
|
||||
},
|
||||
output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue