mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
refactor acp args
This commit is contained in:
parent
e7c74d13cc
commit
d7cdabe8b7
@ -1,7 +1,7 @@
|
||||
import type { CommandModule } from "yargs"
|
||||
import { ACPServer } from "../../acp/server"
|
||||
import { cmd } from "./cmd"
|
||||
|
||||
export const AcpCommand: CommandModule = {
|
||||
export const AcpCommand = cmd({
|
||||
command: "acp",
|
||||
describe: "Start ACP (Agent Client Protocol) server",
|
||||
builder: (yargs) => {
|
||||
@ -12,10 +12,7 @@ export const AcpCommand: CommandModule = {
|
||||
})
|
||||
},
|
||||
handler: async (opts) => {
|
||||
if (opts["cwd"] && typeof opts["cwd"] === "string") {
|
||||
process.chdir(opts["cwd"])
|
||||
}
|
||||
|
||||
if (opts.cwd) process.chdir(opts["cwd"])
|
||||
await ACPServer.start()
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user