Procházet zdrojové kódy

do not allow agent to ask custom-less questions

Dax Raad před 7 měsíci
rodič
revize
0187b6bb72
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      packages/opencode/src/tool/question.ts

+ 1 - 1
packages/opencode/src/tool/question.ts

@@ -6,7 +6,7 @@ import DESCRIPTION from "./question.txt"
 export const QuestionTool = Tool.define("question", {
 export const QuestionTool = Tool.define("question", {
   description: DESCRIPTION,
   description: DESCRIPTION,
   parameters: z.object({
   parameters: z.object({
-    questions: z.array(Question.Info).describe("Questions to ask"),
+    questions: z.array(Question.Info.omit({ custom: true })).describe("Questions to ask"),
   }),
   }),
   async execute(params, ctx) {
   async execute(params, ctx) {
     const answers = await Question.ask({
     const answers = await Question.ask({