Refactor agent loop (#4412)
This commit is contained in:
parent
9fd43ec616
commit
a1214fff2e
1 changed files with 1291 additions and 1318 deletions
|
|
@ -8,8 +8,10 @@ import { lazy } from "../util/lazy"
|
|||
import { $ } from "bun"
|
||||
|
||||
import { ZipReader, BlobReader, BlobWriter } from "@zip.js/zip.js"
|
||||
import { Log } from "@/util/log"
|
||||
|
||||
export namespace Ripgrep {
|
||||
const log = Log.create({ service: "ripgrep" })
|
||||
const Stats = z.object({
|
||||
elapsed: z.object({
|
||||
secs: z.number(),
|
||||
|
|
@ -254,6 +256,7 @@ export namespace Ripgrep {
|
|||
}
|
||||
|
||||
export async function tree(input: { cwd: string; limit?: number }) {
|
||||
log.info("tree", input)
|
||||
const files = await Array.fromAsync(Ripgrep.files({ cwd: input.cwd }))
|
||||
interface Node {
|
||||
path: string[]
|
||||
|
|
|
|||
Loading…
Reference in a new issue