mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 02:04:22 +01:00
refactor acp args
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { CommandModule } from "yargs"
|
|
||||||
import { ACPServer } from "../../acp/server"
|
import { ACPServer } from "../../acp/server"
|
||||||
|
import { cmd } from "./cmd"
|
||||||
|
|
||||||
export const AcpCommand: CommandModule = {
|
export const AcpCommand = cmd({
|
||||||
command: "acp",
|
command: "acp",
|
||||||
describe: "Start ACP (Agent Client Protocol) server",
|
describe: "Start ACP (Agent Client Protocol) server",
|
||||||
builder: (yargs) => {
|
builder: (yargs) => {
|
||||||
@@ -12,10 +12,7 @@ export const AcpCommand: CommandModule = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handler: async (opts) => {
|
handler: async (opts) => {
|
||||||
if (opts["cwd"] && typeof opts["cwd"] === "string") {
|
if (opts.cwd) process.chdir(opts["cwd"])
|
||||||
process.chdir(opts["cwd"])
|
|
||||||
}
|
|
||||||
|
|
||||||
await ACPServer.start()
|
await ACPServer.start()
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user