diff --git a/packages/opencode/test/tool/question.test.ts b/packages/opencode/test/tool/question.test.ts index 9e3f4e25c..fa95e9612 100644 --- a/packages/opencode/test/tool/question.test.ts +++ b/packages/opencode/test/tool/question.test.ts @@ -14,11 +14,11 @@ const ctx = { } describe("tool.question", () => { - let askSpy: any; + let askSpy: any beforeEach(() => { askSpy = spyOn(QuestionModule.Question, "ask").mockImplementation(async () => { - return [] + return [] }) }) @@ -42,10 +42,7 @@ describe("tool.question", () => { askSpy.mockResolvedValueOnce([["Red"]]) - const result = await tool.execute( - { questions }, - ctx, - ) + const result = await tool.execute({ questions }, ctx) expect(askSpy).toHaveBeenCalledTimes(1) expect(result.title).toBe("Asked 1 question") }) @@ -59,7 +56,7 @@ describe("tool.question", () => { options: [{ label: "Dog", description: "Man's best friend" }], }, ] - + askSpy.mockResolvedValueOnce([["Dog"]]) const result = await tool.execute({ questions }, ctx) @@ -91,7 +88,9 @@ describe("tool.question", () => { { question: "A question with a very long label", header: "Long Label", - options: [{ label: "This is a very, very, very long label that will exceed the limit", description: "A description" }], + options: [ + { label: "This is a very, very, very long label that will exceed the limit", description: "A description" }, + ], }, ] try { @@ -104,4 +103,3 @@ describe("tool.question", () => { } }) }) - diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 060a00e60..04e7144eb 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -545,7 +545,7 @@ export type QuestionInfo = { */ question: string /** - * Very short label (max 12 chars) + * Very short label (max 30 chars) */ header: string /** diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index a307a666e..104cedce1 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -7163,7 +7163,8 @@ "properties": { "label": { "description": "Display text (1-5 words, concise)", - "type": "string" + "type": "string", + "maxLength": 30 }, "description": { "description": "Explanation of choice", @@ -7180,9 +7181,9 @@ "type": "string" }, "header": { - "description": "Very short label (max 12 chars)", + "description": "Very short label (max 30 chars)", "type": "string", - "maxLength": 12 + "maxLength": 30 }, "options": { "description": "Available choices",