github agegr/pi-web v0.14.1

3 hours ago

中文

基于 v0.13.0..v0.14.1 的提交整理。v0.14.0 标签打出后发布被取消,没有发布到 npm,也没有 GitHub Release,所以本说明包含自 0.13.0 以来的全部改动。

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

新增

  • 侧聊(side chat):从当前会话分出一个侧聊,在右侧面板标签页里提问,带着主会话的全部上下文,主会话不受影响,运行中也能用。侧聊只保留主会话已有的只读和 shell 类工具(read、bash、grep、find、ls,Windows 上还有 powershell),不能编辑、写文件;只读的主会话分出的侧聊也没有 shell。入口有四个:/side 或 /side <问题>、选中文字后的「在侧聊询问」、运行中输入框旁的侧聊按钮、Agents 面板里的「新建侧聊」。侧聊不出现在侧栏里,在 Agents 列表中和子代理一起显示,第一条提问自动成为它的名字。(#1469,感谢 dingxiaobo;#1502)
  • 选中文字「引用」:选中回答里的文字后,原来的「在这里提问」改为「引用」,只插入 > 选中的文字,不再附带提问模板,提问、纠正、指示都可以接着写;多段引用各自成段。(#1502)
  • Docker 镜像:每个版本会发布 ghcr.io/agegr/pi-web 镜像(linux/amd64、linux/arm64),标签为版本号、主.次 和 latest。仓库附带 Compose 示例,用法和要保留的卷见 docs/docker.md。(#1478,感谢 Misir)
  • 标签页图标显示待处理数量:图标与侧栏的会话状态一致,有会话等待输入时显示琥珀色数字(等待加未读),只有未读时显示蓝色数字,都处理完恢复原图标;页面在后台时完成的会话也会计入。(#1484,感谢 Vlad Sirenko)
  • Git 改动列表可切换树状视图:文件侧栏的改动文件可以按目录树显示,折叠的目录在刷新后保持折叠;默认仍是列表视图,选择会被记住。(#1490,感谢 betago)
  • Markdown 和纯文本文件默认自动换行:文件查看器打开 md、mdx、rst、adoc、txt 等文件时自动换行,代码文件和 .log 仍不换行;手动切换过的选择优先。(#1471,感谢 Brynne Taylor)

改进

  • 扩展消息保留排版:扩展为终端排好的状态(方框、对齐的进度条、缩进的行)以等宽字体显示,保留换行、缩进和空格,箭头和框线字符使用系统等宽字体,与 pi 的 TUI 一致;其中的 HTML 按原文显示。(b25fa0a)
  • Settings › Models 首次打开更快:共享的扩展运行时保留一小时(原来是十分钟),闲置后再打开模型设置不再等所有扩展重新加载(11 个扩展时约 13 秒)。(#1500)
  • 空项目的分组可以置顶:没有会话的项目在「暂无会话」旁显示「置顶以保留」,否则切换项目后它会从侧栏消失。(#1492)
  • 子代理 id 写错时给出候选:get_subagent_result 和 Agent 的 resume 找不到 id 时,会列出本会话最近的最多十个子代理 id 和描述。(#1491)
  • 窄屏手机上的消息操作按钮:宽度不足时只显示图标,不再有按钮被挤出屏幕左边。(#1487,感谢 maximilize)
  • 更多界面文字有了中文翻译:模型选择器的标签和提示、提供商登录过程的提示和替换 API Key 的输入提示。(#1495, #1496,感谢 zs)

修复

  • HTML 预览里的脚本可以使用 localStorage / sessionStorage:沙箱 iframe 访问它们会抛 SecurityError、让脚本停止,现在注入内存版本。(#1494,感谢 zhangdxchn)
  • 设置了网页密码时 PWA 可以安装:manifest 请求带上 cookie,不再因鉴权失败而无法安装。(#1477,感谢 Denis Kazimirov)
  • 工具顺序与 pi CLI 一致:会话启动、重载和切换工具时保留原有工具顺序,提示词与 CLI 相同,切换后的第一轮不再让缓存失效、重新计费。(#1481,感谢 Vlad Sirenko)
  • 在子代理自己的聊天里继续它的运行:服务器重启打断的子代理,在它的聊天框里继续后会正常记录结果并通知父会话,不再一直显示运行中。(#1473,感谢 Brynne Taylor)
  • 斜杠命令补全:搜索时技能的排序按匹配程度,不再被技能是否休眠打乱。(#1497,感谢 zs)
  • 目录选择器:在路径输入框里拖选文字、松手在外面时不再关闭选择器 (#1462,感谢 记得开心一点);进入子目录加载期间不能选中上一个目录 (#1498,感谢 zs)。
  • 添加提供商时,输入法组字中按 Esc 不再关闭提供商选择框。(#1499,感谢 zs)

内部调整

  • 新增 container.yml 工作流,在发布标签上构建并推送 Docker 镜像。(#1478)
  • 发布 npm 包 @agegr/pi-web@0.14.1。

English

Prepared from commits in v0.13.0..v0.14.1. The v0.14.0 tag was pushed but its release was cancelled before reaching npm, and it has no GitHub Release, so these notes cover everything since 0.13.0.

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

Added

  • Side chats: fork the current session into a side chat in a right-panel tab and ask aside with its whole context, while the main chat stays as it is, mid-run too. A side chat keeps only the parent's read and shell tools (read, bash, grep, find, ls, and powershell on Windows), never edit or write; a Read-only parent's side chat gets no shell either. Start one with /side or /side <question>, "Ask in side chat" on selected text, the side chat button beside the composer during a run, or "New side chat" in the Agents panel. Side chats stay out of the sidebar, are listed with subagents in the Agents panel, and are named after their first prompt. (#1469, thanks dingxiaobo; #1502)
  • "Quote" on selected text: the selection popover's "Ask here" becomes "Quote" and inserts just > selected text, with no question template, so it serves questions, corrections and instructions alike; several quotes each start their own paragraph. (#1502)
  • Docker image: each release publishes ghcr.io/agegr/pi-web (linux/amd64, linux/arm64), tagged with the version, major.minor and latest. The repo ships a Compose example; see docs/docker.md for usage and which volumes to keep. (#1478, thanks Misir)
  • Favicon badge: the tab icon mirrors the sidebar rows: an amber count (awaiting plus unread) while a session waits for input, a blue unread count otherwise, and the stock icon once clear. Sessions that finish while the tab is hidden count too. (#1484, thanks Vlad Sirenko)
  • Git changes as a tree: the Files sidebar's changed files can be shown as a folder tree, and collapsed folders stay collapsed across refreshes. The flat list stays the default, and the choice is remembered. (#1490, thanks betago)
  • Prose files wrap by default: the file viewer wraps md, mdx, rst, adoc, txt and similar files; code and .log stay unwrapped, and a toggle you pressed wins. (#1471, thanks Brynne Taylor)

Improved

  • Extension messages keep their layout: a status an extension laid out for a terminal (a box, aligned bars, indented rows) renders in monospace with its line breaks, indents and spaces kept, with arrows and box drawing from a system mono font, as in pi's TUI; HTML in it shows as text. (b25fa0a)
  • Settings › Models opens faster after idle: the shared extension runtime is kept for an hour instead of ten minutes, so the first read no longer waits for every extension to load again (about 13 s with 11 extensions). (#1500)
  • Pin an empty project's group: a project with no sessions shows "Pin to keep" beside "No sessions yet"; otherwise it leaves the sidebar at the next project switch. (#1492)
  • A mistyped subagent id lists candidates: get_subagent_result and Agent's resume add up to ten of the session's latest subagent ids and descriptions when an id finds nothing. (#1491)
  • Message actions on narrow phones show icons only when their labels do not fit, so none sits past the screen edge. (#1487, thanks maximilize)
  • More UI text translated: the model selector's labels and tooltips, provider sign-in feedback and the replace-API-key hint. (#1495, #1496, thanks zs)

Fixed

  • Scripts in the HTML preview can use localStorage / sessionStorage: the sandboxed iframe threw SecurityError and stopped them; an in-memory version is injected now. (#1494, thanks zhangdxchn)
  • The PWA installs behind the web password: the manifest request carries cookies, so it no longer fails auth. (#1477, thanks Denis Kazimirov)
  • Tool order matches the pi CLI: session start, reload and tool changes keep the carried tool order, so the prompt is the CLI's and the first turn after a switch no longer misses the cache and re-bills it. (#1481, thanks Vlad Sirenko)
  • Continuing a subagent from its own chat: a subagent cut off by a server restart and continued in its chat records its result and notifies the parent instead of showing as running forever. (#1473, thanks Brynne Taylor)
  • Slash command completion keeps the search ranking of skills instead of reordering them by dormancy. (#1497, thanks zs)
  • Directory picker: a text drag in the path field that ends outside no longer closes it (#1462, thanks 记得开心一点); the previous folder cannot be selected while a subfolder loads (#1498, thanks zs).
  • Escape during IME composition no longer closes Add provider's picker. (#1499, thanks zs)

Internal

  • New container.yml workflow builds and pushes the Docker image on release tags. (#1478)
  • Published npm package @agegr/pi-web@0.14.1.

Don't miss a new pi-web release

NewReleases is sending notifications on new releases.