Skip to content
所有標籤

#session-management

3 篇文章

pi-mono 深度導讀 1:從 CLI 使用者角度認識 pi——安裝、模式、Session、模型切換與訊息插隊

把 pi 當黑盒用:4 種運行模式怎麼切、Session 樹狀結構怎麼存、怎麼在對話中途換模型、Enter vs Alt+Enter 訊息插隊差異、/tree 怎麼跳回歷史分支。為後續架構篇建立直覺。

pi-mono 深度導讀系列:從零認識這個極簡 Coding Agent 的完整架構

本系列 17 篇帶你從 CLI 使用者角度切入,逐層深入 pi-mono 的 Agent Loop、Session Tree、Tool System、Extension System、TUI 架構、Remote Session、Telemetry、Compaction、Release 流程等核心機制。適合想自架 Agent、研究 Agent 架構、或想貢獻 pi 的開發者。

pi-mono 深度導讀 5:Session Tree——Append-only JSONL、Branching 不改歷史、Compaction 邏輯完整解析

SessionManager 核心:JSONL append-only 儲存、id/parentId 形成樹、branch() 移動 leaf pointer 不改歷史、buildSessionContext() 處理 compaction entry、createBranchedSession() fork 新檔案。完整 Entry 類型:message、thinking_level_change、model_change、compaction、branch_summary、custom、custom_message、label、session_info。Migration v1→v2→v3 細節。