中文
v0.9.2 重点改善了模型管理、长会话性能、多标签页体验,以及子代理运行的可靠性。同时补齐了一批文件查看、上传、插件管理和跨平台兼容问题。
Important
如果 Pi Web 可从公网访问,建议尽快升级。旧版使用的 Next.js 版本存在无需登录即可在服务器上执行代码的安全漏洞;本版已升级到 Next.js 16.3.5 并关闭不必要的图片处理入口。
升级
直接运行最新版:
npx @agegr/pi-web@latest或更新全局安装:
npm install -g @agegr/pi-web@latest模型管理更直观
- 现在可以直接在 设置 → 模型 中启用或停用单个模型,也可以按模型服务商批量操作,不再需要手动编辑配置文件。已有选择、思考级别设置和暂时不可用的条目会被尽量保留;项目级配置存在时,界面会明确提示当前设置只读。(#930)
- 新增 刷新模型列表 按钮。模型服务商发布新模型后,可以立即获取最新列表,无需等待 Pi Web 更新,也无需先运行 Pi 命令行工具;离线模式下会给出明确提示。(#938)
- 由扩展添加的模型服务商现在也会出现在模型设置和登录页面中,可以正常管理其 API Key。(#833)
- 新增 OpenCode Go 用量与额度展示;较早的用量数据会显示“多久前更新”,避免把旧数据误认为当天数据。(#844, 8b084d3)
长会话更快、更完整
- 会话列表会先显示已有信息,再在后台补充尚未读取的详情;会话搜索不会因为后台活动而反复刷新和重新排序。切回最近打开的会话时,会立即恢复已经加载的内容,也不会丢掉用户手动加载过的更早记录。(#940)
- 自动生成会话名称时,不再把整段历史和所有工具输出发送给模型。在 120 轮会话的基准中,模型输入量从约 74,000 token 降到约 1,700,耗时从约 3.8 秒降到约 1.3 秒。(#807)
- 加载长会话时,现在按用户实际能看到的消息计算分页,不会再让大量隐藏的工具记录挤占首屏。一个包含 15 条用户消息、562 条内部记录的真实会话,旧版首屏只显示 1 条用户消息;本版不再出现这种情况。(#810)
- 每个浏览器标签页会分别记住自己打开的会话。刷新一个标签页时,不会再被另一个标签页最近打开的会话带走。(#887)
- 从 Pi 命令行或另一个 Pi 进程写入同一会话的内容,在重新打开或刷新会话后可以正确显示。(#796)
对话与文件操作更顺手
- 侧栏中的会话列表与文件列表可以拖动分隔线调整高度。文件查看器也可以临时展开到全宽,退出后会恢复原来的布局和预览状态。(#825, #790)
- 离开对话底部后,会出现“滚动到最新”按钮。聊天滚动条也更清晰、更容易拖动;把鼠标放到右侧会话导航条上时,可以看到每轮调用了多少次工具。(#845, #932, #939)
- 发送前可以预览图片附件。工具返回的截图或生成图片即使在工具卡片折叠时也会保持可见,点击 Markdown 图片还可以打开大图预览。(#735, #826)
- GPT 通过
apply_patch修改文件时,会显示文件名和左右对照的代码差异,不再只显示原始数据;用户手动展开的工具卡片在回复继续生成时也不会自动收起。(#744, #743) - 当回复因为模型输出上限而被截断时,消息下方会显示明确提示,不再像正常结束一样静默停止。运行过程中也会继续显示本轮实际使用的思考级别。(#830, #777)
- 新增
/auto-compact命令,可直接在聊天中开启或关闭当前会话的自动压缩。(#828) - PDF 链接中的页码现在会被保留,例如
report.pdf#page=12会直接打开第 12 页。超过 10 MB 的上传也不再被中间层提前截断,可使用 Pi Web 原有的单次 100 MB 上传额度。(#841, #846) - “已修改文件”列表新增快捷引用按钮,可一键把文件路径插入输入框;较长路径会保留完整文件名,便于区分。(#853)
子代理更可控
这里的“子代理”指主对话派出去独立处理一项工作的任务。
- 可以单独停用
general-purpose、explore或plan等内置子代理,无需复制和维护一份内置配置。(#934) - 后台子代理的结果只会交付一次:如果主代理已经主动取得结果,完成通知不会再触发一次重复处理。(#937)
- 后台子代理的报告不会再被误当作用户的新指令,因此压缩长会话时不会污染用户目标;完成通知也不会再让前面的回复从当前视图中消失。(#935, #891)
- 模型服务报错时,子代理会正确显示失败原因,不再误报为成功但没有输出。前台子代理完成后也会返回会话 ID,方便继续或恢复该任务。(#886, #847)
稳定性、兼容性与安全
- 新会话现在会遵循 Pi 配置中的默认工具,不再静默替换成 Pi Web 内置的四项工具;只有用户明确选择工具预设时才会覆盖配置。(#936)
- 修复回复生成时首段文字、思考内容或工具参数短暂重复的问题,以及开发模式下切回正在运行的会话时,实时内容偶尔要等刷新后才出现的问题。(#835, #933)
- 安装为网页应用后,如果服务器端口仍可连接但服务没有响应,页面最多等待 8 秒便会显示离线页,不再无限白屏。(#879)
- Windows 上的 npm 插件更新检查和路径处理已修复,并支持通过 Windows 网络共享路径打开文件;RISC-V 设备的启动兼容性也得到改善。(#837, #827, c04bab7, #823)
- 创建 Git 工作树(并行检出目录)时,大型仓库有更充足的处理时间;本地没有目标分支时,会优先从已有的远程跟踪分支创建。(#732)
- 升级 Next.js 至 16.3.5,修复两个无需登录即可利用的远程代码执行漏洞。Web 登录连续失败时会从 1 秒开始逐步延长等待时间,最长 60 秒;从外部页面返回 Pi Web 时也不会再轻易丢失登录状态。(e5a2434, 20ad98b, #818)
- 服务重启时会主动关闭仍在等待实时消息的连接,避免旧进程卡住并造成 502。(#809)
其他改进
English
v0.9.2 focuses on easier model management, faster large sessions, better multi-tab behavior, and more reliable subagents. It also includes file-viewing, upload, plugin, platform, and security fixes.
Important
Upgrade promptly if Pi Web is reachable from the public internet. The Next.js versions used by earlier releases contained vulnerabilities that allowed code execution on the server without authentication. This release upgrades to Next.js 16.3.5 and disables an unnecessary image-processing endpoint.
Upgrade
Run the latest version directly:
npx @agegr/pi-web@latestOr update a global installation:
npm install -g @agegr/pi-web@latestEasier model management
- Models can now be enabled or disabled directly from Settings → Models, individually or by model service, without editing configuration files by hand. Existing selections, reasoning-level settings, and temporarily unavailable entries are preserved where possible; project-level overrides are clearly shown as read-only. (#930)
- A new Refresh catalog action fetches recently released models that are not bundled with the current Pi Web version. There is no longer a need to wait for another Pi Web release or run the Pi CLI first; offline mode is reported clearly. (#938)
- Model services added by extensions now appear in Models settings and authentication screens, including API-key management. (#833)
- OpenCode Go usage and quota information is now available. Older usage snapshots show relative time so they are not mistaken for data from today. (#844, 8b084d3)
Faster, more complete large sessions
- The session list can show known information first and fill in uncached details in the background. Search results no longer keep refreshing and reordering during agent activity. Returning to a recent session restores loaded content immediately and keeps any earlier history the user already requested. (#940)
- Automatic session naming no longer sends the full history and every tool result to the model. In the 120-turn benchmark, model input dropped from about 74,000 tokens to 1,700 and elapsed time dropped from about 3.8 seconds to 1.3 seconds. (#807)
- Long-session pagination now counts messages that are actually visible. In one real session with 15 user messages and 562 internal records, the old first page showed only one user message; this release no longer lets hidden tool data crowd the conversation out. (#810)
- Each browser tab remembers its own open session. Reloading one tab no longer sends it to whichever session another tab opened most recently. (#887)
- Content written to a session by the Pi CLI or another Pi process is now visible after reopening or refreshing that session. (#796)
Better chat and file workflows
- The session and file lists in the sidebar can be resized by dragging their divider. The file viewer can also expand to full width and return to the previous layout without reloading the preview. (#825, #790)
- A jump-to-latest button appears after scrolling away from the bottom. Chat scrollbars are now visible and easier to grab, and the conversation navigator shows the number of tool calls in each turn. (#845, #932, #939)
- Image attachments can be previewed before sending. Screenshots and generated images remain visible when a tool card is collapsed, and Markdown images can be opened in the full-screen preview. (#735, #826)
- File changes made through
apply_patchnow show file names and side-by-side code differences instead of raw data. Tool cards opened by the user also remain open while the response continues. (#744, #743) - Replies cut off by a model's output limit now show a clear warning instead of looking normally complete. The active reasoning level also remains visible while a turn is running. (#830, #777)
- The new
/auto-compactcommand toggles automatic conversation compaction for the current session. (#828) - PDF links keep their requested page, so
report.pdf#page=12opens directly on page 12. Uploads above 10 MB are no longer cut off by the proxy layer and can use Pi Web's existing 100 MB per-upload allowance. (#841, #846) - Changed-file rows now have a shortcut for inserting the file path into the composer, and long paths preserve the full file name. (#853)
More controllable subagents
A subagent is a task delegated by the main conversation to work independently.
- Built-in subagents such as
general-purpose,explore, andplancan be disabled individually without copying and maintaining their definitions. (#934) - Background results are delivered only once. If the parent agent already collected a result, the completion notification no longer starts another turn with the same result. (#937)
- Background reports are no longer mistaken for new user instructions, preventing them from changing the user's recorded goals during conversation compaction. Completion notifications also no longer hide earlier replies from the current view. (#935, #891)
- Model-service errors now mark subagent runs as failed and preserve the reason, instead of reporting success with no output. Foreground completions also include the subagent session ID so the run can be resumed later. (#886, #847)
Reliability, compatibility, and security
- New sessions now inherit Pi's configured default tools instead of silently replacing them with Pi Web's four-tool preset. A tool preset overrides that configuration only after the user explicitly selects one. (#936)
- Fixed the first streamed text, reasoning, or tool-input chunk briefly appearing twice. In development mode, returning to a running session now resumes live output immediately instead of waiting for a page refresh. (#835, #933)
- An installed web app now waits at most eight seconds before showing its offline page when the server accepts a connection but never responds, instead of remaining blank indefinitely. (#879)
- Fixed npm plugin update checks and path handling on Windows, preserved Windows network-share paths, and improved RISC-V startup compatibility. (#837, #827, c04bab7, #823)
- Git worktree creation allows more time for large repositories and starts from an existing remote-tracking branch when the target branch is not available locally. (#732)
- Upgraded Next.js to 16.3.5 to patch two unauthenticated remote-code-execution vulnerabilities. Failed web-password attempts now receive increasing delays from one second up to 60 seconds, and returning from an external page no longer commonly signs users out. (e5a2434, 20ad98b, #818)
- Server shutdown now closes outstanding live-message connections so an old process does not linger and leave the proxy returning 502 errors after a restart. (#809)