fix(web): make the web console work end-to-end
- Pair through the public POST /api/v1/pair and persist the device scopes; keep the allow-listed next deep link. Rename the manual field to pairing code. - Authenticate the WebSocket with the raw device token (strip Bearer) and recover from a 401 by clearing the connection once. - Fix chat payloads: setModel/setThinking, attention/diff responses, subagent dispatch items, queue ids/mode, task output and WS resume since. - Render exactly one assistant message per turn: one-to-one snapshot/history merge plus a stale-delta guard after message_end (fixes PONGONG). - Fix dialogs (content above the overlay), unknown-session deep links (error + retry, no silent fallback), device list/revoke, status identity and live pairing code, reconnect banner and Playwright selectors.
This commit is contained in:
1 parent
5572ac0d84
commit
0ef019f58d
57 files changed
+3549
-684
No files matched your search
+23
-17
@@ -4,18 +4,12 @@
|
||||
"chat.abortTitle": "Abort current run",
|
||||
"chat.accept": "Accept",
|
||||
"chat.acceptAll": "Accept all",
|
||||
"chat.accepted": "Accepted changes: {path}",
|
||||
"chat.acceptedAll": "Accepted all {n} files",
|
||||
"chat.addAttachment": "Add attachment",
|
||||
"chat.allowOnce": "Allow once",
|
||||
"chat.allowedOnce": "Allowed once: rm -rf build/",
|
||||
"chat.always": "Always",
|
||||
"chat.alwaysAllowed": "Tool permission remembered",
|
||||
"chat.attachNote": "Attachments are sent with the next message to pi2 (prototype demo only).",
|
||||
"chat.attachTitle": "Add attachment",
|
||||
"chat.attachmentAdded": "Added attachment {name}",
|
||||
"chat.attachmentFailed": "Could not read attachment: {name}",
|
||||
"chat.attentionQuestion": "Subagent requests confirmation: allow running ",
|
||||
"chat.attentionResolvedOther": "Resolved by another client",
|
||||
"chat.attentionTimedOut": "Request timed out and was auto-denied",
|
||||
"chat.attentionTimeout": "Auto-deny on timeout · ",
|
||||
@@ -46,7 +40,6 @@
|
||||
"chat.dispatchTitle": "Dispatch subagent",
|
||||
"chat.dispatched": "Dispatched subagent {name}",
|
||||
"chat.dropHint": "Drop images / files here, or click to choose",
|
||||
"chat.dropNote": "Demo only: local mock, nothing is uploaded",
|
||||
"chat.duration": "Duration",
|
||||
"chat.emptyText": "Start a conversation below",
|
||||
"chat.emptyTitle": "No messages yet",
|
||||
@@ -57,7 +50,6 @@
|
||||
"chat.loadOlder": "Load older messages",
|
||||
"chat.loading": "Loading…",
|
||||
"chat.loadingOlder": "Loading older messages…",
|
||||
"chat.mockReply": "Got it, I'll take care of it.",
|
||||
"chat.model": "Model",
|
||||
"chat.modelLabel": "Model",
|
||||
"chat.modelSwitched": "Switched model: {model}",
|
||||
@@ -67,7 +59,6 @@
|
||||
"chat.nameRequired": "Name is required",
|
||||
"chat.newSession": "New session",
|
||||
"chat.newSessionCreated": "New session created",
|
||||
"chat.newSessionDemo": "New session demo: created session 01a16a2f",
|
||||
"chat.newSessionFailed": "Could not create a session: {error}",
|
||||
"chat.noChanges": "No changes",
|
||||
"chat.noMatch": "No matching sessions",
|
||||
@@ -86,12 +77,7 @@
|
||||
"chat.parentSession": "Parent session",
|
||||
"chat.pending": "{n} pending",
|
||||
"chat.preview": "Read-only preview",
|
||||
"chat.previewCompleted": "Done. The result was reported to the parent session; you can continue.",
|
||||
"chat.previewDormant": "Process is dormant; wake it to continue this task.",
|
||||
"chat.previewFailed": "Failed: could not converge on reproduction steps; error details were sent to the parent session.",
|
||||
"chat.previewInterrupted": "Interrupted: received an abort signal from the parent and stopped the current tool call.",
|
||||
"chat.previewNote": "Read-only preview · subagent messages are not written to the parent session",
|
||||
"chat.previewReply": "Got it. I'll run with {model} at thinking={thinking} and report the result back to the parent session.",
|
||||
"chat.previewRunning": "Running…",
|
||||
"chat.previewSubagent": "Preview subagent",
|
||||
"chat.progress": "Progress {done}/{total}",
|
||||
@@ -120,8 +106,7 @@
|
||||
"chat.source": "Source: {name}",
|
||||
"chat.status": "Status",
|
||||
"chat.steer": "Steer",
|
||||
"chat.steerOff": "Steer disabled",
|
||||
"chat.steerOn": "Steer insertion enabled",
|
||||
"chat.steerMode": "Steering mode: {mode}",
|
||||
"chat.steerPlaceholder": "Send a steer instruction to this subagent…",
|
||||
"chat.steerRequired": "Enter a steer instruction",
|
||||
"chat.steerSent": "Steer sent: {text}",
|
||||
@@ -137,6 +122,7 @@
|
||||
"chat.tabTasks": "Tasks",
|
||||
"chat.tabTodo": "Todo",
|
||||
"chat.task": "Task",
|
||||
"chat.taskExitCode": "Exit code",
|
||||
"chat.taskLabel": "Task *",
|
||||
"chat.taskOutput": "Task output · {id}",
|
||||
"chat.taskPlaceholder": "Describe the task for the subagent (required)",
|
||||
@@ -201,7 +187,7 @@
|
||||
"connect.emptyText": "Enter the address, or scan a pi2 pairing code to get started.",
|
||||
"connect.emptyTitle": "Connect your pi2 server",
|
||||
"connect.endpoint": "Endpoint",
|
||||
"connect.failed": "Connection failed. Check the address and token.",
|
||||
"connect.failed": "Connection failed. Check the address and pairing code.",
|
||||
"connect.host": "Host",
|
||||
"connect.hostPlaceholder": "192.168.2.10 or http://…:4321",
|
||||
"connect.hostRequired": "Enter the server address",
|
||||
@@ -213,6 +199,13 @@
|
||||
"connect.name": "Name",
|
||||
"connect.noAutoDetect": "Camera is on. This browser cannot decode QR codes automatically; paste the pairing link.",
|
||||
"connect.notPairQr": "Not a pi2 pairing QR code. Try another.",
|
||||
"connect.os": "OS",
|
||||
"connect.pairCode": "Pairing code",
|
||||
"connect.pairCodeHint": "The 8-character code shown by the pi2 server.",
|
||||
"connect.pairCodeInvalid": "Pairing code must be 8 letters or digits (A–Z, 0–9)",
|
||||
"connect.pairCodePlaceholder": "ABCD1234",
|
||||
"connect.pairCodeRejected": "Pairing code is wrong or expired. Create a new code on the server.",
|
||||
"connect.pairCodeRequired": "Enter the 8-character pairing code",
|
||||
"connect.pairFailed": "Pairing failed. Check the pairing code or link.",
|
||||
"connect.pairHint": "Scan the pairing QR code shown by the pi2 server; you will confirm before connecting.",
|
||||
"connect.pairingLink": "Pairing link",
|
||||
@@ -231,6 +224,10 @@
|
||||
"connect.scanTitle": "Scan pairing code",
|
||||
"connect.scanWarning": "After connecting, this device can read and write sessions and dispatch subagents.",
|
||||
"connect.scannedNote": "Scanned pairing",
|
||||
"connect.scope.apply": "Apply",
|
||||
"connect.scope.read": "Read",
|
||||
"connect.scope.steer": "Steer",
|
||||
"connect.scopeHint": "Scope granted to this device: {scope}",
|
||||
"connect.scopes": "Scopes",
|
||||
"connect.secureNote": "Camera access requires HTTPS (or localhost); the token is stored only in this browser.",
|
||||
"connect.secureRequired": "Camera access requires HTTPS (or localhost). Paste the pairing link below instead.",
|
||||
@@ -246,6 +243,7 @@
|
||||
"connect.tokenHint": "The token is stored only in this browser.",
|
||||
"connect.tokenPlaceholder": "Pairing token (pkt_…)",
|
||||
"connect.tokenRequired": "Enter the pairing token",
|
||||
"connect.uptime": "Uptime",
|
||||
"connect.version": "Version",
|
||||
"errors.attentionResolved": "This request was already resolved",
|
||||
"errors.badRequest": "Invalid request",
|
||||
@@ -272,10 +270,12 @@
|
||||
"nav.chat": "Chat",
|
||||
"nav.status": "Status",
|
||||
"nav.workspaces": "Workspaces",
|
||||
"shell.connectionLost": "Disconnected from pi2 — pair this browser again to continue.",
|
||||
"shell.dark": "Dark",
|
||||
"shell.language": "Language",
|
||||
"shell.light": "Light",
|
||||
"shell.navLabel": "Console",
|
||||
"shell.reconnecting": "Connection lost — reconnecting…",
|
||||
"shell.serverChip": "Server: {name}, view status",
|
||||
"shell.switchLanguage": "Switch to {lang}",
|
||||
"shell.system": "Auto",
|
||||
@@ -308,11 +308,14 @@
|
||||
"status.created": "Created",
|
||||
"status.deviceCount": "{n}",
|
||||
"status.devices": "Paired devices",
|
||||
"status.devicesError": "Failed to load paired devices",
|
||||
"status.disconnected": "Disconnected",
|
||||
"status.disk": "Disk",
|
||||
"status.fail": "Fail",
|
||||
"status.health": "Health checks",
|
||||
"status.healthError": "Failed to load health checks",
|
||||
"status.healthy": "Healthy",
|
||||
"status.infoError": "Failed to load server info",
|
||||
"status.instances": "Instances",
|
||||
"status.kernel": "Kernel",
|
||||
"status.lastActive": "Last active",
|
||||
@@ -326,6 +329,7 @@
|
||||
"status.modelSearchAria": "Search models or providers",
|
||||
"status.modelSearchPlaceholder": "Search models or providers…",
|
||||
"status.models": "Models & providers",
|
||||
"status.modelsError": "Failed to load models",
|
||||
"status.network": "Network",
|
||||
"status.networkAddress": "Network address",
|
||||
"status.noDevicesText": "Devices appear here after pairing from the phone.",
|
||||
@@ -350,6 +354,7 @@
|
||||
"status.reasoning": "reasoning",
|
||||
"status.resourceWarn": "Memory is close to the soft limit; new instances may start slowly.",
|
||||
"status.resources": "Resources",
|
||||
"status.resourcesError": "Failed to load resource usage",
|
||||
"status.revoke": "Revoke",
|
||||
"status.revokeText": "Revoke access for \"{name}\"? The phone's next request will fail.",
|
||||
"status.revokeTitle": "Revoke device",
|
||||
@@ -363,6 +368,7 @@
|
||||
"status.subagentConcurrency": "Subagent concurrency",
|
||||
"status.taskCount": "{n}",
|
||||
"status.tasks": "Background tasks",
|
||||
"status.tasksError": "Failed to load background tasks",
|
||||
"status.title": "Server status",
|
||||
"status.tokenScopes": "Token scopes",
|
||||
"status.uptime": "Uptime",
|
||||
|
||||
+23
-17
@@ -4,18 +4,12 @@
|
||||
"chat.abortTitle": "中止当前执行",
|
||||
"chat.accept": "接受",
|
||||
"chat.acceptAll": "全部接受",
|
||||
"chat.accepted": "已接受变更:{path}",
|
||||
"chat.acceptedAll": "已接受全部 {n} 个文件",
|
||||
"chat.addAttachment": "添加附件",
|
||||
"chat.allowOnce": "允许一次",
|
||||
"chat.allowedOnce": "已允许一次:rm -rf build/",
|
||||
"chat.always": "始终允许",
|
||||
"chat.alwaysAllowed": "已记住该工具授权",
|
||||
"chat.attachNote": "附件会随下一条消息发送给 pi2(原型仅为交互演示)。",
|
||||
"chat.attachTitle": "添加附件",
|
||||
"chat.attachmentAdded": "已添加附件 {name}",
|
||||
"chat.attachmentFailed": "附件读取失败:{name}",
|
||||
"chat.attentionQuestion": "子代理请求确认:允许执行 ",
|
||||
"chat.attentionResolvedOther": "该请求已由其他客户端处理",
|
||||
"chat.attentionTimedOut": "请求超时,已自动拒绝",
|
||||
"chat.attentionTimeout": "超时后自动拒绝 · 剩余 ",
|
||||
@@ -46,7 +40,6 @@
|
||||
"chat.dispatchTitle": "派发子代理",
|
||||
"chat.dispatched": "已派发子代理 {name}",
|
||||
"chat.dropHint": "拖放图片 / 文件到此处,或点击选择",
|
||||
"chat.dropNote": "演示用:仅本地 mock,不会真正上传",
|
||||
"chat.duration": "耗时",
|
||||
"chat.emptyText": "在输入框里开始对话吧",
|
||||
"chat.emptyTitle": "还没有消息",
|
||||
@@ -57,7 +50,6 @@
|
||||
"chat.loadOlder": "加载更早的消息",
|
||||
"chat.loading": "加载中…",
|
||||
"chat.loadingOlder": "正在加载更早的消息…",
|
||||
"chat.mockReply": "收到,我来处理。",
|
||||
"chat.model": "模型",
|
||||
"chat.modelLabel": "模型 model",
|
||||
"chat.modelSwitched": "已切换模型:{model}",
|
||||
@@ -67,7 +59,6 @@
|
||||
"chat.nameRequired": "名称不能为空",
|
||||
"chat.newSession": "新 session",
|
||||
"chat.newSessionCreated": "已创建新 session",
|
||||
"chat.newSessionDemo": "新建 session 演示:已创建 session 01a16a2f",
|
||||
"chat.newSessionFailed": "新建 session 失败:{error}",
|
||||
"chat.noChanges": "没有变更",
|
||||
"chat.noMatch": "没有匹配的 session",
|
||||
@@ -86,12 +77,7 @@
|
||||
"chat.parentSession": "父会话",
|
||||
"chat.pending": "{n} 待处理",
|
||||
"chat.preview": "只读预览",
|
||||
"chat.previewCompleted": "完成。结论已通过 report 回传给父会话,可继续下一步。",
|
||||
"chat.previewDormant": "进程已休眠,可重新唤醒继续该任务。",
|
||||
"chat.previewFailed": "执行失败:无法收敛复现步骤,已把错误详情回传给父会话。",
|
||||
"chat.previewInterrupted": "被中断:收到父会话的中止信号,已停止当前工具调用。",
|
||||
"chat.previewNote": "只读预览 · 子代理对话不会写入父会话",
|
||||
"chat.previewReply": "收到。我会在 {model} 上以 thinking={thinking} 执行,并把结论回传给父会话。",
|
||||
"chat.previewRunning": "正在执行…",
|
||||
"chat.previewSubagent": "预览子代理",
|
||||
"chat.progress": "进度 {done}/{total}",
|
||||
@@ -120,8 +106,7 @@
|
||||
"chat.source": "来源:{name}",
|
||||
"chat.status": "状态",
|
||||
"chat.steer": "Steer",
|
||||
"chat.steerOff": "已取消 steer",
|
||||
"chat.steerOn": "已设为 steer 插入",
|
||||
"chat.steerMode": "转向模式:{mode}",
|
||||
"chat.steerPlaceholder": "发送 steer 指令给该子代理…",
|
||||
"chat.steerRequired": "请输入 steer 指令",
|
||||
"chat.steerSent": "已发送 steer 指令:{text}",
|
||||
@@ -137,6 +122,7 @@
|
||||
"chat.tabTasks": "任务",
|
||||
"chat.tabTodo": "待办",
|
||||
"chat.task": "任务",
|
||||
"chat.taskExitCode": "退出码",
|
||||
"chat.taskLabel": "任务 task *",
|
||||
"chat.taskOutput": "任务输出 · {id}",
|
||||
"chat.taskPlaceholder": "描述要交给子代理的任务(必填)",
|
||||
@@ -201,7 +187,7 @@
|
||||
"connect.emptyText": "填写地址,或扫码配对 pi2 服务器后即可开始。",
|
||||
"connect.emptyTitle": "连接 pi2 服务器",
|
||||
"connect.endpoint": "地址",
|
||||
"connect.failed": "连接失败,请检查地址与 Token",
|
||||
"connect.failed": "连接失败,请检查地址与配对码",
|
||||
"connect.host": "Host",
|
||||
"connect.hostPlaceholder": "192.168.2.10 或 http://…:4321",
|
||||
"connect.hostRequired": "请输入服务器地址",
|
||||
@@ -213,6 +199,13 @@
|
||||
"connect.name": "名称",
|
||||
"connect.noAutoDetect": "摄像头已开启。当前浏览器不支持自动识别,请粘贴配对链接。",
|
||||
"connect.notPairQr": "这不是 pi2 配对二维码,请换一个",
|
||||
"connect.os": "系统",
|
||||
"connect.pairCode": "配对码",
|
||||
"connect.pairCodeHint": "pi2 服务器上显示的 8 位配对码。",
|
||||
"connect.pairCodeInvalid": "配对码必须是 8 位字母或数字(A–Z、0–9)",
|
||||
"connect.pairCodePlaceholder": "ABCD1234",
|
||||
"connect.pairCodeRejected": "配对码错误或已过期,请在服务器上生成新的配对码。",
|
||||
"connect.pairCodeRequired": "请输入 8 位配对码",
|
||||
"connect.pairFailed": "配对失败,请检查配对码或链接",
|
||||
"connect.pairHint": "扫描 pi2 服务器显示的配对二维码,识别后需二次确认。",
|
||||
"connect.pairingLink": "配对链接",
|
||||
@@ -231,6 +224,10 @@
|
||||
"connect.scanTitle": "扫码配对",
|
||||
"connect.scanWarning": "连接后该设备可读写会话并派发子代理。",
|
||||
"connect.scannedNote": "扫码配对",
|
||||
"connect.scope.apply": "写入",
|
||||
"connect.scope.read": "读取",
|
||||
"connect.scope.steer": "操作",
|
||||
"connect.scopeHint": "此设备获得的权限:{scope}",
|
||||
"connect.scopes": "权限",
|
||||
"connect.secureNote": "摄像头需要 HTTPS(或 localhost);Token 仅保存在此浏览器。",
|
||||
"connect.secureRequired": "摄像头需要 HTTPS(或 localhost)安全环境,请改用下方配对链接。",
|
||||
@@ -246,6 +243,7 @@
|
||||
"connect.tokenHint": "Token 只保存在此浏览器",
|
||||
"connect.tokenPlaceholder": "配对令牌(pkt_…)",
|
||||
"connect.tokenRequired": "请输入配对 Token",
|
||||
"connect.uptime": "运行时长",
|
||||
"connect.version": "版本",
|
||||
"errors.attentionResolved": "该请求已被处理",
|
||||
"errors.badRequest": "请求无效",
|
||||
@@ -272,10 +270,12 @@
|
||||
"nav.chat": "对话",
|
||||
"nav.status": "状态",
|
||||
"nav.workspaces": "工作空间",
|
||||
"shell.connectionLost": "与 pi2 的连接已断开,请重新配对后继续。",
|
||||
"shell.dark": "暗",
|
||||
"shell.language": "语言",
|
||||
"shell.light": "亮",
|
||||
"shell.navLabel": "控制台",
|
||||
"shell.reconnecting": "连接中断,正在重连…",
|
||||
"shell.serverChip": "服务器:{name},查看状态",
|
||||
"shell.switchLanguage": "切换到{lang}",
|
||||
"shell.system": "自动",
|
||||
@@ -308,11 +308,14 @@
|
||||
"status.created": "创建",
|
||||
"status.deviceCount": "{n} 台",
|
||||
"status.devices": "已配对设备",
|
||||
"status.devicesError": "加载已配对设备失败",
|
||||
"status.disconnected": "已断开",
|
||||
"status.disk": "磁盘",
|
||||
"status.fail": "失败",
|
||||
"status.health": "健康检查",
|
||||
"status.healthError": "加载健康检查失败",
|
||||
"status.healthy": "健康",
|
||||
"status.infoError": "加载服务器信息失败",
|
||||
"status.instances": "实例数",
|
||||
"status.kernel": "内核",
|
||||
"status.lastActive": "最后活跃",
|
||||
@@ -326,6 +329,7 @@
|
||||
"status.modelSearchAria": "搜索模型或 provider",
|
||||
"status.modelSearchPlaceholder": "搜索模型或 provider…",
|
||||
"status.models": "模型与 Provider",
|
||||
"status.modelsError": "加载模型列表失败",
|
||||
"status.network": "Network",
|
||||
"status.networkAddress": "Network 地址",
|
||||
"status.noDevicesText": "在手机端扫码配对后,设备会显示在这里。",
|
||||
@@ -350,6 +354,7 @@
|
||||
"status.reasoning": "推理",
|
||||
"status.resourceWarn": "内存占用接近软上限,新的实例可能被延迟启动。",
|
||||
"status.resources": "资源占用",
|
||||
"status.resourcesError": "加载资源使用情况失败",
|
||||
"status.revoke": "撤销",
|
||||
"status.revokeText": "将撤销「{name}」的访问权限,手机端下次请求将失效。",
|
||||
"status.revokeTitle": "撤销设备",
|
||||
@@ -363,6 +368,7 @@
|
||||
"status.subagentConcurrency": "子代理并发",
|
||||
"status.taskCount": "{n} 个",
|
||||
"status.tasks": "后台任务",
|
||||
"status.tasksError": "加载后台任务失败",
|
||||
"status.title": "服务器状态",
|
||||
"status.tokenScopes": "Token 权限",
|
||||
"status.uptime": "已运行时长",
|
||||
|
||||
Reference in new issue
Block a user