feat: Add ACP (Agent Client Protocol) support (#2947)
Co-authored-by: opencode-bot <devnull@opencode.local> Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
835fa9fb81
commit
f3f21194ae
1 changed files with 991 additions and 160 deletions
21
packages/opencode/src/cli/cmd/acp.ts
Normal file
21
packages/opencode/src/cli/cmd/acp.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { CommandModule } from "yargs"
|
||||
import { ACPServer } from "../../acp/server"
|
||||
|
||||
export const AcpCommand: CommandModule = {
|
||||
command: "acp",
|
||||
describe: "Start ACP (Agent Client Protocol) server",
|
||||
builder: (yargs) => {
|
||||
return yargs.option("cwd", {
|
||||
describe: "working directory",
|
||||
type: "string",
|
||||
default: process.cwd(),
|
||||
})
|
||||
},
|
||||
handler: async (opts) => {
|
||||
if (opts["cwd"] && typeof opts["cwd"] === "string") {
|
||||
process.chdir(opts["cwd"])
|
||||
}
|
||||
|
||||
await ACPServer.start()
|
||||
},
|
||||
}
|
||||
Loading…
Reference in a new issue