Chanh:在 VS Code 中本地运行 Lemonade Server 的 AI 聊天扩展
lanly-dev/vscode-chanh
VS Code 扩展 Chanh 可在本地下载、托管并运行 Lemonade Server 可嵌入二进制,让用户直接在 VS Code 中与本地 LLM 对话,全程离线。它提供 @chanh 聊天参与者(支持 /fix、/explain 斜杠命令)和原生模型选择器中的工具调用、agent 模式、流式与视觉支持,并支持系统安装版、可嵌入版或自定义 URL 三种服务器模式。
Chanh /ch-ahn/ (n.) — lime or lemon in Vietnamese
A VS Code extension that downloads, hosts, and runs the Lemonade Server embeddable binary locally, enabling AI chat with local LLMs directly in VS Code.
Features
- Managing/downloading Lemonade models
- Chat integration:
@chanhchat participant for quick Q&A, plus chat models with tool-calling support in the native VS Code model picker (agent mode, streaming, and vision) - Everything runs locally, and work offline
- Multiple server modes: system-installed Lemonade Server, Embeddable Lemonade, or custom URL
- Just another way to integrate with VS Code
Chat Commands
The @chanh chat participant supports the following slash commands:
/fix- Generate a fix for the selected code/explain- Explain the selected code
Server Management
The tree view in the sidebar shows the active server, its status and its models. You can pick different server modes, such as using the system-installed Lemonade Server or downloading the binary version.
Agent mode and the model picker
Models served by the active Lemonade Server are exposed to VS Code's native model picker under the Chanh 🍋 provider. Only chat-capable models that also advertise tool-calling are listed, since agent mode relies on tool calling. chat and llm labels are treated the same, and label matching is case-insensitive. Vision models (vision label) are tagged in the picker and accept image attachments.
Plain chat models (no tool-calling label) remain available through the @chanh participant. chanh.chatModel remembers the last model used for @chanh (leave empty to be prompted).
Configuration
| Setting | Default | Description |
|---|---|---|
chanh.chatModel |
null |
Model to use for chat (leave empty to be prompted) |
chanh.customServerUrl |
null |
Custom Lemonade Server URL (used in CUSTOM mode) |
chanh.lemondPort |
8000 |
Port for the bundled lemond binary |
chanh.lemonadePort |
13305 |
Port for the Lemonade Server (System) |
chanh.serverMode |
"LEMONADE" |
Which Lemonade Server to use: LEMONADE, LEMOND, or CUSTOM |
chanh.maxLoadedModels |
(unset) | Maximum number of loaded models. Use -1 for unlimited. |
Release Notes
0.1.2
- Bugfixes and improve agent integration
0.1.1
- Add backends/recipes management
0.1.0
- Change the extension name from Lemon to Chanh
- Add download function into the treeview
- Label capabilities of the model
- Integrate into the VS Code agent harness
0.0.2
- Add icon
0.0.1
- Lemonade management treeview
- Chat integration
Enjoy!
来源:GitHub · github.com
