中文
基于 v0.18.0..v0.19.0 的提交整理。
npm install -g @agegr/pi-web@latest注意:Pi Web 的页面现在默认只允许同源嵌入 iframe。如果你在其他来源的启动器或门户里嵌入 Pi Web,需要用
PI_WEB_FRAME_ANCESTORS列出这些来源(逗号分隔的 CSP source,例如https://portal.example)。(#1827)
新增
- 用
#引用其他会话:在输入框输入#打开会话选择器,也可以从侧边栏行菜单「插入到对话」或把会话行拖到输入框。引用以 chip 显示,发送时展开为带标题、文件路径的有界对话记录(超长时保留开头和最近部分,中间省略);已发送的引用在对话中折叠为一行,展开后正是模型看到的内容。(#1801,感谢 Hu Xueju;bf81275e、#1825) - 侧边栏按时间排序:工具栏右端的时钟按钮可在按项目分组和「按时间排序」之间切换,后者把所有项目的会话合成一个列表,分为今天、昨天、过去 7 天和更早;运行中的会话位置保持不动。(#1822、587940c8)
- 聊天中的行号链接跳到对应行:
src/app.ts:42、:42:7、:10-20这类链接会在源码视图中定位并高亮对应行;文件查看器的 Git diff 在面板宽度不少于 520px 时左右两栏显示。(#1821,来自 #1792 的建议,感谢 Ymisboy) - 设置 › 通用:
- 折叠的工具步骤显示总费用:折叠时 process 标题汇总其中各步骤的费用。(#1769,感谢 Silvio Rodriguez,来自 synth-mania 的 #1768)
修复
- 安全:页面默认发送
Content-Security-Policy: frame-ancestors 'self'和X-Frame-Options: SAMEORIGIN,其他网站不能再把 Pi Web 嵌入 iframe 诱导点击。(#1827) - 聊天:
README.md:10、app.ts:42这类不带目录的文件名加行号链接可以点击打开。(#1793,感谢 Shani Singh;#1823)- 展开的引用块不再出现嵌套的两个滚动条;skill 和引用会话一样显示为可展开的
[skill] name块;带引用的裸/skill:name也能正确展开。(#1825) - 模型不支持图片、实际看到占位符时,read 卡片会说明,与 pi 1.6.0 的 TUI 一致。(#1800,感谢 Eric(Mingdong) Tan)
- 显示 OpenAI 丢弃的 reasoning 条目及原因,与 pi 1.6.0 的 TUI 一致。(#1756)
- 长对话中屏幕外的行在跳过与恢复之间不再来回抖动。(#1817,修复 #1808)
- 扩展通知不再盖住输入框,在手机上也能正常点击输入框。(#1788,感谢 Shani Singh,修复 #1780)
- 输入框因按钮出现而变窄换行时,末尾光标保持可见。(#1797,感谢 dingxiaobo)
- inline code 中提到标签名后,后面的数学公式仍能正确渲染。(#1782,感谢 Thejesh)
- 子 Agent:手动压缩后恢复的回合会被正确等待 (#1798,感谢 Davy Massoneto);profile 的
extensions列表可以写包名 (#1802,感谢 Davy Massoneto)。 - 模型:
- 文件:
- 会话:读取超大会话文件中的单个条目(延迟加载的图片、thinking)不再整体解析文件、阻塞服务器。(#1816,修复 #1812);fenced 标题读取正文而不是 info string (#1781,感谢 Thejesh)。
- Worktree:子模块的 worktree 归到它的检出目录下,而不是
.git/modules。(#1795,感谢 Shani Singh) - MCP 导入:带环境变量前缀的 CLI 命令行按该 CLI 识别。(#1794,感谢 Shani Singh)
- 离线:设置
PI_OFFLINE时跳过 Pi Web 的更新检查,三处离线判断统一为同一规则。(#1828) - Skills:去掉
npx skills输出中的所有终端转义序列。(#1764) - 浏览器拒绝保存的本地选择在组件重新挂载后保留 (#1773,感谢 Shani Singh);回车发送的选择在多个标签页之间同步 (#1763)。
改进
内部调整
- 合并重复的辅助函数、类型和请求封装(
isRecord、errorMessage、thinking level 列表、MCP 请求、设置请求、刷新缓存、原子写入等)。(#1757–#1767) - 发布 npm 包
@agegr/pi-web@0.19.0和镜像ghcr.io/agegr/pi-web:0.19.0。
English
Prepared from commits in v0.18.0..v0.19.0.
npm install -g @agegr/pi-web@latestNote: Pi Web's pages may now be framed by their own origin only. If a launcher or portal on another origin embeds Pi Web in an iframe, list those origins in
PI_WEB_FRAME_ANCESTORS(comma-separated CSP sources such ashttps://portal.example). (#1827)
Added
- Reference another session with
#: typing#in the composer opens a session picker; the row menu's Insert into chat and dragging a sidebar row onto the composer do the same. A reference shows as a chip and expands at send time into a bounded transcript with its title and file path (an over-long one keeps its beginning and recent end, with the middle omitted); in the transcript a sent reference folds to one line and expands to exactly what the model read. (#1801, thanks Hu Xueju; bf81275, #1825) - Sort the sidebar by date: a clock button at the right end of the sidebar toolbar switches between project groups and Sort by date, one list of every project's sessions under Today, Yesterday, Previous 7 days and Earlier; a running session keeps its place. (#1822, 587940c)
- Line links open at their lines: chat links such as
src/app.ts:42,:42:7or:10-20open the file in Source with those lines centred and marked; the file viewer's Git diff shows old and new side by side when the panel is at least 520px wide. (#1821, from the suggestion in #1792, thanks Ymisboy) - Settings › General:
- Steering mode and Follow-up mode, pi's
steeringModeandfollowUpMode, applied to open sessions at once; a project's.pi/settings.jsonstill wins. (#1818, #1819) - Network proxy: set
httpProxyin pi's globalsettings.jsonfrom the web UI. (#1811, thanks Gelly) - Notices: one switch for each of pi 1.6.1's
notices.cacheMisses,cacheWarming,compactionCostsandreasoningDrops. (#1824)
- Steering mode and Follow-up mode, pi's
- Folded tool steps show their total cost: a folded process header sums the cost of the steps inside it. (#1769, thanks Silvio Rodriguez, for #1768 by synth-mania)
Fixed
- Security: pages now send
Content-Security-Policy: frame-ancestors 'self'andX-Frame-Options: SAMEORIGIN, so other sites can no longer frame Pi Web and steer clicks into it. (#1827) - Chat:
- Links to a bare file name with a line suffix, such as
README.md:10orapp.ts:42, can be clicked. (#1793, thanks Shani Singh; #1823) - An expanded quote no longer shows two nested scrollbars; a skill shows as an expandable
[skill] nameblock like a quoted session; a bare/skill:namesent with a reference expands correctly. (#1825) - A read card says when the model saw a placeholder instead of an image, as pi 1.6.0's TUI does. (#1800, thanks Eric(Mingdong) Tan)
- OpenAI's dropped reasoning items are reported with their reasons, as pi 1.6.0's TUI does. (#1756)
- Rows in a long transcript no longer flicker between skipped and laid out. (#1817, fixes #1808)
- Extension notices stay above the composer, so it can be tapped on a phone. (#1788, thanks Shani Singh, fixes #1780)
- The end caret stays in view when the composer narrows and re-wraps. (#1797, thanks dingxiaobo)
- Math after a tag named in inline code renders again. (#1782, thanks Thejesh)
- Links to a bare file name with a line suffix, such as
- Subagents: a turn that resumes after manual compaction is waited for (#1798, thanks Davy Massoneto); a profile's
extensionslist accepts package names (#1802, thanks Davy Massoneto). - Models:
- Files:
- Sessions: reading one entry (a lazy image or thinking block) of an oversize session file no longer parses the whole file and blocks the server (#1816, fixes #1812); a fenced title reads its body, not its info string (#1781, thanks Thejesh).
- Worktrees: a submodule's worktrees group under its checkout, not
.git/modules. (#1795, thanks Shani Singh) - MCP import: a CLI's command line behind environment assignments is read as that CLI. (#1794, thanks Shani Singh)
- Offline: with
PI_OFFLINEset, Pi Web's update check is skipped, and all three offline checks follow one rule. (#1828) - Skills: every terminal escape is stripped from
npx skillsoutput. (#1764) - A choice the browser refused to save survives a remount (#1773, thanks Shani Singh); the Enter-to-send choice follows other tabs (#1763).
Improved
- pi upgraded to 1.6.1: a
!command whose truncated output could not be saved now says why. See pi v1.6.1 for the full list. (#1824)