跳到主內容

Theme / 0.3.2

ThinkRail

圍繞 pi 代理的代理式 IDE

基礎觀念

ThinkRail 是什麼:圍繞 pi 的代理式 IDE

🟢 入門|ThinkRail 是 JetBrains incubator 的開源代理式 IDE (agentic IDE):pi coding agent 是唯一引擎,ThinkRail 是包在外面的薄殼主機——工作區、編輯器與傳輸層。先搞懂它解決的三個問題與「thin host」分工,後面每一課才知道自己在操作哪一層。

一句話定位

官方部落格《Introducing ThinkRail》(2026-08-19)的開場:

ThinkRail is an agentic IDE for the Pi Coding Agent, designed to complement its powerful command-line workflow.

翻成白話:pi 已經是很強的命令列代理,ThinkRail 給它一個不用終端機也能駕馭的完整 IDE 介面。為什麼需要這層外殼?官方在同一篇說得很直白——

Pi’s strength lies in its flexibility: it is a minimal harness that lets you customize extensions and skills… New users often find themselves spending significant time learning how to navigate Pi, and even experienced users may find the workflow unnecessarily clunky.

解法是「不改變 pi、只加一層視覺化」:

We believe ThinkRail can make Pi more accessible without compromising its power. It provides a visual layer on top of Pi…

「薄殼」的分工:誰擁有什麼

ThinkRail 官方部落格有一段最適合當心法的宣言(2026-10-01):

ThinkRail is on purpose a thin layer on top of Pi; nothing about how the agent thinks, what it is allowed to do, or how it manages context is ThinkRail’s to reinvent. That is Pi’s job, and always will be.

對應到 README 的架構段,分工是三環:

環 套件 職責
引擎主機 (engine host) packages/server Bun.serve 起HTTP+WS 伺服器,每個 chat 一個 in-process 的 pi session
傳輸契約 (wire) packages/contracts 主機與 UI 之間的型別化合約
介面 (UI) apps/web React 19 + Zustand + Tailwind v4 的完整工作台

職責邊界(README 原文):

pi owns models, skills, compaction, cost, and session state; the app owns the workspace, the editor, and the wire — it never assembles prompts behind your back.

記住這句:模型、技能、上下文壓縮、成本、對話狀態都是 pi 的;ThinkRail 只管工作區、編輯器與傳輸層,而且絕不背著你拼 prompt。這也是官網首頁強調的透明化主張。

它解決的三個問題

產品規格書 goal-and-requirements.md 用三個標題描述動機,正好對應 ThinkRail 的三大能力:

問題(原文標題) 白話 對應能力
Parallel agents collide 多個代理在同一份工作目錄互相踩線 每個工作區都是獨立 git worktree
Agent changes are hard to review 代理改了一堆檔案,卻很難逐段審 逐 turn 的 diff、審查註解、逐步提交
Intent evaporates. 對話結束,需求與決策跟著蒸發 規格圖 就活在程式碼旁邊

三個能力的共同口號,官網首頁一句話講完:

ThinkRail gives every AI agent a clear plan, a separate place to work, and a visible trail of progress.

立場與原則

規格書列出的原則裡,使用者最有感的四條:

  • pi 是唯一引擎:in-process 直接跑 @earendil-works/pi-coding-agent,沒有第二個代理執行環境。
  • 餵食而非重組:Influence by feeding, never by assembling.——ThinkRail 餵 context 給 pi,不替你拼 prompt。
  • 用你自己的工具與憑證:ThinkRail keeps no accounts or tokens of its own——沒有 ThinkRail 帳號,登入 JetBrains AI 或用自己 provider 的憑證。
  • 規格優先:Spec-first.

開源身分與兩種跑法

  • 授權:Apache License 2.0,JetBrains incubator(InnovationHub)專案。
  • 桌面或瀏覽器:README 原文——A native desktop app, or the thinkrailCLI that opens the same app in your browser. Both embed the same engine host; app state lives under~/.thinkrail. 兩種跑法同一顆引擎,狀態都在 ~/.thinkrail。

這個主題的路線圖

  1. 安裝 ThinkRail——一行指令裝好、跑起來
  2. 專案與工作區——worktree 切出來的平行宇宙
  3. 工作台與對話——IDE 與 pi session
  4. 規格圖、技能與工作流、擴充、MCP、供應商與模型
  5. 客製化——語言、主題、字型、隱私