feat: pylsp 作为工具之一 + AI 写/改 .py 自动触发诊断并注入上下文
- 补装 pylsp 及 lint 后端(pyflakes/pycodestyle/rope/mccabe),真实诊断可用 - code_editor / file_manager 写/改操作后自动调用 LSP 诊断(.py),结果经 get_lsp_context() 静默注入下一轮模型上下文,仅在有问题时的可见提示 - config.json 中 rust 设为 disabled(本机未装,免 ERROR 噪声) - requirements.txt / config.json.example 补充 pylsp 配置说明 - 新增 4 个 _auto_lsp_check 钩子单测
This commit is contained in:
1 parent
c655d61af4
commit
1054932921
5 files changed
+183
-39
No files matched your search
@@ -17,5 +17,13 @@
|
||||
"system": {
|
||||
"default_engine": "ollama",
|
||||
"max_history": 50
|
||||
},
|
||||
"lspServers": {
|
||||
"_说明": "语言服务器(LSP)。键为语言ID或扩展名,值为启动命令。配置后重启即生效,工具 lsp__diagnostics/hover/definition/references/completion 自动可用,且 AI 写/改 .py 文件后会自动触发诊断并注入模型上下文。",
|
||||
"python": {
|
||||
"command": "pylsp",
|
||||
"args": [],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user