{"record":{"id":"f913b61816b3070b","repo":"Tencent/WeKnora","slug":"starter-suggestion-d-exceeds-200-characters","errorCode":null,"errorMessage":"starter suggestion %d exceeds 200 characters","messagePattern":"starter suggestion (.+?) exceeds 200 characters","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/types/custom_agent.go","lineNumber":400,"sourceCode":"\tif c.FollowUps.Count < 1 || c.FollowUps.Count > 5 {\n\t\treturn fmt.Errorf(\"follow-up suggestion count must be between 1 and 5\")\n\t}\n\tif c.FollowUps.MaxContextTurns < 1 || c.FollowUps.MaxContextTurns > 5 {\n\t\treturn fmt.Errorf(\"follow-up max_context_turns must be between 1 and 5\")\n\t}\n\tif !oneOf(c.Starters.Mode, SuggestionModeCurated, SuggestionModeKnowledge, SuggestionModeHybrid) {\n\t\treturn fmt.Errorf(\"invalid starter suggestion mode %q\", c.Starters.Mode)\n\t}\n\tif !oneOf(c.FollowUps.Mode, SuggestionModeGenerated, SuggestionModeKnowledge, SuggestionModeHybrid) {\n\t\treturn fmt.Errorf(\"invalid follow-up suggestion mode %q\", c.FollowUps.Mode)\n\t}\n\tfor i, item := range c.Starters.Items {\n\t\ttrimmed := strings.TrimSpace(item)\n\t\tif trimmed == \"\" {\n\t\t\treturn fmt.Errorf(\"starter suggestion %d cannot be empty\", i+1)\n\t\t}\n\t\tif len([]rune(trimmed)) > 200 {\n\t\t\treturn fmt.Errorf(\"starter suggestion %d exceeds 200 characters\", i+1)\n\t\t}\n\t}\n\tif len([]rune(strings.TrimSpace(c.FollowUps.AdditionalInstruction))) > 2000 {\n\t\treturn fmt.Errorf(\"follow-up additional_instruction exceeds 2000 characters\")\n\t}\n\tfor _, category := range c.FollowUps.Categories {\n\t\tif !oneOf(category, SuggestionCategoryClarify, SuggestionCategoryDeepen, SuggestionCategoryAction) {\n\t\t\treturn fmt.Errorf(\"invalid follow-up suggestion category %q\", category)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc oneOf(value string, allowed ...string) bool {\n\tfor _, candidate := range allowed {\n\t\tif value == candidate {\n\t\t\treturn true\n\t\t}","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/types/custom_agent.go#L382-L418","documentation":"Content validation in QuestionSuggestionConfig.Validate: the starter at index %d exceeds the 200-character cap enforced to keep starter suggestions scannable in the UI. The %d locates the offending entry so the agent-authored config can be trimmed before it is persisted.","triggerScenarios":"Thrown at internal/types/custom_agent.go:400 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Truncate or rewrite the starter to 200 characters or fewer","Prompt the authoring model for shorter suggestions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}