github agegr/pi-web v0.10.0

4 hours ago

中文

这一版改动较大:Pi Web 开始完整支持 MCP,并升级到 pi 1.0。

重点

  • MCP 服务器:在「设置 › MCP」里管理。粘贴安装命令或配置即可添加,支持测试连接、OAuth 登录/退出、开关、删除(可撤销),以及选择工具如何提供给模型(代码模式 / 工具搜索 / 直接 / 隐藏)。
  • 代码模式:可选「自动」或「始终开启」,可设置是否接管内置工具、工具清单预算。聊天里会把 codemode 调用显示成脚本和它调用的工具。
  • 项目信任:信任对话框会列出项目 .pi/mcp.json 里的服务器和它们会运行的命令。新文件夹可以在添加服务器时一并信任。
  • 只读会话更安全:只读工具预设下,没有标记只读的 MCP 工具会被拦截。
  • 升级到 pi 1.0:
    • MCP 服务器不再拖慢第一条消息,只有「直接」工具的服务器会被等待。
    • MCP 登录按服务器保存,同一个 URL 的不同服务器可以用不同账号。旧的登录会自动迁移。
    • 代码模式提示词约少 40%,脚本可以生成图片(models.generateImages())。
    • Anthropic 登录新增「复制代码」方式,适合浏览器和 Pi Web 不在同一台机器时使用。
    • 支持在 mcp.json 里写 description、oauth.clientName、oauth.authServerMetadataUrl、auth.provider。

新增

  • 运行中也能分叉会话、调整推理等级。
  • 发送键可选 Enter 或 Ctrl+Enter;输入框里 Markdown 列表会自动续行。
  • /mcp 直接打开「设置 › MCP」。
  • 技能和插件支持「全部启用 / 全部停用」。
  • 文件夹选择器可以新建文件夹;侧边栏可以在系统文件管理器中打开工作区;默认工作目录按本地日期创建(~/pi-cwd/YYYYMMDD)。

修复

  • 支持 Safari / iOS 16.2;手机上输入框不再被键盘挡住。
  • Stop 能结束输出被子进程占住的 bash 命令。
  • 自动压缩时显示「正在压缩」而不是「等待模型」。
  • 修复子代理结果、断线重连、草稿、扩展对话框、工作树删除、Markdown 渲染等多处问题。

升级注意

  • 曾选过「代码模式,按搜索查找」(codemode-deferred)的服务器现在按「代码模式」处理,行为相同,无需修改。
  • 项目 .pi/mcp.json 里使用 auth 的服务器会被拒绝(只允许写在全局 mcp.json);名称只差 - 和 _ 的服务器,后一个会被跳过。

npm:@agegr/pi-web@0.10.0

English

A big release: Pi Web now fully supports MCP, and runs on pi 1.0.

Highlights

  • MCP servers live in Settings › MCP. Paste an install command or config to add one, then test it, sign in or out with OAuth, switch it on or off, remove it (with undo), and pick how its tools reach the model (Code mode / tool search / direct / hidden).
  • Code mode: choose Automatic or Always on, whether it takes over the built-in tools, and its tool list budget. Codemode calls show up in chat as the script plus the tool calls it made.
  • Project trust: the trust dialog lists the project's .pi/mcp.json servers and the commands they run. A fresh folder can be trusted while adding a server.
  • Safer read-only sessions: under a read-only preset, MCP tools not marked read-only are blocked.
  • pi 1.0:
    • MCP servers no longer hold up the first message; only servers with direct tools are waited for.
    • MCP sign-ins are stored per server, so servers sharing a URL can use different accounts. Existing sign-ins carry over.
    • Code mode uses about 40% fewer prompt tokens, and scripts can generate images (models.generateImages()).
    • Anthropic login adds a copy-code method for when the browser runs on another machine.
    • mcp.json accepts description, oauth.clientName, oauth.authServerMetadataUrl and auth.provider.

Added

  • Fork a session or change the reasoning level while a run is going.
  • Send with Enter or Ctrl+Enter; Markdown lists continue on new lines in the composer.
  • /mcp opens Settings › MCP.
  • Enable all / Disable all for Skills and Plugins.
  • Create folders in the folder picker, open the workspace in the system file manager, and get dated default folders (~/pi-cwd/YYYYMMDD, local date).

Fixed

  • Works on Safari / iOS 16.2; the mobile composer stays above the keyboard.
  • Stop ends a bash command whose output a leftover child process holds open.
  • Auto-compaction says it is compacting instead of "waiting for model".
  • Fixes for subagent results, stream reconnects, drafts, extension dialogs, worktree removal, and Markdown rendering.

Upgrade notes

  • Servers set to "Code mode, by search" (codemode-deferred) are now plain Code mode, which behaves the same. Nothing to change.
  • A project .pi/mcp.json entry using auth is refused (it belongs in the global mcp.json), and of two server names that differ only in - and _, the second is skipped.

npm: @agegr/pi-web@0.10.0

Don't miss a new pi-web release

NewReleases is sending notifications on new releases.