chore: generate

This commit is contained in:
opencode-agent[bot]
2026-04-01 23:49:44 +00:00
parent e4ff1ea778
commit 854484babf
4 changed files with 18 additions and 23 deletions

View File

@@ -314,7 +314,6 @@ function cmd(shell: string, name: string, command: string, cwd: string, env: Nod
})
}
async function run(
input: {
shell: string
@@ -340,23 +339,19 @@ async function run(
const exit = await CrossSpawnSpawner.runPromiseExit((spawner) =>
Effect.gen(function* () {
const handle = yield* spawner.spawn(
cmd(input.shell, input.name, input.command, input.cwd, input.env),
)
const handle = yield* spawner.spawn(cmd(input.shell, input.name, input.command, input.cwd, input.env))
yield* Effect.forkScoped(
Stream.runForEach(
Stream.decodeText(handle.all),
(chunk) =>
Effect.sync(() => {
output += chunk
ctx.metadata({
metadata: {
output: preview(output),
description: input.description,
},
})
}),
Stream.runForEach(Stream.decodeText(handle.all), (chunk) =>
Effect.sync(() => {
output += chunk
ctx.metadata({
metadata: {
output: preview(output),
description: input.description,
},
})
}),
),
)
@@ -385,10 +380,7 @@ async function run(
}
return exit.kind === "exit" ? exit.code : null
}).pipe(
Effect.scoped,
Effect.orDie,
),
}).pipe(Effect.scoped, Effect.orDie),
)
let code: number | null = null