fix: add missing 'question' tool to ToolAccessSchema (#269)
The 'question' tool is a built-in OpenCode tool used to ask users to make decisions, but it was missing from the ToolAccessSchema in types.ts and the isValidOACTool() function in ToolMapper.ts. This prevented OpenCoder/OpenAgent agents from accessing the tool even when explicitly configured. Changes: - Add question: z.boolean().optional() to ToolAccessSchema - Add 'question' to validTools array in isValidOACTool() Fixes #268 Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>
This commit is contained in:
parent
70b7d362dc
commit
ef3836efd6
2 changed files with 2 additions and 1 deletions
|
|
@ -264,7 +264,7 @@ export function mapToolAccessToOAC(
|
|||
* Check if a tool name is a valid OAC tool.
|
||||
*/
|
||||
function isValidOACTool(name: string): name is keyof ToolAccess {
|
||||
const validTools = ["read", "write", "edit", "bash", "task", "grep", "glob", "patch"];
|
||||
const validTools = ["read", "write", "edit", "bash", "task", "grep", "glob", "patch", "question"];
|
||||
return validTools.includes(name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export const ToolAccessSchema = z.object({
|
|||
grep: z.boolean().optional(),
|
||||
glob: z.boolean().optional(),
|
||||
patch: z.boolean().optional(),
|
||||
question: z.boolean().optional(),
|
||||
});
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue