Allow ask headers longer than 16 chars (#20041)

This commit is contained in:
Tommaso Sciortino
2026-02-23 10:26:59 -08:00
committed by GitHub
parent 3f6cec22e6
commit 813e0c18ac
6 changed files with 40 additions and 38 deletions
+1 -20
View File
@@ -103,19 +103,6 @@ describe('AskUserTool', () => {
expect(result).toContain("must have required property 'header'");
});
it('should return error if header exceeds max length', () => {
const result = tool.validateToolParams({
questions: [
{
question: 'Test?',
header: 'This is way too long',
type: QuestionType.CHOICE,
},
],
});
expect(result).toContain('must NOT have more than 16 characters');
});
it('should return error if options has fewer than 2 items', () => {
const result = tool.validateToolParams({
questions: [
@@ -276,13 +263,7 @@ describe('AskUserTool', () => {
describe('validateBuildAndExecute', () => {
it('should hide validation errors from returnDisplay', async () => {
const params = {
questions: [
{
question: 'Test?',
header: 'This is way too long',
type: QuestionType.TEXT,
},
],
questions: [],
};
const result = await tool.validateBuildAndExecute(
@@ -80,8 +80,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-2.5-pro > snaps
"items": {
"properties": {
"header": {
"description": "MUST be 16 characters or fewer or the call will fail. Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".",
"maxLength": 16,
"description": "Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".",
"type": "string",
},
"multiSelect": {
@@ -869,8 +868,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview >
"items": {
"properties": {
"header": {
"description": "MUST be 16 characters or fewer or the call will fail. Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".",
"maxLength": 16,
"description": "Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".",
"type": "string",
},
"multiSelect": {
@@ -609,9 +609,8 @@ The agent did not use the todo list because this task could be completed by a ti
},
header: {
type: 'string',
maxLength: 16,
description:
'MUST be 16 characters or fewer or the call will fail. Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".',
'Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".',
},
type: {
type: 'string',
@@ -587,9 +587,8 @@ The agent did not use the todo list because this task could be completed by a ti
},
header: {
type: 'string',
maxLength: 16,
description:
'MUST be 16 characters or fewer or the call will fail. Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".',
'Very short label displayed as a chip/tag. Use abbreviations: "Auth" not "Authentication", "Config" not "Configuration". Examples: "Auth method", "Library", "Approach", "Database".',
},
type: {
type: 'string',