shuiyu67andWorkBuddy 9dd418ec89 feat: LSP 集成(连接外部语言服务器,真实诊断/智能感知喂给模型)
- 新增 lsp_client.py:LspClient(subprocess stdio,Content-Length 分帧 JSON-RPC,
  reader 线程,initialize/initialized/didOpen/didChange/hover/definition/references/
  completion + publishDiagnostics 通知捕获)+ LspManager(按扩展名→语言→server 路由、
  connect_all 读 lspServers、get_context 返回已分析文件诊断、cleanup 幂等)
- unified_tool_manager.py:initialize 末尾加载 LSP server,注册 5 个 lsp__* 工具
  (diagnostics/hover/definition/references/completion,带真实 inputSchema、protocol='lsp'、
  instance 存 manager 供 shutdown 清理)
- cli_core.py:_build_system_prompt 末尾注入 LSP 诊断上下文(模型持续看到真实诊断)
- config.json:顶层加 lspServers 段(python/rust 示例,含 _说明;该文件被 gitignore 不入库)
- 新增 tests/test_lsp_client.py(9 项:fake server 全链路+路由+桥接+fc_tools 保真+缺失/失败优雅降级)
- 修 LSP 线缆坑:didOpen/didChange 是通知(无响应),初版误当请求等响应导致超时

Co-Authored-By: WorkBuddy <workbuddy@tencent.com>
2026-08-05 17:49:46 +08:00
2026-08-02 18:39:28 +08:00
2026-06-19 00:30:15 +08:00

XiaoLi Pro-CLI

AI Programming Assistant — Code Editing · Git · Browser Automation · Multi-Agent

version python license tests


Features

  • Dual AI Engines — Ollama local + OpenAI compatible (DeepSeek, Grok, SiliconFlow, etc.)
  • Code Editing & Search — Precise replace, batch edit, symbol extraction, regex search
  • Git Integration — Full Git operations + workflow automation
  • Browser Automation — Playwright-driven, navigate/interact/screenshot/JS execution
  • Sub-Agent System — Multi-agent parallel collaboration with task delegation
  • Unified Safety — AI risk analysis + 3-mode switching (Normal/Manual/Unrestricted)
  • 15 Plugins, 141 Operations — Code, Git, browser, engineering, file management, etc.
  • 113 Automated Tests — pytest coverage for all plugins and core modules

Quick Start

git clone https://gitee.com/shuiyu1123/xiaoli-cli.git
cd xiaoli-cli
pip install -r requirements.txt
python ai_cli.py

AI Engines

Engine Type Description
ollama Local Ollama local models, no API key needed
openai Cloud/Local OpenAI compatible: DeepSeek, Grok, SiliconFlow, local vLLM

Plugins (15)

Core Productivity

Plugin Ops Description
code_editor 23 Code editing + search. replace/batch/find/regex/symbols/imports/callers/todo
git_tools 20 Git. status/diff/log/commit/branch + smart-commit/changelog/contributors
cmd_executor 1 Shell commands. Cross-platform, timeout, danger blocking
file_manager 11 File system. list/read/write/copy/move/delete/search/info/mkdir
auto_engineer 16 Engineering. lint/format/test/build/deps + complexity/security/metrics
task_manager 7 Task tracking. add/list/complete/delete/clear with JSON persistence

Advanced

Plugin Ops Description
sub_agent 8 Sub-Agent system. spawn/list/status/result/send/kill, parallel collaboration
browser_auto 31 Browser automation. navigate/click/fill/screenshot/JS/PDF/cookies
tool_search — Tool discovery. Search available plugins by keyword

Utilities

Plugin Description
network_tools ping/get/status/headers/ip
ai_search AI search via jina.ai + web content extraction
frontend_tester HTML/CSS/JS syntax check, responsive validation
speech_recognition Voice recording + speech-to-text
audio_player Audio playback
send_image Send images to phone (Clawli mode)

Safety

Three modes (/safe to switch):

Mode Icon Behavior
Normal (default) AI analyzes risk, confirms only when risk detected
Manual All commands require user confirmation
Unrestricted Execute directly, no checking

Testing

python -m pytest tests/ -v   # 113 tests

License

MIT License

S
Description
No description provided
Readme
10 MiB
0 Stars 1 Watchers 0 Forks