chore: generate
This commit is contained in:
@@ -27,7 +27,13 @@ export const MultiEditTool = Tool.defineEffect(
|
|||||||
)
|
)
|
||||||
.describe("Array of edit operations to perform sequentially on the file"),
|
.describe("Array of edit operations to perform sequentially on the file"),
|
||||||
}),
|
}),
|
||||||
execute: (params: { filePath: string; edits: Array<{ filePath: string; oldString: string; newString: string; replaceAll?: boolean }> }, ctx: Tool.Context) =>
|
execute: (
|
||||||
|
params: {
|
||||||
|
filePath: string
|
||||||
|
edits: Array<{ filePath: string; oldString: string; newString: string; replaceAll?: boolean }>
|
||||||
|
},
|
||||||
|
ctx: Tool.Context,
|
||||||
|
) =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const results = []
|
const results = []
|
||||||
for (const [, entry] of params.edits.entries()) {
|
for (const [, entry] of params.edits.entries()) {
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ async function touch(file: string, time: number) {
|
|||||||
await fs.utimes(file, date, date)
|
await fs.utimes(file, date, date)
|
||||||
}
|
}
|
||||||
|
|
||||||
const runtime = ManagedRuntime.make(
|
const runtime = ManagedRuntime.make(Layer.mergeAll(LSP.defaultLayer, FileTime.defaultLayer))
|
||||||
Layer.mergeAll(LSP.defaultLayer, FileTime.defaultLayer),
|
|
||||||
)
|
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await runtime.dispose()
|
await runtime.dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user