omp packages

@m4riok/pi-ide-bridge0.3.0

Pi extension for VS Code diff approval workflows and editor context bridging.

m4riok Published 18 days ago MIT ~310 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

Pi IDE Bridge

Pi IDE Bridge connects the Pi coding agent to VS Code. Pi pauses before touching your files, opens a native diff, and waits for you to approve or reject. It also feeds your current editor state into Pi automatically so the agent always knows what you are looking at.

What you get

  • Change review — Pi shows every proposed file edit as a VS Code diff before anything is written to disk. You approve or reject.
  • Three approval modes — press F8 to cycle review, restrictive auto-accept (respects protected paths), and permissive auto-accept (bypasses protected paths).
  • Editor context — Pi automatically knows which files you have open, which is active, where your cursor is, and what text you have selected.
  • Diagnostics on demand — Pi can query VS Code's current errors and warnings via the get_ide_diagnostics tool, scoped to the active file, a specific file, or all open files.

Installation

Step 1 — Install the Pi extension

pi install npm:@m4riok/pi-ide-bridge

Restart your Pi session after installing.

Step 2 — Install the VS Code companion

In Pi, run:

/ide install

This installs the VS Code companion extension automatically. If that fails, see the manual install instructions below.

Manual VS Code install

Search for Pi IDE Bridge in the VS Code Extensions panel, or run:

ext install m4riok.pi-ide-bridge-vscode

Commands

Command What it does
/ide or /ide status Show VS Code connection status
/ide install Install the VS Code companion extension
/ide context Show the current editor context Pi is seeing
/ide diagnostics Show diagnostics for the active file
/ide diagnostics all Show diagnostics across all open files
/ide diagnostics file <path> Show diagnostics for a specific file

Keyboard shortcuts

Key Action
F8 Cycle review → auto-accept (restrictive) → auto-accept (permissive) → review

Protected paths

Use Pi's existing settings files: .pi/settings.json for the project or ~/.pi/agent/settings.json globally. Add paths under piIdeBridge alongside any existing settings:

{
  "piIdeBridge": {
    "protectedPaths": ["config/", ".env", "~/sensitive/"]
  }
}
  • Review prompts for every edit or write call.
  • Auto-accept (restrictive) prompts for protected files and anything beneath protected directories; other edits proceed automatically.
  • Auto-accept (permissive) skips these approval prompts, including protected paths.

Global and project lists combine; an empty project list does not remove global protections. Relative entries in either file resolve from the Pi session's project directory, not the settings file's directory. Absolute paths and ~/ paths work. Entries are literal paths, not globs. Directory boundaries are respected (config/ does not match configuration/), and symlink targets are checked, including new files.

Settings are read for each restrictive-mode approval decision; changes need no reload. Missing or empty settings files add no protected paths. Invalid settings stop restrictive auto-accept with an error rather than silently ignoring protections.

Existing saved auto mode and the dialog option "Yes, auto-accept edits (restrictive)" both select restrictive mode. Approving one protected edit does not exempt later edits. Subagent requests use the interactive parent's current mode and protected paths, even when the child has a different working directory.

This feature gates edit and write tools only. It is not a filesystem sandbox and does not intercept shell commands or other tools that modify files.