A VS Code extension that gives Oh My Pi (omp) a Copilot / Cursor-style chat sidebar.
It launches a local omp --mode rpc session and streams replies, thinking, and tool activity into a modern webview chat UI.
-
Multi-tab chats (each tab is its own
ompsession) -
Agent-generated session titles on tabs (tiny/smol title model; disable with
ompChat.autoTitle) -
Right-click a chat tab to rename / view / export / copy the full session as plain text
-
Restores all open omp chat tabs/sessions after VS Code restarts or force-quits
-
History button lists all past omp sessions for the workspace and can resume any of them
-
Model picker button (lists
omp models --json, restarts session on change) -
Per-session context usage meter from omp
get_state.contextUsage -
Activity-bar Chat sidebar (Copilot-like)
-
Streaming assistant responses over omp RPC
-
Collapsible thinking blocks
-
Live tool call cards
-
Attach current file / selection from the editor context menu
-
New chat, stop generation, restart session
-
Settings for model, thinking level, approval mode, auto-approve
- Install Oh My Pi so
ompis on yourPATH - Configure provider auth the same way you do for the terminal CLI
- VS Code
1.90+
npm install
npm run buildThen press F5 (Run Extension) to open an Extension Development Host.
- Open the OMP icon in the Activity Bar
- Type a prompt and press Enter
- Optional:
- Right-click in the editor → OMP: Attach Current File
- Select code → OMP: Send Selection to Chat
- Use the view title buttons for New Chat, Stop, or Restart Session
| Action | macOS | Windows/Linux |
|---|---|---|
| Open chat | Cmd+Shift+; |
Ctrl+Shift+; |
| Send selection | Cmd+Shift+' |
Ctrl+Shift+' |
| Setting | Meaning |
|---|---|
ompChat.ompPath |
Path to omp (default: omp) |
ompChat.model |
Model override (fuzzy match) |
ompChat.thinking |
Thinking level |
ompChat.approvalMode |
always-ask / write / yolo |
ompChat.autoApprove |
Pass --auto-approve |
ompChat.continueLastSession |
Restore all open omp chat tabs/sessions on start (default on; survives VS Code kills) |
ompChat.autoTitle |
Let omp generate a short session title after the first message (default on; restart chats when toggling) |
ompChat.extraArgs |
Extra CLI args |
ompChat.showThinking |
Show/hide thinking blocks in UI |
ompChat.logFileTouches |
Log edit/write/delete touched paths to OMP File Touches output channel |
Quick error log: Command Palette → OMP: Show Error Log (also in the chat ⋯ menu). Entries persist across reloads and auto-clear after 7 days.
VS Code extension host
└─ ChatViewProvider (webview sidebar)
└─ SessionManager
└─ OmpRpcClient
└─ spawn: omp --mode rpc --cwd <workspace>
stdin/stdout: newline-delimited JSON
Prompt command:
{ "type": "prompt", "message": "..." }Stop command:
{ "type": "abort" }npm run packageThis produces a .vsix you can install with:
code --install-extension oh-my-pi-chat-0.1.0.vsix- Interactive omp questions (
extension_ui_request: confirm / select / input / editor) render above the composer - Edit/write/delete file touches are logged to the OMP File Touches output channel (
OMP: Show File Touch Log) - Tool auto-approval still uses
approvalMode/autoApprove(separate from question cards) - Multi-workspace root picker and inline apply/diff are natural next steps
- ACP (
omp acp) is an alternative transport; this extension uses native--mode rpcfor richer streaming events
- Click 📎 / Files / Folder in the composer
- Type
@in the composer to insert an inline file/folder mention - Paste an image from the clipboard into the input (shows as an inline chip)
- Drag & drop files onto the chat panel
- Right-click in Explorer → OMP: Attach to Chat
- Attach recent terminal / CMD output via 📎 → Attach terminal output,
/terminal,@terminal, or the terminal context menu
Paperclip/drag attachments are sent to omp as @/absolute/path mentions (images/files/folders). @ autocomplete inserts an inline @path mention in the prompt. Code selections and terminal command output are inlined as fenced blocks.
Terminal capture uses VS Code shell integration (default for bash/zsh/pwsh/fish). Run a command in the integrated terminal first, then attach it.