Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Pi Agent TerminalNew to Visual Studio Code? Get it now.
Pi Agent Terminal

Pi Agent Terminal

joshuaxql

| (1) | Free
Open the Pi coding agent in a native VS Code terminal editor tab beside your code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pi Agent Terminal

在 VS Code 编辑器右上角增加一个 Pi Agent 图标。点击后,会在当前编辑器右侧新建一个原生 VS Code 终端标签页,并在其中启动 Pi。

功能

  • 编辑器右上角一键打开 Pi Agent
  • 在右侧编辑器组中创建原生终端标签页,不占用左侧 Activity Bar 或侧栏
  • 使用 VS Code 原生终端,完整保留 Pi TUI、颜色、滚动、复制粘贴和键盘交互
  • 自动以当前文件所属工作区为 Pi 工作目录
  • 多根工作区中优先使用当前文件所在根目录
  • 复用 ~/.pi/agent 中已有的登录信息和配置,不在扩展中保存密钥

前置条件

  1. 安装 VS Code。
  2. 全局安装并登录 Pi:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi

本地开发

npm install
npm run compile

在 VS Code 中按 F5 启动扩展开发宿主。打开任意文件后,点击编辑器右上角的 Pi 图标。

打包

npm run package:vsix

生成的 VSIX 不再包含原生 PTY 依赖,可在 VS Code 支持的平台上安装。

设置

{
  // Pi 命令名或绝对路径
  "piAgent.executablePath": "pi",

  // 可选启动参数,例如自动继续最近会话
  "piAgent.arguments": ["--continue"]
}

如果 VS Code 没有继承安装 Pi 后的新 PATH,请重启 VS Code,或将 piAgent.executablePath 设置为 Pi 的绝对路径。

安全说明

Pi 能读取、修改并执行当前工作区中的文件,因此本扩展在 VS Code Restricted Mode 中禁用。请只在可信工作区中使用。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft