github agegr/pi-web v0.16.0

one hour ago

中文

基于 v0.15.0..v0.16.0 的提交整理。

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

新增

  • 支持 pi 内置的 llama.cpp 提供商:Settings › Models 可以添加 llama.cpp,表单默认使用 pi 的地址 http://127.0.0.1:8080,并带有官方图标。(#1629,感谢 Julien Chaumond)
  • 工具菜单里逐个开关内置工具:预设下方列出内置工具复选框,例如只启用 read 和 grep,不必编辑 settings.json;不对应任何预设的组合显示为 Custom,刷新后保留,新会话也沿用。(#1612,感谢 Yannik)
  • 会话搜索按空格分词匹配:alpha beta 匹配同时包含两个词的会话(顺序不限),用双引号括起的部分仍按完整短语匹配。(#1616,感谢 fallleave001)
  • 搜索结果显示项目名:选中结果后展开所在项目分组并定位到该会话。(#1582,感谢 花菜)
  • 侧栏总是滚动到当前会话:无论通过点击、搜索、Fork、?session= 链接、刷新、通知还是 Agents 切换器打开,会话行都会出现在视野内,必要时展开折叠的分组或置顶区。(#1614,感谢 Yejia Mo)
  • 已读状态跨浏览器同步:在一个浏览器里真正看过的会话,其他浏览器里的未读圆点也会消失;只有可见、聚焦且最近有操作的页面才算已读。(#1618)
  • ! 命令实时显示输出:长时间运行的 !npm test 在执行过程中就能看到输出;运行中输入 ! 命令会在旁边直接执行,而不是作为引导消息发给模型;扩展的 user_bash 处理器(沙箱、远程主机等)在命令执行前会先被调用。(#1531, #1541)
  • 消息上的「New session」带上这条消息:新会话的输入框预填被 Fork 的消息,与 pi 的 /fork 一致;扩展的 session_before_fork 处理器会先被询问。(#1539, #1540)
  • 自定义提供商可编辑显示名称:提供商面板新增 Display name 字段,原来的键改称「Provider ID」。(#1608, 1c2ccec)
  • 拉取模型列表时读取更多字段:reasoning_levels、价格(换算为每百万 token 的美元)和输入模态(text/image)。(#1547,感谢 dingxiaobo)
  • 目录选择器跟随输入的路径:输入路径稍停后自动浏览该目录,无需再点 Go。(#1550,感谢 jianYanZhiX7)
  • diff 视图语法高亮:文件 diff 中新增、删除和上下文行的代码都按语言着色。(#1594,感谢 David Wang)

修复

  • Stop 的行为与 TUI 一致:被中断的回复在用量行开头标注「Stopped」;Stop 会清空队列并把排队的消息放回输入框,不再被继续发送。(#1533, 6affd90, #1576,感谢 Silvio Rodriguez)
  • 扩展兼容:扩展加载失败、警告和 session_start 出错会以通知显示;setEditorText 替换草稿、pasteToEditor 在光标处插入;扩展在空闲时发送的消息立即显示;ctx.shutdown() 期间 Stop 仍然可用;自定义面板中 pi-tui 的假光标标记被去掉。(#1536, #1537, #1538, #1564,感谢 GaryCCCC;#1601,感谢 Qiaochu Hu)
  • 压缩摘要失败时显示重试等待和错误,不再一直显示「Compacting…」;压缩后输入框保持焦点。(#1542;#1556,感谢 Vvvvergram)
  • 工具卡片:运行中的工具显示已用时间;未出结果的 edit 调用展开即可预览 diff;参数为对象列表时不再显示 [object Object];折叠的 grep 卡片显示搜索模式;扩展通知中的链接可点击。(#1606, #1633, #1535;#1620,感谢 zs)
  • 子代理:排队中的子代理会话不再因空闲超时被释放;子代理沿用父会话的项目信任设置。(#1607, #1613)
  • MCP:空闲释放后再次连接时,tool_search 加载过的延迟工具会重新激活。(#1634)
  • Code mode:启动时的短暂卡顿不再让 Code mode 在整个进程内被关闭。(#1632)
  • 模型:Test model 的探测请求与聊天请求的准备方式相同(修复 opencode.ai 返回 400 MissingSessionID)。(#1605)
  • 登录:SSE 连接关闭后的迟到回调不再导致服务器崩溃。(#1617,感谢 laiceshide)
  • 文件:大量未跟踪文件时统计行数不再阻塞服务器;Windows 上 /d/…、/mnt/d/…、/cygdrive/d/… 形式的路径解析为正确的盘符;重新打开或回到页面时预览会刷新。(#1609;#1598,感谢 SongOnRoc;#1592,感谢 Wanqi Chen 和 wowayou)
  • 导出:每次导出使用独立的私有临时目录,多用户共用主机时不再失败。(#1626,感谢 离离)
  • 终端:Windows 上关闭终端不再因信号报错。(#1602)
  • 启动:在拒绝读取网卡列表的沙箱中也能启动。(#1603)
  • 剪贴板:/copy 在非安全上下文(局域网 HTTP)下也能复制;浏览器拒绝复制时不再显示「Copied」。(649f895;#1578,感谢 xcdmr)
  • 输入框:达到最大高度后输入时不再跳回顶部。(#1568,感谢 dingxiaobo)
  • 流式 token 计数去掉了过宽的最小宽度。(#1604)
  • 代码块行号不再被选中复制。(#1596,感谢 itachi)
  • 输入法:目录对话框、插件来源输入框和技能搜索在输入法组字时正确处理 Escape 和回车;标签页的会话用量摘要已翻译。(#1621, #1622, #1623, #1624,感谢 zs)

改进

  • 流式输出长代码块时不再每个 chunk 重新解析和重排。(#1589,感谢 Levy)

内部调整

  • 升级 pi 到 1.5.2(修复 MCP 登录;连续的缓存预热合并为一行「Cache warmed」)。(e911f7b)
  • 发布 npm 包 @agegr/pi-web@0.16.0 和镜像 ghcr.io/agegr/pi-web:0.16.0。

English

Prepared from commits in v0.15.0..v0.16.0.

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

Added

  • pi's built-in llama.cpp provider: add llama.cpp in Settings › Models; the form defaults to pi's http://127.0.0.1:8080 and shows the official icon. (#1629, thanks Julien Chaumond)
  • Switch built-in tools one by one in the tool menu: the built-in tools are listed as checkboxes below the presets, so a session can run with only read and grep without editing settings.json. A set no preset matches shows as Custom, survives a reload, and is what a fresh composer starts with. (#1612, thanks Yannik)
  • Session search matches every space-separated term: alpha beta finds sessions containing both words in any order; a double-quoted run is still one exact phrase. (#1616, thanks fallleave001)
  • Search results name the project: picking a result opens its project group and reveals the session. (#1582, thanks 花菜)
  • The sidebar reveals the open session however it was opened: a row click, a search pick, a fork, a ?session= link, a reload, a notification or the Agents switcher; folded groups or the pinned section open when they hide the row. (#1614, thanks Yejia Mo)
  • Reads shared across browsers: a session someone actually looked at in one browser clears its unread dot in the others; only a visible, focused page with a recent input counts. (#1618)
  • A ! command's output while it runs: a long !npm test shows its output as it comes. A ! command typed during a run runs beside it instead of being steered to the model as text, and extensions' user_bash handlers (sandboxes, remote hosts) are asked first. (#1531, #1541)
  • A message's New session starts with that message in the composer, as pi's /fork does; extensions' session_before_fork handlers are asked first. (#1539, #1540)
  • Edit a custom provider's display name: the provider panel has a Display name field, and the key is now labeled "Provider ID". (#1608, 1c2ccec)
  • Fetching models reads more fields: reasoning_levels, pricing (scaled to dollars per million tokens) and input modalities (text/image). (#1547, thanks dingxiaobo)
  • The directory picker follows the typed path: after a short pause it browses the typed folder, no Go needed. (#1550, thanks jianYanZhiX7)
  • Syntax highlighting in the diff view: added, removed and context lines are colored by language. (#1594, thanks David Wang)

Fixed

  • Stop behaves like the TUI: a stopped reply's usage line starts with "Stopped"; Stop clears the queue and puts queued messages back in the composer instead of sending them. (#1533, 6affd90, #1576, thanks Silvio Rodriguez)
  • Extension compatibility: extension load errors, warnings and session_start throws show as notices; setEditorText replaces the draft and pasteToEditor inserts at the caret; a message an extension sends while idle shows at once; Stop works while ctx.shutdown() is pending; pi-tui fake cursor markers are stripped from custom panels. (#1536, #1537, #1538, #1564, thanks GaryCCCC; #1601, thanks Qiaochu Hu)
  • A failing compaction summary shows its retry wait and error instead of "Compacting…" throughout; the composer keeps focus through compaction. (#1542; #1556, thanks Vvvvergram)
  • Tool cards: a running tool shows its elapsed time; a pending edit call previews its diff from its arguments; a list-of-objects argument no longer reads [object Object]; collapsed grep cards show the pattern; links in extension notices are clickable. (#1606, #1633, #1535; #1620, thanks zs)
  • Subagents: a queued child's session is no longer released by the idle timer; a child runs on its parent session's project trust. (#1607, #1613)
  • MCP: deferred tools that tool_search loaded come back after an idle release. (#1634)
  • Code mode: a startup stall no longer turns Code mode off for the whole process. (#1632)
  • Models: Test model prepares its probe like a chat request (fixes opencode.ai's 400 MissingSessionID). (#1605)
  • Sign-in: a late callback after the SSE stream closed no longer crashes the server. (#1617, thanks laiceshide)
  • Files: counting untracked lines no longer blocks the server; Windows shell-style paths (/d/…, /mnt/d/…, /cygdrive/d/…) resolve to the native drive; previews refresh on reopen and focus. (#1609; #1598, thanks SongOnRoc; #1592, thanks Wanqi Chen and wowayou)
  • Export uses a private temp directory per run, so it works on hosts shared by several users. (#1626, thanks 离离)
  • Terminal: closing a Windows terminal no longer throws on signals. (#1602)
  • Startup works inside a sandbox that denies the network interface list. (#1603)
  • Clipboard: /copy works on non-secure origins (LAN HTTP); a refused copy no longer reports Copied. (649f895; #1578, thanks xcdmr)
  • Composer: typing at max height no longer jumps the scroll to the top. (#1568, thanks dingxiaobo)
  • The streaming token count drops its wide minimum width. (#1604)
  • Code line numbers are left out of a selection. (#1596, thanks itachi)
  • IME: directory dialogs, the plugin source input and skill search handle Escape and Enter while composing; tab session usage summaries are translated. (#1621, #1622, #1623, #1624, thanks zs)

Improved

  • Streaming a long code fence no longer reparses or relays it out on every chunk. (#1589, thanks Levy)

Internal

  • Upgraded pi to 1.5.2 (MCP sign-in fixes; back-to-back cache warms are one "Cache warmed" line). (e911f7b)
  • Published npm package @agegr/pi-web@0.16.0 and image ghcr.io/agegr/pi-web:0.16.0.

Don't miss a new pi-web release

NewReleases is sending notifications on new releases.