- 补装 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 钩子单测
30 lines
851 B
JSON
30 lines
851 B
JSON
{
|
|
"api": {
|
|
"engines": {
|
|
"ollama": {
|
|
"api_key": "",
|
|
"base_url": "http://localhost:11434",
|
|
"model": "gemma4:31b",
|
|
"max_token_k": "<input:请输入模型最大token大小(K)>"
|
|
},
|
|
"openai": {
|
|
"api_key": "your-api-key-here",
|
|
"base_url": "https://api.deepseek.com/v1",
|
|
"model": "deepseek-chat"
|
|
}
|
|
}
|
|
},
|
|
"system": {
|
|
"default_engine": "ollama",
|
|
"max_history": 50
|
|
},
|
|
"lspServers": {
|
|
"_说明": "语言服务器(LSP)。键为语言ID或扩展名,值为启动命令。配置后重启即生效,工具 lsp__diagnostics/hover/definition/references/completion 自动可用,且 AI 写/改 .py 文件后会自动触发诊断并注入模型上下文。",
|
|
"python": {
|
|
"command": "pylsp",
|
|
"args": [],
|
|
"disabled": false
|
|
}
|
|
}
|
|
}
|