mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 06:42:26 +00:00
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:
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()
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user