npm @agegr/pi-web 0.12.2
v0.12.2

5 hours ago

中文

基于 v0.12.1..v0.12.2 的提交整理。

npm install -g @agegr/pi-web@latest

新增

  • 更多主题,按色块挑选:新增暖沙、丁香、暮紫、余烬、岩蓝、高对比浅色、高对比深色和 Zenburn。设置里每个主题都画成它自己颜色的色块,浅色和深色按色调上下对齐,一眼就能比较。高对比主题的文字在所有背景上都达到 WCAG AAA。(#1269)
  • 终端可以单独切换深浅色:终端标题栏的太阳/月亮按钮只切换终端本身,不影响应用主题;切换时 shell 和正在输出的内容不会中断,选择按浏览器记住。(#1268, #1270)
  • 看到每轮回答花了多久:一轮结束后,过程折叠行(没有过程时在回答下方)显示「耗时 45s」,刷新页面后也一样。(#1222,感谢 CiereMars)
  • 缓存与费用提示:打开设置 › 常规里的「显示缓存与费用提示」(即 pi 的 showCacheMissNotices)后,聊天里会像 pi 的 TUI 一样提示缓存未命中及重新计费的 token、缓存预热、压缩和分支摘要的费用,以及 Anthropic 丢弃思考块。折叠起来的过程行会汇总其中的缓存未命中。(#1265, #1267)
  • Agents 切换器显示每个代理的用量:主代理和每个子代理都显示活跃时长、token 数和费用,标题处给出合计,子代理花了多少一目了然。子代理那一行旁边新增侧栏按钮,一键打开或关闭它的只读记录标签页。(972b02d, 4b529b4)
  • 归档视图可以按项目折叠和批量处理:每个项目可以折叠(Alt+点击折叠全部);项目的 ⋯ 可以恢复或删除该项目的已归档会话;归档栏的 ⋯ 可以全部恢复(可撤销)、删除全部或删除 30 天前归档的会话,删除前会告诉你数量。项目菜单的「查看已归档」会直接跳到该项目。(49c9ca8)
  • 在新标签页打开项目:项目分组的 ⋯ 菜单新增「在新标签页打开」(T),在新标签页开一个同目录的新对话,原标签页不受影响。(#1208,感谢 xcg)
  • 把文件拖进文件树上传:从系统文件管理器把文件拖到侧栏文件树里的某个文件夹上,就会上传到那个文件夹;拖到空白处则上传到项目根目录。(#1192,感谢 dingxiaobo)
  • 在设置里改模型的上下文窗口:设置 › 模型里,内置提供商的每个模型行多了一个上下文窗口输入框,留空即使用默认值。(#1221,感谢 22zyfeng-collab)
  • 更多文件类型有语法高亮:源码视图新增 PHP、Lua、Dart、Vue、INI、PowerShell、批处理、Protobuf、diff 等 30 多种扩展名的高亮,.tsx/.jsx 的 JSX 标签也有颜色了。(#1197, #1243)
  • 技能说明里的相对链接可以点开:设置 › 技能中,技能说明里指向同目录其他 Markdown 文档的链接会直接在详情里打开,带「返回」按钮。(#1234,感谢 tammelin)

改进

  • 模型思考很长时页面不再卡死:模型陷入长篇思考时,展开的思考内容会分段渲染,即使流出几 MB 文字,页面也能保持流畅。(#1196)
  • 设置打开更快:装了多个扩展时,打开设置 › 技能、设置 › 模型等不再每次重新加载所有扩展,从一两秒变为几乎瞬开。(#1226)
  • 大会话运行时侧栏依旧流畅:会话文件很大时(上百 MB),运行期间刷新会话列表只读新增的部分,不再每次从头扫描。(#1259, #1264)
  • 页面加载的数据更少:发给浏览器的消息里去掉了提供商的签名字段,长会话打开和刷新更轻。(#1193,感谢 nannant666)
  • 滚动边缘淡出:会话列表、文件树、代码块和表格在还有内容可滚动的一侧淡出,提示后面还有东西。深色主题在 macOS 上的文字不再显得发粗。(e070e0b)
  • 横向滚动代码时行号固定:文件查看器里横向滚动长行时,行号停在左侧不动,不会跟着滚走。(#1200,感谢 Brynne Taylor)
  • 过程折叠行去掉了「处理详情」字样,只保留摘要;项目 ⋯ 菜单从四组精简为三组。(56f71d9)

修复

  • 回合结束时消息不再「跳一下」:此前一轮结束、会话文件重新读取时,刚发出的消息、展开的思考和工具输出会重新挂载,滚动位置和展开状态被重置;现在都保持原样。(#1184)
  • 扩展起的会话名立刻出现在侧栏:pi-autoname 等扩展在回答结束后才设置标题时,侧栏和当前会话的标题会马上更新,不用等别的操作触发刷新。(#1237, #1246)
  • 默认模型来自扩展时,新会话也用它:默认模型属于启动时才注册的扩展提供商时,新会话不再停在别的模型上,思考级别也和 pi 启动时一致。(#1240, #1262)
  • defaultTools 里没有 bash 时,bash 就保持关闭:此前像 ["codemode"] 或 "-bash" 这样的配置在 Pi Web 里仍会给模型 bash,现在与 pi CLI 一致。(#1235, #1245)
  • 慢速或走代理的网络更稳:连接时给每次尝试 2 秒(与 pi CLI 相同),高延迟线路不再过早放弃;通过 HTTP 代理访问 http:// 的提供商时,配置的 httpIdleTimeoutMs 生效,卡住的流会按设置的时间断开。(#1261, #1253,感谢 QuickLyx)
  • 在包含多个 git 仓库的普通文件夹里开会话时,改动文件也能看到 diff。(#1236,感谢 Val.)
  • 右侧面板标签页过多出现滚动条时,标签不再被截掉上半部分。(#1225, #1242)
  • 「新建工作树…」表单出现时,光标落在分支名输入框,而不是上面的筛选框。(#1203,感谢 dingxiaobo)
  • 在禁用网站存储的浏览器里,读写提示音和思考展开偏好不再让页面出错。(#1258,感谢 Jakob)
  • 子代理:
    • 后台子代理刚结束时查结果不再报「Subagent not found」,还没开始就被停止的运行也能查到。(#1198,感谢 Brynne Taylor)
    • 隔离运行的工作树被删除后,不再能「恢复」该子代理在一个不存在的目录里继续跑;父代理会被告知工作树是已删除(提交保留在分支上)还是因未提交文件而保留。(#1202)
    • 传给子代理的 input_files 按子代理模型的上下文窗口限制大小,子代理不会一开局就被迫压缩。(#1199)

内部调整

  • 新增贡献指南 CONTRIBUTING.md(附中文版),说明 Pi Web 的定位和范围;中、日、俄文 README 移到 docs/ 下。
  • 测试稳定性修复(Node 22 测试运行器、Windows 模块路径、CI 计时)。
  • 发布 npm 包 @agegr/pi-web@0.12.2。

English

Prepared from commits in v0.12.1..v0.12.2.

npm install -g @agegr/pi-web@latest

Added

  • More themes, picked by swatch: Sand, Lilac, Dusk, Ember, Slate, High contrast light, High contrast dark and Zenburn. Settings draws each theme as a swatch in its own colors, with light and dark rows lined up by hue so they are easy to compare. The high-contrast themes reach WCAG AAA for text on every surface. (#1269)
  • A light/dark switch for the terminal alone: the sun/moon button in the terminal header switches the terminal without touching the app theme; the shell and its output keep running, and the choice is remembered per browser. (#1268, #1270)
  • See how long each turn took: a finished turn shows e.g. "took 45s" on its Process details line (or under the answer when there is none), and still does after a reload. (#1222, thanks CiereMars)
  • Cache and cost notices: turn on "Show cache and cost notices" in Settings › General (pi's showCacheMissNotices) and the chat shows the TUI's notices: cache misses and the tokens re-billed, cache warming, compaction and branch-summary cost, and Anthropic dropping thinking blocks. A folded Process details line adds up the cache misses inside it. (#1265, #1267)
  • Usage per agent in the Agents switcher: the main agent and every sub-agent show active time, tokens and cost, with a total in the header, so sub-agent spend is visible at a glance. Each sub-agent row also gets a side-panel button that opens or closes its read-only transcript tab. (972b02d, 4b529b4)
  • Fold and bulk-manage the archive by project: each project folds (Alt+click folds all); a project's ⋯ restores or deletes its archived sessions; the archive bar's ⋯ restores all (with Undo), deletes everything archived, or deletes what was archived over 30 days ago, each delete showing a count first. A project menu's View archived jumps straight to that project. (49c9ca8)
  • Open a project in a new tab: the project group's ⋯ menu gets "Open in new tab" (T), a new chat in the same directory in another browser tab, leaving the current one as it is. (#1208, thanks xcg)
  • Drag files into the file tree to upload: drop files from your file manager onto a folder in the sidebar's file tree to upload them there; drop on empty space to upload to the project root. (#1192, thanks dingxiaobo)
  • Edit a model's context window in Settings: in Settings › Models, each model of a built-in provider gets a context-window field; leave it blank for the default. (#1221, thanks 22zyfeng-collab)
  • Highlighting for more file types: the source view now highlights 30+ more extensions, including PHP, Lua, Dart, Vue, INI, PowerShell, batch files, Protobuf and diffs, and colors JSX tags in .tsx/.jsx. (#1197, #1243)
  • Follow relative links in a skill's instructions: in Settings › Skills, a link to another Markdown file in the skill's folder opens in place, with a Back button. (#1234, thanks tammelin)

Improved

  • No more freezes on very long thinking: expanded thinking renders in pieces, so a model that streams megabytes of thinking no longer locks up the page. (#1196)
  • Faster Settings: with several extensions installed, opening Settings › Skills, Settings › Models and similar views no longer reloads every extension each time; they open almost instantly instead of taking a second or two. (#1226)
  • The sidebar stays smooth on huge sessions: while a large session (hundreds of MB) runs, refreshing the session list reads only what was appended instead of rescanning the whole file. (#1259, #1264)
  • Lighter page loads: provider signatures are left out of the messages sent to the browser, so long sessions open and refresh with less data. (#1193, thanks nannant666)
  • Fading scroll edges: the session list, file tree, code blocks and tables fade on the side that has more to scroll. Text in the dark theme no longer looks heavy on macOS. (e070e0b)
  • Line numbers stay put when scrolling code sideways: in the file viewer, the line-number gutter stays pinned on the left while you scroll a long line. (#1200, thanks Brynne Taylor)
  • The process fold drops its "Process details" label and keeps just the summary; the project ⋯ menu goes from four groups to three. (56f71d9)

Fixed

  • Messages no longer jump when a turn ends: when the session file was read again at the end of a run, the just-sent message, open thinking and tool output were remounted, losing their scroll position and open state. They now stay as they are. (#1184)
  • Session names from extensions show up right away: when an extension such as pi-autoname sets a title after the answer, the sidebar and the open chat update immediately instead of waiting for something else to refresh the list. (#1237, #1246)
  • New sessions use a default model that comes from an extension: when the default model belongs to a provider an extension registers at startup, a new session no longer stays on another model, and its thinking level matches what pi would start with. (#1240, #1262)
  • bash stays off when defaultTools leaves it out: configs such as ["codemode"] or "-bash" used to still give the model bash in Pi Web; it now matches the pi CLI. (#1235, #1245)
  • Steadier on slow or proxied networks: each connection attempt gets two seconds, as in the pi CLI, so high-latency routes are no longer given up on too early; and through an HTTP proxy to an http:// provider, the configured httpIdleTimeoutMs now applies, so a stalled stream is cut when you set it to be. (#1261, #1253, thanks QuickLyx)
  • Sessions started in a plain folder holding several git repositories now show diffs for changed files. (#1236, thanks Val.)
  • When the right panel has more tabs than fit, the tabs are no longer cut off at the top. (#1225, #1242)
  • The "New worktree…" form puts the cursor in the branch-name field, not the filter above it. (#1203, thanks dingxiaobo)
  • In browsers that block site storage, the sound and thinking-expansion preferences no longer break the page. (#1258, thanks Jakob)
  • Sub-agents:
    • Asking for a background sub-agent's result right after it finished no longer says "Subagent not found", including for runs stopped before they began. (#1198, thanks Brynne Taylor)
    • A sub-agent whose isolated worktree was removed can no longer be resumed into a missing folder, and the parent is told whether the worktree was removed (its commits kept on the branch) or kept because of uncommitted files. (#1202)
    • input_files passed to a sub-agent are limited by the child model's context window, so the child no longer has to compact before it starts. (#1199)

Internal

  • Added a contributing guide, CONTRIBUTING.md (with a Chinese copy), describing Pi Web's scope; the Chinese, Japanese and Russian READMEs moved under docs/.
  • Test stability fixes (Node 22 test runner, Windows module paths, CI timing).
  • Published npm package @agegr/pi-web@0.12.2.

Don't miss a new pi-web release

NewReleases is sending notifications on new releases.