fix: ensure ask question tool isn't included when using acp (#11379)
This commit is contained in:
@@ -20,6 +20,7 @@ export const AcpCommand = cmd({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handler: async (args) => {
|
handler: async (args) => {
|
||||||
|
process.env.OPENCODE_CLIENT = "acp"
|
||||||
await bootstrap(process.cwd(), async () => {
|
await bootstrap(process.cwd(), async () => {
|
||||||
const opts = await resolveNetworkOptions(args)
|
const opts = await resolveNetworkOptions(args)
|
||||||
const server = Server.listen(opts)
|
const server = Server.listen(opts)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export namespace Flag {
|
|||||||
OPENCODE_DISABLE_CLAUDE_CODE || truthy("OPENCODE_DISABLE_CLAUDE_CODE_SKILLS")
|
OPENCODE_DISABLE_CLAUDE_CODE || truthy("OPENCODE_DISABLE_CLAUDE_CODE_SKILLS")
|
||||||
export declare const OPENCODE_DISABLE_PROJECT_CONFIG: boolean
|
export declare const OPENCODE_DISABLE_PROJECT_CONFIG: boolean
|
||||||
export const OPENCODE_FAKE_VCS = process.env["OPENCODE_FAKE_VCS"]
|
export const OPENCODE_FAKE_VCS = process.env["OPENCODE_FAKE_VCS"]
|
||||||
export const OPENCODE_CLIENT = process.env["OPENCODE_CLIENT"] ?? "cli"
|
export declare const OPENCODE_CLIENT: string
|
||||||
export const OPENCODE_SERVER_PASSWORD = process.env["OPENCODE_SERVER_PASSWORD"]
|
export const OPENCODE_SERVER_PASSWORD = process.env["OPENCODE_SERVER_PASSWORD"]
|
||||||
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
|
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
|
||||||
|
|
||||||
@@ -77,3 +77,14 @@ Object.defineProperty(Flag, "OPENCODE_CONFIG_DIR", {
|
|||||||
enumerable: true,
|
enumerable: true,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Dynamic getter for OPENCODE_CLIENT
|
||||||
|
// This must be evaluated at access time, not module load time,
|
||||||
|
// because some commands override the client at runtime
|
||||||
|
Object.defineProperty(Flag, "OPENCODE_CLIENT", {
|
||||||
|
get() {
|
||||||
|
return process.env["OPENCODE_CLIENT"] ?? "cli"
|
||||||
|
},
|
||||||
|
enumerable: true,
|
||||||
|
configurable: false,
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user