chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-08 17:46:57 +00:00
parent 4d43d584fe
commit 9e7f7bf8e4
2 changed files with 38 additions and 32 deletions
@@ -561,37 +561,37 @@ function createLayer(input: StreamInput) {
Effect.orElseSucceed(() => []), Effect.orElseSucceed(() => []),
) )
const bootstrapSubagentHistory = Effect.fn("RunStreamTransport.bootstrapSubagentHistory")( const bootstrapSubagentHistory = Effect.fn("RunStreamTransport.bootstrapSubagentHistory")(function* (
function* (sessions: string[]) { sessions: string[],
yield* Effect.forEach( ) {
sessions, yield* Effect.forEach(
(sessionID) => sessions,
messages(sessionID, SUBAGENT_CALL_BOOTSTRAP_LIMIT).pipe( (sessionID) =>
Effect.tap((messagesList) => messages(sessionID, SUBAGENT_CALL_BOOTSTRAP_LIMIT).pipe(
Effect.sync(() => { Effect.tap((messagesList) =>
if ( Effect.sync(() => {
!bootstrapSubagentCalls({ if (
data: state.subagent, !bootstrapSubagentCalls({
sessionID, data: state.subagent,
messages: messagesList, sessionID,
thinking: input.thinking, messages: messagesList,
limits: input.limits(), thinking: input.thinking,
}) limits: input.limits(),
) { })
return ) {
} return
}
syncFooter([], undefined, currentSubagentState()) syncFooter([], undefined, currentSubagentState())
}), }),
),
), ),
{ ),
concurrency: 4, {
discard: true, concurrency: 4,
}, discard: true,
) },
}, )
) })
const bootstrap = Effect.fn("RunStreamTransport.bootstrap")(function* () { const bootstrap = Effect.fn("RunStreamTransport.bootstrap")(function* () {
const [messagesList, children, permissions, questions] = yield* Effect.all( const [messagesList, children, permissions, questions] = yield* Effect.all(
@@ -651,7 +651,10 @@ function createLayer(input: StreamInput) {
return return
} }
yield* bootstrapSubagentHistory(sessions).pipe(Effect.forkIn(scope, { startImmediately: true }), Effect.asVoid) yield* bootstrapSubagentHistory(sessions).pipe(
Effect.forkIn(scope, { startImmediately: true }),
Effect.asVoid,
)
}) })
const idle = Effect.fn("RunStreamTransport.idle")((fallback: boolean) => const idle = Effect.fn("RunStreamTransport.idle")((fallback: boolean) =>
@@ -477,7 +477,8 @@ describe("run stream transport", () => {
const boot = await waitFor(() => { const boot = await waitFor(() => {
const item = ui.events.findLast((event) => event.type === "stream.subagent") const item = ui.events.findLast((event) => event.type === "stream.subagent")
const state = item?.type === "stream.subagent" ? item.state : undefined const state = item?.type === "stream.subagent" ? item.state : undefined
return state?.tabs.some((tab) => tab.sessionID === "child-1") && state.permissions.some((req) => req.id === "perm-1") return state?.tabs.some((tab) => tab.sessionID === "child-1") &&
state.permissions.some((req) => req.id === "perm-1")
? state ? state
: undefined : undefined
}) })
@@ -509,7 +510,9 @@ describe("run stream transport", () => {
const item = ui.events.findLast((event) => event.type === "stream.subagent") const item = ui.events.findLast((event) => event.type === "stream.subagent")
const state = item?.type === "stream.subagent" ? item.state : undefined const state = item?.type === "stream.subagent" ? item.state : undefined
const detail = state?.details["child-1"] const detail = state?.details["child-1"]
return detail?.commits.some((commit) => commit.kind === "tool" && commit.tool === "edit" && commit.phase === "start") return detail?.commits.some(
(commit) => commit.kind === "tool" && commit.tool === "edit" && commit.phase === "start",
)
? state ? state
: undefined : undefined
}) })