跳转到内容

WebChat

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

  • Gateway 的原生聊天 UI(无嵌入式浏览器,无本地静态服务器)。
  • 使用与其他频道相同的会话和路由规则。
  • 确定性路由:回复总是回到 WebChat。
  1. 启动 Gateway。
  2. 打开 WebChat UI (macOS/iOS 应用) 或 Control UI 聊天标签页。
  3. 确保配置了 Gateway 认证(默认需要,即使在 Loopback 上)。
  • UI 连接到 Gateway WebSocket 并使用 chat.history, chat.send, 和 chat.inject
  • chat.inject 将助手注释直接追加到记录中并广播给 UI(无 Agent 运行)。
  • 历史记录总是从 Gateway 获取(无本地文件监控)。
  • 如果 Gateway 不可达,WebChat 为只读。
  • 远程模式通过 SSH/Tailscale 隧道传输 Gateway WebSocket。
  • 您不需要运行单独的 WebChat 服务器。

完整配置:配置

频道选项:

  • 无专门的 webchat.* 块。WebChat 使用下方的 Gateway 端点 + 认证设置。

相关全局选项:

  • gateway.port, gateway.bind: WebSocket 主机/端口。
  • gateway.auth.mode, gateway.auth.token, gateway.auth.password: WebSocket 认证。
  • gateway.remote.url, gateway.remote.token, gateway.remote.password: 远程 Gateway 目标。
  • session.*: 会话存储和主键默认值。