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:
shuiyu committed 2026-08-05 21:23:16 +08:00
1 parent c655d61af4
commit 1054932921
5 files changed
+183 -39

No files matched your search

+19 -30
View File
@@ -1,32 +1,21 @@
# 小狸 Pro-CLI 依赖库
# 修复后的包名(使用 pip 安装名)
# 小狸 Pro-CLI 依赖
# 生成于 2026-08-05 21:10
# 核心依赖
colorama>=0.4.6
openai>=1.0.0
requests>=2.28.0
ollama>=0.1.0
PIL
ascii_magic
colorama
cv2
numpy
ollama
openai
pygame
requests
tkinter
# 图像处理
Pillow>=9.0.0
opencv-python>=4.5.0
numpy>=1.21.0
ascii-magic>=2.0.0
# 数据处理
pandas>=1.3.0
scipy>=1.7.0
# 音频
pygame>=2.0.0
# TUI 模式
textual>=0.40.0
# v8.0 Rich 面板式 TUI(支持快照自验,默认 TUI 渲染器)
rich>=13.0.0
# WebSocket 远程
websockets>=11.0
# 类型提示
typing-extensions>=4.0.0
# LSP 智能感知(pylsp 作为工具之一:lsp__diagnostics/hover/definition/references/completion)
# 写/改 .py 文件后自动触发诊断并注入模型上下文
python-lsp-server
pyflakes
pycodestyle
rope
mccabe