refactor(acp): drop async from synchronous ACP.init (#25520)
This commit is contained in:
@@ -130,7 +130,7 @@ async function sendUsageUpdate(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function init({ sdk: _sdk }: { sdk: OpencodeClient }) {
|
export function init({ sdk: _sdk }: { sdk: OpencodeClient }) {
|
||||||
return {
|
return {
|
||||||
create: (connection: AgentSideConnection, fullConfig: ACPConfig) => {
|
create: (connection: AgentSideConnection, fullConfig: ACPConfig) => {
|
||||||
return new Agent(connection, fullConfig)
|
return new Agent(connection, fullConfig)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export const AcpCommand = effectCmd({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const stream = ndJsonStream(input, output)
|
const stream = ndJsonStream(input, output)
|
||||||
const agent = yield* Effect.promise(() => ACP.init({ sdk }))
|
const agent = ACP.init({ sdk })
|
||||||
|
|
||||||
new AgentSideConnection((conn) => {
|
new AgentSideConnection((conn) => {
|
||||||
return agent.create(conn, { sdk })
|
return agent.create(conn, { sdk })
|
||||||
|
|||||||
Reference in New Issue
Block a user