Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/opencode/src/acp-next/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type AuthenticateRequest,
type CancelNotification,
type InitializeRequest,
type LoadSessionRequest,
type NewSessionRequest,
type PromptRequest,
} from "@agentclientprotocol/sdk"
Expand All @@ -15,8 +16,8 @@ import * as ACPNextService from "./service"

export function init({ sdk: _sdk }: { sdk: OpencodeClient }) {
return {
create: (_connection: AgentSideConnection) => {
return new Agent(ACPNextService.make())
create: (connection: AgentSideConnection) => {
return new Agent(ACPNextService.make({ sdk: _sdk, connection }))
},
}
}
Expand All @@ -36,6 +37,10 @@ export class Agent implements ACPAgent {
return run(this.service.newSession(params))
}

loadSession(params: LoadSessionRequest) {
return run(this.service.loadSession(params))
}

prompt(params: PromptRequest) {
return run(this.service.prompt(params))
}
Expand Down
Loading
Loading