WebChat (Gateway WebSocket UI)

状态: macOS/iOS SwiftUI 聊天 UI 直接与 Gateway WebSocket 通信。

它是什么

  • Gateway 的原生聊天 UI (没有嵌入式浏览器,没有本地静态服务器)。
  • 使用与其他渠道相同的 sessions 和路由规则。
  • 确定性路由: 回复始终返回到 WebChat。

快速开始

  1. 启动 gateway。
  2. 打开 WebChat UI (macOS/iOS app) 或 Control UI chat 标签。
  3. 确保配置了 gateway auth (默认需要,即使在 loopback 上)。

它如何工作(行为)

  • UI 连接到 Gateway WebSocket 并使用 chat.history, chat.sendchat.inject
  • chat.inject 直接向 transcript 附加助手笔记并将其广播到 UI (无 agent 运行)。
  • 历史始终从 gateway 获取(无本地文件监视)。
  • 如果 gateway 不可达,WebChat 是只读的。

远程使用

  • 远程模式通过 SSH/Tailscale 隧道 gateway WebSocket。
  • 你不需要运行单独的 WebChat 服务器。

配置参考(WebChat)

完整配置: Configuration

渠道选项:

  • 没有专用的 webchat.* 块。WebChat 使用下面的 gateway 端点 + auth 设置。

相关全局选项:

  • gateway.port, gateway.bind: WebSocket host/port。
  • gateway.auth.mode, gateway.auth.token, gateway.auth.password: WebSocket auth。
  • gateway.remote.url, gateway.remote.token, gateway.remote.password: 远程 gateway 目标。
  • session.*: session 存储和 main key 默认值。