Skip to content

PocketShell v1.7.0

Choose a tag to compare

@Big-Pony Big-Pony released this 31 Jul 07:38

PocketShell v1.7.0

新增

  • 上下文用量显示:跑 AI 时分割条右侧显示当前会话的上下文用量(如 ⊙ 142k/1M · 14%),替换原本的延迟 + 吞吐;没跑 AI 时维持原样。支持 Claude Code、Kimi Code、Codex、opencode 四家。在设置 → 通知 → 上下文用量里开启。
    • 数据来自各 AI CLI 自身的「一轮跑完」钩子(PocketShell 已用它来发通知),因此数字只在每轮结束时更新,AI 正在跑的那一轮显示上一轮的值。
    • Claude Code 的记录文件里没有上下文窗口总量、模型名也被去掉了 [1m] 后缀,因此单独走状态栏接口拿官方数字;已配置自定义状态栏脚本的会被套在外面运行,原有内容照常显示。
  • Kimi Code 通知接入:第四个接入的工具,开启后一轮跑完推送到手机,锁屏也能收到。在设置里打开 Kimi 开关,需新建一个会话才生效(已开着的会话读不到新注入的环境变量)。
  • 视频预览:文件面板里点开 mp4、webm、mov 直接播放,支持拖动进度条。
  • Git 面板刷新按钮:在终端里切了分支后,点分支行右边的 ⟳ 即可更新,不用关掉重开。

变更

  • 文件预览改为流式读取:拖进度条需要服务端支持分段传输,整个文件预览的读取方式一并改为流式,打开大图不再把整个文件读进内存。
  • 配对省一步:首次配对时若配对串已在剪贴板里,打开配对弹窗会自动填好,只需起个设备名。iOS 上会多弹一次系统的「粘贴」确认(Safari 限制),Android 上一步到位。
  • 编辑器自动折行:手机上编辑长行代码不再需要左右滚动。

已知问题

  • Codex 和 opencode 的上下文数字未在真机上验证,是照文档实现的。取不到数据时分割条不显示,不会显示错误的数字。若发现数字只涨不降,请提 issue。

升级

应用内点更新徽标,或:

curl -fsSL https://raw.githubusercontent.com/Big-Pony/pocketshell/main/install.sh | sh

装成服务的升级后需重启:sudo systemctl restart pocketshell(macOS 上 launchd 会自动拉起)。


PocketShell v1.7.0

Added

  • Context usage on the split bar: while an AI is running, the right side of the split bar shows the session's context usage (e.g. ⊙ 142k/1M · 14%) in place of latency + throughput; without an AI running it is unchanged. Supports Claude Code, Kimi Code, Codex and opencode. Enable it under Settings → Notifications → Context usage.
    • The data comes from each AI CLI's own end-of-turn hook (the same one PocketShell already uses for notifications), so the number updates only when a turn ends — during a running turn it shows the previous turn's value.
    • Claude Code's transcript carries no context-window total and strips the [1m] suffix from the model name, so it reads the official figure from the status line interface instead. If you already have a custom status line script, it is wrapped rather than replaced, and your own output still displays.
  • Kimi Code notifications: the fourth supported tool. Once enabled, a finished turn pushes to your phone, including on the lock screen. Turn on the Kimi switch in settings; you need to start a new session for it to take effect, as an already-running session won't pick up the newly injected environment variables.
  • Video preview: mp4, webm and mov files play directly in the file panel, with a working seek bar.
  • Git panel refresh: after switching branches in the terminal, tap ⟳ next to the branch row to update without closing and reopening the panel.

Changed

  • File preview reads streamed: seeking requires server-side range support, and the whole file-preview read path moved to streaming, so opening a large image no longer reads the entire file into memory.
  • One less step when pairing: on a first pairing, if the pairing string is already on your clipboard, the dialog pre-fills it and you only need to name the device. iOS shows an extra system paste confirmation (a Safari restriction); Android needs no extra tap.
  • The editor wraps long lines: editing long lines of code on a phone no longer requires horizontal scrolling.

Known issues

  • The context figures for Codex and opencode are not verified on real devices — they were implemented from those tools' documentation. When no data can be read the split bar shows nothing rather than a wrong number. If you see a figure that only ever grows, please open an issue.

Upgrade

Tap the update badge in the app, or:

curl -fsSL https://raw.githubusercontent.com/Big-Pony/pocketshell/main/install.sh | sh

If installed as a service, restart after upgrading: sudo systemctl restart pocketshell (launchd restarts it automatically on macOS).