Skip to content

Commit 854484b

Browse files
chore: generate
1 parent e4ff1ea commit 854484b

4 files changed

Lines changed: 18 additions & 23 deletions

File tree

packages/opencode/src/effect/cross-spawn-spawner.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,5 +497,6 @@ const rt = lazy(() => {
497497
return makeRuntime(ChildProcessSpawner, defaultLayer)
498498
})
499499

500-
export const runPromiseExit: ReturnType<typeof rt>["runPromiseExit"] = (...args) => rt().runPromiseExit(...(args as [any]))
500+
export const runPromiseExit: ReturnType<typeof rt>["runPromiseExit"] = (...args) =>
501+
rt().runPromiseExit(...(args as [any]))
501502
export const runPromise: ReturnType<typeof rt>["runPromise"] = (...args) => rt().runPromise(...(args as [any]))

packages/opencode/src/session/message-v2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,6 @@ export namespace MessageV2 {
900900
}
901901
}
902902

903-
904903
export function filterCompacted(msgs: Iterable<MessageV2.WithParts>) {
905904
const result = [] as MessageV2.WithParts[]
906905
const completed = new Set<string>()

packages/opencode/src/tool/bash.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ function cmd(shell: string, name: string, command: string, cwd: string, env: Nod
314314
})
315315
}
316316

317-
318317
async function run(
319318
input: {
320319
shell: string
@@ -340,23 +339,19 @@ async function run(
340339

341340
const exit = await CrossSpawnSpawner.runPromiseExit((spawner) =>
342341
Effect.gen(function* () {
343-
const handle = yield* spawner.spawn(
344-
cmd(input.shell, input.name, input.command, input.cwd, input.env),
345-
)
342+
const handle = yield* spawner.spawn(cmd(input.shell, input.name, input.command, input.cwd, input.env))
346343

347344
yield* Effect.forkScoped(
348-
Stream.runForEach(
349-
Stream.decodeText(handle.all),
350-
(chunk) =>
351-
Effect.sync(() => {
352-
output += chunk
353-
ctx.metadata({
354-
metadata: {
355-
output: preview(output),
356-
description: input.description,
357-
},
358-
})
359-
}),
345+
Stream.runForEach(Stream.decodeText(handle.all), (chunk) =>
346+
Effect.sync(() => {
347+
output += chunk
348+
ctx.metadata({
349+
metadata: {
350+
output: preview(output),
351+
description: input.description,
352+
},
353+
})
354+
}),
360355
),
361356
)
362357

@@ -385,10 +380,7 @@ async function run(
385380
}
386381

387382
return exit.kind === "exit" ? exit.code : null
388-
}).pipe(
389-
Effect.scoped,
390-
Effect.orDie,
391-
),
383+
}).pipe(Effect.scoped, Effect.orDie),
392384
)
393385

394386
let code: number | null = null

packages/opencode/test/session/messages-pagination.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,10 @@ describe("MessageV2.filterCompacted", () => {
722722
const u1 = await addUser(session.id, "hello")
723723
await addCompactionPart(session.id, u1)
724724

725-
const error = new MessageV2.APIError({ message: "boom", isRetryable: true }).toObject() as MessageV2.Assistant["error"]
725+
const error = new MessageV2.APIError({
726+
message: "boom",
727+
isRetryable: true,
728+
}).toObject() as MessageV2.Assistant["error"]
726729
await addAssistant(session.id, u1, { summary: true, finish: "end_turn", error })
727730
const u2 = await addUser(session.id, "retry")
728731

0 commit comments

Comments
 (0)