{"record":{"id":"f42eb66cb0e28937","repo":"sigoden/aichat","slug":"unknown-key-key","errorCode":null,"errorMessage":"Unknown key '{key}'","messagePattern":"Unknown key '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/mod.rs","lineNumber":692,"sourceCode":"                let value = value.parse().with_context(|| \"Invalid value\")?;\n                if value && config.write().functions.is_empty() {\n                    bail!(\"Function calling cannot be enabled because no functions are installed.\")\n                }\n                config.write().function_calling = value;\n            }\n            \"stream\" => {\n                let value = value.parse().with_context(|| \"Invalid value\")?;\n                config.write().stream = value;\n            }\n            \"save\" => {\n                let value = value.parse().with_context(|| \"Invalid value\")?;\n                config.write().save = value;\n            }\n            \"highlight\" => {\n                let value = value.parse().with_context(|| \"Invalid value\")?;\n                config.write().highlight = value;\n            }\n            _ => bail!(\"Unknown key '{key}'\"),\n        }\n        Ok(())\n    }\n\n    pub fn delete(config: &GlobalConfig, kind: &str) -> Result<()> {\n        let (dir, file_ext) = match kind {\n            \"role\" => (Self::roles_dir(), Some(\".md\")),\n            \"session\" => (config.read().sessions_dir(), Some(\".yaml\")),\n            \"rag\" => (Self::rags_dir(), Some(\".yaml\")),\n            \"macro\" => (Self::macros_dir(), Some(\".yaml\")),\n            \"agent-data\" => (Self::agents_data_dir(), None),\n            _ => bail!(\"Unknown kind '{kind}'\"),\n        };\n        let names = match read_dir(&dir) {\n            Ok(rd) => {\n                let mut names = vec![];\n                for entry in rd.flatten() {\n                    let name = entry.file_name();","sourceCodeStart":674,"sourceCodeEnd":710,"githubUrl":"https://github.com/sigoden/aichat/blob/82976d349ad97ac9aae0655ad631dace5e2a6385/src/config/mod.rs#L674-L710","documentation":"The catch-all arm of the key match in update(): any .set key that is not one of the recognized configuration keys (model, compress_threshold, rag_*, dry_run, function_calling, stream, save, highlight, etc.) triggers this generic validation guard. The input at fault is the unrecognized 'key' string.","triggerScenarios":"Thrown at src/config/mod.rs:692 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the spelling of the key against the list of supported configuration keys","Use the config list/display output to see valid key names","If a newer key is expected, update the application to a version that supports it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82976d349ad97ac9aae0655ad631dace5e2a6385","analyzedAt":"2026-09-09T18:33:06.139Z","contentChangedAt":"2026-09-09T18:33:06.139Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}