chore: generate
This commit is contained in:
parent
d29f5eba92
commit
237595e242
4 changed files with 6 additions and 18 deletions
|
|
@ -260,11 +260,7 @@ const parse = Effect.fn("ShellTool.parse")(function* (command: string, ps: boole
|
|||
return tree
|
||||
})
|
||||
|
||||
const ask = Effect.fn("ShellTool.ask")(function* (
|
||||
ctx: Tool.Context,
|
||||
scan: Scan,
|
||||
input: { command: string },
|
||||
) {
|
||||
const ask = Effect.fn("ShellTool.ask")(function* (ctx: Tool.Context, scan: Scan, input: { command: string }) {
|
||||
if (scan.dirs.size > 0) {
|
||||
const directories = Array.from(scan.dirs)
|
||||
const globs = directories.map((dir) => {
|
||||
|
|
|
|||
|
|
@ -973,12 +973,9 @@ describe("tool.shell permissions", () => {
|
|||
Effect.gen(function* () {
|
||||
const err = new Error("stop after permission")
|
||||
const requests: Array<Omit<PermissionV1.Request, "id" | "sessionID" | "tool">> = []
|
||||
expect(
|
||||
yield* fail(
|
||||
{ command: "echo test > output.txt" },
|
||||
capture(requests, err),
|
||||
),
|
||||
).toMatchObject({ message: err.message })
|
||||
expect(yield* fail({ command: "echo test > output.txt" }, capture(requests, err))).toMatchObject({
|
||||
message: err.message,
|
||||
})
|
||||
const bashReq = requests.find((r) => r.permission === "bash")
|
||||
expect(bashReq).toBeDefined()
|
||||
expect(bashReq!.patterns).toContain("echo test > output.txt")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue