Skip to content

v0.19.0

Latest

Choose a tag to compare

@agegr agegr released this 26 Nov 14:33

中文

基于 v0.18.0..v0.19.0 的提交整理。

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

注意:Pi Web 的页面现在默认只允许同源嵌入 iframe。如果你在其他来源的启动器或门户里嵌入 Pi Web,需要用 PI_WEB_FRAME_ANCESTORS 列出这些来源(逗号分隔的 CSP source,例如 https://portal.example)。(#1827)

新增

  • 用 # 引用其他会话:在输入框输入 # 打开会话选择器,也可以从侧边栏行菜单「插入到对话」或把会话行拖到输入框。引用以 chip 显示,发送时展开为带标题、文件路径的有界对话记录(超长时保留开头和最近部分,中间省略);已发送的引用在对话中折叠为一行,展开后正是模型看到的内容。(#1801,感谢 Hu Xueju;bf81275e、#1825)
  • 侧边栏按时间排序:工具栏右端的时钟按钮可在按项目分组和「按时间排序」之间切换,后者把所有项目的会话合成一个列表,分为今天、昨天、过去 7 天和更早;运行中的会话位置保持不动。(#1822、587940c8)
  • 聊天中的行号链接跳到对应行:src/app.ts:42、:42:7、:10-20 这类链接会在源码视图中定位并高亮对应行;文件查看器的 Git diff 在面板宽度不少于 520px 时左右两栏显示。(#1821,来自 #1792 的建议,感谢 Ymisboy)
  • 设置 › 通用:
    • 新增「引导消息」和「后续消息」两项,对应 pi 的 steeringMode 和 followUpMode,修改后对已打开的会话立即生效,项目的 .pi/settings.json 仍然优先。(#1818、#1819)
    • 新增「网络代理」,在网页中配置 pi 全局 settings.json 的 httpProxy。(#1811,感谢 Gelly)
    • 新增「提示」分组,对应 pi 1.6.1 的 notices.cacheMisses、cacheWarming、compactionCosts、reasoningDrops 四个开关。(#1824)
  • 折叠的工具步骤显示总费用:折叠时 process 标题汇总其中各步骤的费用。(#1769,感谢 Silvio Rodriguez,来自 synth-mania 的 #1768)

修复

  • 安全:页面默认发送 Content-Security-Policy: frame-ancestors 'self' 和 X-Frame-Options: SAMEORIGIN,其他网站不能再把 Pi Web 嵌入 iframe 诱导点击。(#1827)
  • 聊天:
    • README.md:10、app.ts:42 这类不带目录的文件名加行号链接可以点击打开。(#1793,感谢 Shani Singh;#1823)
    • 展开的引用块不再出现嵌套的两个滚动条;skill 和引用会话一样显示为可展开的 [skill] name 块;带引用的裸 /skill:name 也能正确展开。(#1825)
    • 模型不支持图片、实际看到占位符时,read 卡片会说明,与 pi 1.6.0 的 TUI 一致。(#1800,感谢 Eric(Mingdong) Tan)
    • 显示 OpenAI 丢弃的 reasoning 条目及原因,与 pi 1.6.0 的 TUI 一致。(#1756)
    • 长对话中屏幕外的行在跳过与恢复之间不再来回抖动。(#1817,修复 #1808)
    • 扩展通知不再盖住输入框,在手机上也能正常点击输入框。(#1788,感谢 Shani Singh,修复 #1780)
    • 输入框因按钮出现而变窄换行时,末尾光标保持可见。(#1797,感谢 dingxiaobo)
    • inline code 中提到标签名后,后面的数学公式仍能正确渲染。(#1782,感谢 Thejesh)
  • 子 Agent:手动压缩后恢复的回合会被正确等待 (#1798,感谢 Davy Massoneto);profile 的 extensions 列表可以写包名 (#1802,感谢 Davy Massoneto)。
  • 模型:
    • pi 1.6.1 报告无法解析的已存 API key(如失败的 !command)时,Models 面板标红并提供 Disconnect,不再显示成未配置。(#1826)
    • Fetch models 读取 input_modalities 和嵌套的 effort 列表。(#1820)
  • 文件:
    • 超过 256 KiB 的已跟踪文件也能显示 Git diff。(#1789,感谢 shizihanya)
    • 合并冲突中的文件在 @ 文件索引中只出现一次。(#1772,感谢 Shani Singh)
  • 会话:读取超大会话文件中的单个条目(延迟加载的图片、thinking)不再整体解析文件、阻塞服务器。(#1816,修复 #1812);fenced 标题读取正文而不是 info string (#1781,感谢 Thejesh)。
  • Worktree:子模块的 worktree 归到它的检出目录下,而不是 .git/modules。(#1795,感谢 Shani Singh)
  • MCP 导入:带环境变量前缀的 CLI 命令行按该 CLI 识别。(#1794,感谢 Shani Singh)
  • 离线:设置 PI_OFFLINE 时跳过 Pi Web 的更新检查,三处离线判断统一为同一规则。(#1828)
  • Skills:去掉 npx skills 输出中的所有终端转义序列。(#1764)
  • 浏览器拒绝保存的本地选择在组件重新挂载后保留 (#1773,感谢 Shani Singh);回车发送的选择在多个标签页之间同步 (#1763)。

改进

  • pi 升级到 1.6.1:! 命令的截断输出无法保存时会说明原因。完整列表见 pi v1.6.1。(#1824)

内部调整

  • 合并重复的辅助函数、类型和请求封装(isRecord、errorMessage、thinking level 列表、MCP 请求、设置请求、刷新缓存、原子写入等)。(#1757–#1767)
  • 发布 npm 包 @agegr/pi-web@0.19.0 和镜像 ghcr.io/agegr/pi-web:0.19.0。

English

Prepared from commits in v0.18.0..v0.19.0.

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

Note: Pi Web's pages may now be framed by their own origin only. If a launcher or portal on another origin embeds Pi Web in an iframe, list those origins in PI_WEB_FRAME_ANCESTORS (comma-separated CSP sources such as https://portal.example). (#1827)

Added

  • Reference another session with #: typing # in the composer opens a session picker; the row menu's Insert into chat and dragging a sidebar row onto the composer do the same. A reference shows as a chip and expands at send time into a bounded transcript with its title and file path (an over-long one keeps its beginning and recent end, with the middle omitted); in the transcript a sent reference folds to one line and expands to exactly what the model read. (#1801, thanks Hu Xueju; bf81275, #1825)
  • Sort the sidebar by date: a clock button at the right end of the sidebar toolbar switches between project groups and Sort by date, one list of every project's sessions under Today, Yesterday, Previous 7 days and Earlier; a running session keeps its place. (#1822, 587940c)
  • Line links open at their lines: chat links such as src/app.ts:42, :42:7 or :10-20 open the file in Source with those lines centred and marked; the file viewer's Git diff shows old and new side by side when the panel is at least 520px wide. (#1821, from the suggestion in #1792, thanks Ymisboy)
  • Settings › General:
    • Steering mode and Follow-up mode, pi's steeringMode and followUpMode, applied to open sessions at once; a project's .pi/settings.json still wins. (#1818, #1819)
    • Network proxy: set httpProxy in pi's global settings.json from the web UI. (#1811, thanks Gelly)
    • Notices: one switch for each of pi 1.6.1's notices.cacheMisses, cacheWarming, compactionCosts and reasoningDrops. (#1824)
  • Folded tool steps show their total cost: a folded process header sums the cost of the steps inside it. (#1769, thanks Silvio Rodriguez, for #1768 by synth-mania)

Fixed

  • Security: pages now send Content-Security-Policy: frame-ancestors 'self' and X-Frame-Options: SAMEORIGIN, so other sites can no longer frame Pi Web and steer clicks into it. (#1827)
  • Chat:
    • Links to a bare file name with a line suffix, such as README.md:10 or app.ts:42, can be clicked. (#1793, thanks Shani Singh; #1823)
    • An expanded quote no longer shows two nested scrollbars; a skill shows as an expandable [skill] name block like a quoted session; a bare /skill:name sent with a reference expands correctly. (#1825)
    • A read card says when the model saw a placeholder instead of an image, as pi 1.6.0's TUI does. (#1800, thanks Eric(Mingdong) Tan)
    • OpenAI's dropped reasoning items are reported with their reasons, as pi 1.6.0's TUI does. (#1756)
    • Rows in a long transcript no longer flicker between skipped and laid out. (#1817, fixes #1808)
    • Extension notices stay above the composer, so it can be tapped on a phone. (#1788, thanks Shani Singh, fixes #1780)
    • The end caret stays in view when the composer narrows and re-wraps. (#1797, thanks dingxiaobo)
    • Math after a tag named in inline code renders again. (#1782, thanks Thejesh)
  • Subagents: a turn that resumes after manual compaction is waited for (#1798, thanks Davy Massoneto); a profile's extensions list accepts package names (#1802, thanks Davy Massoneto).
  • Models:
    • A stored API key that does not resolve (a failing !command, as pi 1.6.1 reports it) shows in red with Disconnect instead of as not configured. (#1826)
    • Fetch models reads input_modalities and a nested effort list. (#1820)
  • Files:
    • Git diffs show for tracked files larger than 256 KiB. (#1789, thanks shizihanya)
    • A file in a merge conflict is listed once in the @ file index. (#1772, thanks Shani Singh)
  • Sessions: reading one entry (a lazy image or thinking block) of an oversize session file no longer parses the whole file and blocks the server (#1816, fixes #1812); a fenced title reads its body, not its info string (#1781, thanks Thejesh).
  • Worktrees: a submodule's worktrees group under its checkout, not .git/modules. (#1795, thanks Shani Singh)
  • MCP import: a CLI's command line behind environment assignments is read as that CLI. (#1794, thanks Shani Singh)
  • Offline: with PI_OFFLINE set, Pi Web's update check is skipped, and all three offline checks follow one rule. (#1828)
  • Skills: every terminal escape is stripped from npx skills output. (#1764)
  • A choice the browser refused to save survives a remount (#1773, thanks Shani Singh); the Enter-to-send choice follows other tabs (#1763).

Improved

  • pi upgraded to 1.6.1: a ! command whose truncated output could not be saved now says why. See pi v1.6.1 for the full list. (#1824)

Internal

  • Shared helpers, types and request wrappers replace duplicated copies (isRecord, errorMessage, the thinking-level list, MCP and settings requests, the refreshing cache, atomic writes and more). (#1757–#1767)
  • Published npm package @agegr/pi-web@0.19.0 and image ghcr.io/agegr/pi-web:0.19.0.