{"record":{"id":"6240d1e5987f2c00","repo":"chenhg5/cc-connect","slug":"must-be-full-compact-or-quiet","errorCode":null,"errorMessage":"must be full, compact, or quiet","messagePattern":"must be full, compact, or quiet","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/engine.go","lineNumber":15113,"sourceCode":"\t\t\tdescZh: \"显示模式: full, compact, quiet\",\n\t\t\tgetFunc: func() string {\n\t\t\t\tif e.display.Mode == \"\" {\n\t\t\t\t\treturn \"full\"\n\t\t\t\t}\n\t\t\t\treturn e.display.Mode\n\t\t\t},\n\t\t\tsetFunc: func(v string) error {\n\t\t\t\tswitch v {\n\t\t\t\tcase \"full\":\n\t\t\t\t\te.display.Mode = \"full\"\n\t\t\t\t\te.display.ThinkingMessages = true\n\t\t\t\t\te.display.ToolMessages = true\n\t\t\t\tcase \"compact\", \"quiet\":\n\t\t\t\t\te.display.Mode = v\n\t\t\t\t\te.display.ThinkingMessages = false\n\t\t\t\t\te.display.ToolMessages = false\n\t\t\t\tdefault:\n\t\t\t\t\treturn fmt.Errorf(\"must be full, compact, or quiet\")\n\t\t\t\t}\n\t\t\t\tif e.displaySaveFunc != nil {\n\t\t\t\t\ttm := e.display.ThinkingMessages\n\t\t\t\t\ttool := e.display.ToolMessages\n\t\t\t\t\treturn e.displaySaveFunc(&v, &tm, nil, nil, &tool)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tkey:    \"thinking_messages\",\n\t\t\tdesc:   \"Whether thinking messages are shown (true/false)\",\n\t\t\tdescZh: \"是否显示思考消息 (true/false)\",\n\t\t\tgetFunc: func() string {\n\t\t\t\treturn fmt.Sprintf(\"%t\", e.display.ThinkingMessages)\n\t\t\t},\n\t\t\tsetFunc: func(v string) error {\n\t\t\t\tb, err := strconv.ParseBool(v)","sourceCodeStart":15095,"sourceCodeEnd":15131,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/engine.go#L15095-L15131","documentation":"Validation error from the display-mode setting setter: the supplied value was not one of the accepted modes \"full\", \"compact\", or \"quiet\". The setter rejects anything else before persisting the display configuration.","triggerScenarios":"Setting the display mode config option with any value other than full/compact/quiet, e.g. `set display.mode minimal` or a misspelled value.","commonSituations":"Typo in the value in config.toml or an interactive set command; copying an example config that used an older/renamed mode value.","solutions":["Use exactly one of: full, compact, or quiet (lowercase).","Check config.toml for the display mode entry and correct the value.","If migrating from an older version, map deprecated mode names to the current three."],"exampleFix":"// before\ne.setDisplayMode(\"minimal\")\n// after\ne.setDisplayMode(\"compact\")","handlingStrategy":"validation","validationCode":"var mode = strings.ToLower(strings.TrimSpace(v))\nif mode != \"full\" && mode != \"compact\" && mode != \"quiet\" { return fmt.Errorf(\"must be full, compact, or quiet\") }","typeGuard":null,"tryCatchPattern":"if err := setDisplayMode(v); err != nil {\n    if strings.Contains(err.Error(), \"must be full, compact, or quiet\") { /* prompt user for a valid mode */ }\n    return err\n}","preventionTips":["Only use the documented values full/compact/quiet (lowercase).","Normalize/trim user input before applying settings.","Validate config.toml display settings at startup with a schema check."],"tags":["configuration","validation","display"],"backgroundTag":"invalid-enum-value","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}