OpenClaw Chat — VS Code Extension
A Chat Participant extension that brings OpenClaw into the VS Code Chat sidebar. Talk to AI with @openclaw, trigger prompts from the CLI, or push messages via a local HTTP endpoint.
Features
@openclaw Chat Participant — mention @openclaw in the Chat sidebar to ask questions
/ask — general Q&A slash command
/code — code-focused generation and review
- External trigger — push prompts from scripts or the OpenClaw gateway via HTTP or VS Code CLI
- Streaming responses — AI replies stream in real-time, saved in Chat History
Requirements
- VS Code 1.93+
- GitHub Copilot extension installed and signed in (provides the language model)
Usage
Open the Chat sidebar and type:
@openclaw what is the difference between Promise.all and Promise.allSettled?
Or use slash commands:
@openclaw /code write a TypeScript function that debounces async calls
@openclaw /ask explain the OpenClaw gateway architecture
From the Command Palette
- Open Command Palette (
Cmd+Shift+P)
- Run "OpenClaw: Trigger Chat"
- Enter your prompt
From the terminal (VS Code CLI)
code --command "openclaw.triggerChat" --args '["帮我检查这段代码的逻辑漏洞"]'
From HTTP (for OpenClaw gateway / scripts)
# Send a prompt
curl -X POST http://localhost:19836/trigger \
-H "Content-Type: application/json" \
-d '{"prompt":"帮我检查这段代码的逻辑漏洞"}'
# Health check
curl http://localhost:19836/health
Configuration
| Setting |
Default |
Description |
openclaw.chatPort |
19836 |
Local HTTP port for the trigger server |
Development
cd extensions/vscode-chat
npm install
npm run compile
# Press F5 in VS Code to launch Extension Development Host
Packaging
npm run package
# Produces openclaw-chat-0.1.0.vsix
Install the .vsix via: Extensions → … → Install from VSIX…