From c6a2677b5a0fe0bee8f07aed3ae030b973e8ff7c Mon Sep 17 00:00:00 2001 From: ethan Date: Thu, 29 Jan 2026 13:22:21 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20add=20explicit=20char=20l?= =?UTF-8?q?imit=20to=20workspace=20name=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI models (especially Haiku) don't always respect JSON schema numeric constraints—they need explicit guidance in the prompt text. Added 'max 15 chars' to both the schema description and prompt to prevent names like 'workspace-integration' (21 chars) from exceeding the 20-char schema limit. --- src/node/services/workspaceTitleGenerator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/services/workspaceTitleGenerator.ts b/src/node/services/workspaceTitleGenerator.ts index ccaa7f205d..35bfc6f9cc 100644 --- a/src/node/services/workspaceTitleGenerator.ts +++ b/src/node/services/workspaceTitleGenerator.ts @@ -15,7 +15,7 @@ const workspaceIdentitySchema = z.object({ .min(2) .max(20) .describe( - "Codebase area (1-2 words): lowercase, hyphens only, e.g. 'sidebar', 'auth', 'config'" + "Codebase area (1-2 words, max 15 chars): lowercase, hyphens only, e.g. 'sidebar', 'auth', 'config'" ), title: z .string() @@ -96,7 +96,7 @@ export async function generateWorkspaceIdentity( "${message}" Requirements: -- name: The area of the codebase being worked on (1-2 words, git-safe: lowercase, hyphens only). Random bytes will be appended for uniqueness, so focus on the area not the specific task. Examples: "sidebar", "auth", "config", "api" +- name: The area of the codebase being worked on (1-2 words, max 15 chars, git-safe: lowercase, hyphens only). Random bytes will be appended for uniqueness, so focus on the area not the specific task. Examples: "sidebar", "auth", "config", "api" - title: A 2-5 word description in verb-noun format. Examples: "Fix plan mode", "Add user authentication", "Refactor sidebar layout"`, });