Skip to content

Pi for Android v0.2.0

Choose a tag to compare

@heikeyangle-code heikeyangle-code released this 21 Nov 21:54

Pi for Android v0.2.0

从上一正式版 v0.1.8-2 到 v0.2.0,历经 74 次提交,是一次从底层引擎、扩展生态、视觉质感、核心工作流到全应用中英双语的跨代大升级——内核跃升至 Pi 1.6.0,同时通过深度瘦身将安装包体积从 153 MiB 降至 134 MiB。


核心重磅更新

1. 内核升级至 Pi 1.6.0 & 全面重构 :protocol 架构

  • 内置引擎升至 @earendil-works/pi-coding-agent 1.6.0:全面跟进 Pi 1.6.0 新特性、事件模型与设置项,建立升级审计与真 SDK 契约测试防线。
  • 架构全面现代化:将历史遗留的 :rpc 协议层全面重构迁移为强类型 :protocol SDK Host 架构,消除冷启动阶段非必要的未打包模块加载,并新增 6 项冷启动性能 CI 守卫,启动更快更轻。
  • 运行时底层加固:修复 tawcroot 因 PDEATHSIG 导致的 exit 137 意外退出问题,并彻底重做「引擎与运行时」诊断页。

2. 移动端 Pi 扩展与完整 TUI 兼容引擎

  • 把桌面端 Pi 扩展生态搬上手机:完整支持官方扩展 UI 协议,在手机上直接运行交互式扩展 TUI 面板,自动按手机屏幕计算视口宽/高并按实际列数回传 ui.resize。
  • 完整移动端交互体验:支持扩展浮层一键最小化与恢复、1:1 SDK 工具卡与 ANSI 彩色输出、声音提示、/reload 一键热重载与 ui.reset 状态重置,以及会话切换时自动清空旧扩展投影。

3. 全新视觉语言、编辑部级阅读质感 & 真·矢量行内 LaTeX

  • 全站 UI 焕新 & 100% Pi 主题兼容:重构整套亮/暗主题色阶、字体层级、圆角与 0.5dp 发丝边体系,完美兼容官方 Pi 主题;聊天悬浮输入框升级为柔光边缘羽化渐变与同心圆环边框。
  • 真正 MathJax 矢量 SVG 行内 LaTeX:聊天正文正式支持 $...$ 与 \(...\) 行内矢量数学公式实时渲染(兼容中英混排紧邻、精准保护 $5/$10 货币符号不误伤、块级 $$...$$ / \[...\] 自动隔离排版),并修正公式缩放比例,告别巨型错位公式。
  • 富文本排版全面升格:
    • 代码块:去掉外部多余的滚动切换胶囊,头部回归极简(语言/文件名 + 行数 + 复制 + 菜单),统一行号槽与卡片质感。
    • GFM 表格:改用按内容长度智能分配的弹性列宽 + 动态右缘渐隐提示(去除遮挡表头文字的悬浮图标),手机横滑更顺眼。
    • 引用块、标题与富卡片:全面优化引用块、标题层次、分割线、Mermaid 图表、HTML 卡片、CSV 表格、链接卡片与堆栈视图的视觉一致性。

4. 会话列表、命令面板 & 项目文件管理器全面重做

  • 秒开会话列表(对照官方 /resume):彻底重写会话列表数据面与 UI——后台预读、增量索引、按工作区分组、新会话即时置顶、重读不闪白不清缓存。
  • 命令面板官方对齐:支持 /model <引用>、按官方分组重排,不可用命令不再占位干扰。
  • 像原生文件管理器一样好用的项目页:完全对齐 Pi cwd 语义,支持直接热切换手机本地外部存储目录作为工作区;新增子目录新建、文件导入、复制副本、系统分享、递归搜索与 Markdown 实时预览。

5. 模型与供应商、账号订阅登录 & 自定义端点全面重做

  • 所有账号/OAuth 登录统一置顶:将全部支持订阅账号与网页 OAuth 授权的供应商(Claude Pro/Max、ChatGPT Plus/Pro、GitHub Copilot、Gemini CLI、OpenRouter 等)集中展示在顶部「账号与订阅登录」分区,登录前后不跳段、不重复,清晰区分「订阅」与「网页登录」。
  • 重做供应商连接与粘贴 Key 面板:彻底告别简陋表单——清晰分层的 OAuth 授权卡(实时进度、高亮设备验证码一键复制并打开浏览器、手动回调链接粘贴)与 API Key 卡(一键剪贴板粘贴、密码明文切换、整宽主保存按钮、凭据来源徽标),退出登录/删除凭据增加二次确认。
  • 重做自定义供应商(models.json)表单:支持窄屏横向滚动选协议、API Key 粘贴与明文切换、折叠模型配置卡、内置供应商覆盖提示与吸底操作栏。
  • 统一搜索体验:模型页、供应商目录、设置首页与开源许可页全面换装带搜索图标与一键清空(×)的统一搜索框。

6. 系统提示词、MCP 与零 Token 设备能力全面重做

  • 系统提示词与上下文彻底重构:总览实时生效状态(清晰呈现全局/项目层 APPEND_SYSTEM.md 追加与 SYSTEM.md 替换的继承关系与容量),提供直达 AGENTS.md / CLAUDE.md 的四槽位空白草稿编辑器,点击任意空白处即弹输入法,保存自动热重载生效。
  • MCP 管理器对齐 SDK:移除非官方内置的 Sentry / GitHub 硬编码预设,回归 SDK 标准三大入口(远程 Streamable HTTP / 本地 STDIO / 粘贴导入 JSON,支持一键从剪贴板粘贴),全面优化状态展示与窄屏排版。
  • 零 Token 设备能力桥接:移除冗余的 SAF 目录代理与 android_files(已支持直访本机目录),未开启时零 Token 上下文占用,2×2 系统权限与 Shizuku 状态面板一目了然。

7. 全应用中英双语原生支持

  • 覆盖聊天、设置、模型、MCP、项目、资源、设备能力与会话树全场景(2,600+ 处界面文案),支持中英无缝切换并纳入 CI 自动校验。

稳定性与流畅度打磨

  • 彻底根治「Pi 无响应(ANR)」:完成全代码库主线程审计,清零空转触底跟随死循环、会话树异常环路死循环、前台服务早退竞态、主线程阻塞 I/O 与配置读写锁护航,日常浏览与高强度对话均保持跟手流畅。
  • 丝滑流式交互:消除流式输出上下抖动、思考内容闪烁丢失、错误工具卡无法收起、弹窗首帧暗幕闪烁及长表格卡顿。
  • OAuth / MCP 细节修复:修复关闭登录面板未及时取消回调端口导致的 ERR.BUSY 问题与多项边界交互问题。

安装与升级说明

  • 下载 pi-android-0.2.0-sideload28-arm64.apk(versionName = 0.2.0,versionCode = 10,arm64-v8a 单 ABI,内置 proot / proroot / tawcroot 与 Pi 1.6.0 运行时)。
  • 沿用固定侧载签名,支持从 v0.1.8-2 及更早版本直接覆盖安装,保留全部本地会话、工作区、模型凭据与配置。

English Release Notes

Pi for Android v0.2.0

A generational leap over v0.1.8-2 spanning 74 commits — upgrading the bundled engine to Pi 1.6.0, bringing the full desktop Pi extension & TUI ecosystem to Android, overhauling reading typography with real MathJax vector inline LaTeX, rebuilding Sessions, Project Explorer, Models/OAuth, System Prompts, and MCP, and shipping complete Chinese + English localization — all while slimming the signed APK from 153 MiB down to 134 MiB.

Major Highlights

1. Pi 1.6.0 Engine & Modern :protocol Architecture

  • Upgraded bundled engine to @earendil-works/pi-coding-agent 1.6.0 with full SDK contract tests and upgrade audit coverage.
  • Migrated :rpc → typed :protocol SDK Host, eliminated unbundled cold-start imports, and added 6 cold-startup performance CI gates.
  • Runtime hardening: fixed tawcroot exit 137 (PDEATHSIG) unexpected exits and rebuilt the Engine & Runtime diagnostics screen.

2. Mobile Pi Extension & Full TUI Compatibility Engine

  • Desktop Pi extensions on mobile: renders official interactive TUI extension surfaces with automatic viewport width/height adaptation and live ui.resize reporting.
  • Complete mobile UX: minimizable extension overlays, 1:1 SDK tool cards with ANSI rendering, audio bell support, 1-tap /reload with ui.reset, and automatic state cleanup on session switch.

3. Editorial UI Overhaul & Real Vector Inline LaTeX

  • Refreshed visual system & 100% Pi theme compatibility: refined light/dark palettes, typography rhythm, 0.5dp hairlines, and a floating composer dock with soft edge feathering and concentric ring border.
  • Real MathJax Vector SVG Inline LaTeX: supports $...$ and \(...\) inline math with CJK adjacency, $5/$10 currency protection, automatic blank-line isolation for display math ($$...$$ / \[...\]), and accurate emWidth/emHeight sizing.
  • Upgraded rich blocks: minimalist code block headers (removed redundant outer scroll pill), content-proportional GFM tables with dynamic right-edge fade, and refined blockquotes, headings, Mermaid diagrams, HTML, CSV, Link, and StackTrace cards.

4. Rebuilt Sessions, Command Palette & Project File Manager

  • Instant Session List (/resume parity): background preloading, incremental indexing, workspace grouping, instant new-session pinning, and zero-flash reloads.
  • Official Command Palette parity: supports /model <ref>, official grouping, and hides unavailable entries.
  • Native-grade Project Explorer: aligned with Pi cwd semantics, hot-switching external Android storage folders as workspaces, plus subfolder creation, import, duplicate, share, recursive search, and Markdown preview.

5. Rebuilt Models, OAuth / Subscription Login & Custom Providers

  • All OAuth & Subscription providers promoted to top: unified Account & Subscription Login section featuring Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, Gemini CLI, OpenRouter, and more — with clear Subscription vs. OAuth badges and no section-jumping.
  • Redesigned Provider Connect & API Key Sheet: clean card hierarchy for OAuth sign-in (live progress, highlighted device-code Copy & Open Browser, manual callback paste), API Key (one-tap Clipboard Paste, show/hide toggle, full-width primary Save button, source badges), custom endpoint overrides, and Sign Out with confirmation.
  • Redesigned Custom Provider (models.json) form: scrollable protocol chips, API key paste & visibility toggle, collapsible model cards, delete confirmation, and sticky action footer.
  • Unified search bars with search icon and clear (×) button across Models, Provider catalog, Settings Home, and Licenses.

6. Rebuilt System Prompts & Context, MCP & Zero-Token Device Bridge

  • System Prompt & Context: live active status overview (APPEND_SYSTEM.md vs. SYSTEM.md inheritance + compact KB sizing), direct 4-slot editor (AGENTS.md / CLAUDE.md) with full-area IME tap focus and automatic hot-reload on save.
  • SDK-Aligned MCP Manager: removed non-SDK hardcoded Sentry & GitHub presets in favor of standard SDK transports (Remote Streamable HTTP, Local STDIO, Import JSON with one-tap clipboard paste).
  • Zero-Token Device Bridge: removed redundant SAF / android_files layers in favor of direct storage access, zero token overhead when disabled, and a crisp 2×2 readiness dashboard.

7. Full Chinese & English Localization

  • Complete bilingual UI coverage (2,600+ localized strings) with automated CI parity checks.

Stability & Polish

  • Eradicated ANR ("Pi Not Responding") freezes across idle browsing, Session Tree, Foreground Service lifecycle, settings lock convoys, engine restarts, and large Markdown tables/messages.
  • Smooth streaming: eliminated streaming scroll jitter, thinking flicker, uncollapsible error tool cards, and dialog first-frame dim flashes.
  • OAuth & MCP reliability: fixed lingering callback ports (ERR.BUSY) when dismissing active login sheets.

Version & Installation

  • pi-android-0.2.0-sideload28-arm64.apk (versionName = 0.2.0, versionCode = 10, arm64-v8a, bundled proot / proroot / tawcroot + Pi 1.6.0).
  • Signed with the fixed sideload key — supports seamless in-place upgrade over v0.1.8-2 without losing sessions or configuration.