diff --git a/docs/QA-1.17.md b/docs/QA-1.17.md index 05f056ec..f845b89b 100644 --- a/docs/QA-1.17.md +++ b/docs/QA-1.17.md @@ -15,3 +15,11 @@ Responses的typed Items、原call_id配对、原用量与同线路reasoning续 相关恢复检查42/42通过;新增边界29/29、流式/手机投影/上下文38/38通过(这些范围有重叠,不相加)。原日志见[恢复专项](model-protocols-current-specialists.txt)、[边界专项](model-protocols-boundary-specialists.txt)、[投影与上下文](model-protocols-projection-specialists.txt)。新增验证包括原停用对象导致probe引用失效的修复、检测所属attempt精确绑定、原始畸形UTF8捕获、CR事件终结、超时关闭HTTP、自有CCSwitch SQLite/TOML Responses导入,全部使用自有loopback数据。原失败夹具与首次UI定位失败保留;后者为select隐式名称包含option文字,已增加明确aria-label,重新实际验收中。 E界面已构建,正在操作验收;F独立发行与正式部署未执行。协议实现不能代表视觉/音频已接入或真实模型自主工程能力已经通过。具体协议和来源见[协议边界](MODEL-PROTOCOLS.md)。 + +## E:真实界面与回看修复 + +模型中心新增协议/能力/范围、实际线路与拒绝原因、完整/未完整流字节与原SHA下载;桌面与伴随端显示同一原Run的有界片段。实际Edge桌面1440px、窄屏390px以及真实TLS网关配对的手机视口5组流程通过,页面错误和失败请求均0,响应下载与工件SHA一致。实际iPhone本轮未联调,不能把窄屏或TLS中继称作实机。入口见[本轮界面结果](model-protocols-e-ui-validation.json)。 + +目视截图发现并修复:片段同批到达后上游停顿,节流需要定时补发最新状态;选池后主窗口可能仍显示离线演示,旧提交校验还错误要求未选中的原连接模型名。现在用公开选路身份同步主窗口,刷新仍保留实际池名,原连接配置不被改写;新UI流程明确等待选路并刷新后发送。下载直接读取工件字节,畸形UTF8也不再被文本解码改写。37项流式/请求计划/升级、20项旧模型中心/API兼容和26项原字节/连接专项通过(重叠范围不累计)。 + +原UI定位失败、外部API增加连接后未刷新界面的夹具失败、真实节流缺陷、错误mobile选择器和原首次完整UI运行都保留。首次历史UI全量运行的Purge来源传成打包目录,修正为原source/upstream;原日志与阶段结果单独保存,重跑使用新顶层日志。完整回归早于最后修复启动,属于开发中诊断;最终结论以冻结后的独立源码整轮为准。 diff --git a/docs/RETROSPECTIVE-1.17.md b/docs/RETROSPECTIVE-1.17.md index 50a6aa9e..c49cfee5 100644 --- a/docs/RETROSPECTIVE-1.17.md +++ b/docs/RETROSPECTIVE-1.17.md @@ -9,3 +9,9 @@ 统一消息不能取代真正发送的请求。Responses和流式池各封存实际变体,并另记当前物理请求的SHA/字节;保留原工具call_id、reasoning与原用量。流式进展不进入工具执行,直到原终结与参数通过核对;断流/超时保留unknown不自动重放。原始Buffer捕获保持畸形字节,发生已知凭据脱敏时单列工件SHA。 回顾发现probe引用原可变连接时,toggle会同时更新比较两端,导致旧检测结论被错误接纳;改为连接快照并验证修订。原attempt通过progress身份绑定,避免并发任务改变账本末项。29项新增边界及38项关联投影/上下文检查通过。预算仍按所有成员容量保守取最小值,可能降低混合池可用容量;没有损失请求/审批边界,后续可按真实任务需求优化。E实际验收和F独立发行仍按计划执行。 + +## E:观察后再判定可用 + +单看控件存在会遗漏主任务问题。截图中主窗口还显示离线演示,导致发现选池/关闭窗口时的外部状态同步与旧legacy模型校验缺陷;现在选择和刷新都保留实际池名,再由同一后端选路执行。流式首批事件合并时曾只显示0字符,增加定时补发最终片段,停止时清除计时器,专门检查上游不再发送任何事件的情形。 + +桌面/390px和真实TLS配对观察窗口5组完整流程通过并目视回看。手机原生Safari、信任/PWA已有1.16实机记录;1.17新增流式尚无新实机结论。工程回归继续使用固定原测试和真实Node/React/Python执行,增加同一原工程算法通过Responses SSE与受控Harness的独立门槛,不能拿文本fixture结束当工程完成。 diff --git a/docs/model-protocols-byte-specialists.txt b/docs/model-protocols-byte-specialists.txt new file mode 100644 index 00000000..2f29609a --- /dev/null +++ b/docs/model-protocols-byte-specialists.txt @@ -0,0 +1,35 @@ +✔ model registry keeps original credentials/endpoint intact, rejects stale edits, and forgets only volatile keys on restart (2370.3633ms) +✔ config import previews exact revisions, keeps secrets volatile, syncs only when enabled and preserves manual edits on conflicts (2117.705ms) +✔ real HTTP pool fails over 429 to another model and never repeats completed tools; attempts seal actual request bytes and Run identity (6897.5971ms) +✔ pool rotation and weights select members on new Runs; disabled and missing credentials are excluded without requests (9250.5979ms) +✔ 401 blocks the credential revision; updating the key restores availability without leaking error echoes (3217.6818ms) +✔ queued request cancellation and in-flight disable release only owned leases and do not dispatch another HTTP request (2598.7156ms) +✔ compiled model-center HTTP API persists public profiles, blocks forged origins, and local operations never invoke a model (4360.1888ms) +✔ model registry disk failures restore routing, pool profiles and credential references without partial updates (1893.4263ms) +✔ model selection and saved configuration commit together and failures preserve the original mode and endpoint (2166.135ms) +✔ configuration imports roll back the entire batch and retain one usable preview after validation or commit failure (1609.896ms) +✔ HTTP download preserves original malformed SSE bytes and artifact SHA instead of decoding invalid UTF8 (3952.9458ms) +✔ real Chat SSE carries UTF8 and split tool JSON; Runtime executes only after DONE, stores partial progress and original usage (7105.3473ms) +✔ Responses typed SSE validates original item identity, terminal data, raw usage and tool result pair (6291.606ms) +✔ incomplete network stream retains unknown attempt and never automatically switches pool or dispatches fragment tools (4041.245ms) +✔ stopping an active HTTP stream closes only original request and keeps partial text without executing tools (4006.955ms) +✔ explicit streaming probe uses actual SSE despite unknown declaration and binds its own original attempt (2517.4313ms) +✔ coalesced initial SSE events publish the latest partial state even when the upstream stays idle (4539.5055ms) +✔ stream timeout closes the original HTTP response, preserves redacted capture and never retries (2557.65ms) +✔ SSE accepts CR-only final event boundaries and retains exact invalid UTF8 bytes without dispatch (0.9326ms) +▶ stream parser rejects truncation, finish length, malformed JSON, duplicate sequence, changed final item and oversized data + ✔ reject 0 (0.1952ms) + ✔ reject 1 (0.234ms) + ✔ reject 2 (0.2449ms) + ✔ reject 3 (5.2352ms) + ✔ reject 4 (0.1967ms) + ✔ reject 5 (0.1693ms) +✔ stream parser rejects truncation, finish length, malformed JSON, duplicate sequence, changed final item and oversized data (6.8177ms) +ℹ tests 26 +ℹ suites 0 +ℹ pass 26 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 36601.3161 diff --git a/docs/model-protocols-e-ui-validation.json b/docs/model-protocols-e-ui-validation.json new file mode 100644 index 00000000..cd0b8686 --- /dev/null +++ b/docs/model-protocols-e-ui-validation.json @@ -0,0 +1,41 @@ +{ + "success": true, + "version": "1.17.0", + "appRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench", + "nodePath": "D:\\Ai-project\\REA逆向\\tools\\node-v24.22.1-win-x64\\node.exe", + "containedRuntime": false, + "nodeSha256": "d702daa815eabbff763c7d3808e235cf031cf2ca70211b56847bc72f51e240e5", + "passed": [ + "actual form saves Responses and declared stream, refresh preserves both and narrow editor remains operable", + "separate text, nonce tool and actual SSE probes bind only their requested capability and own attempts", + "actual pooled task excludes text-only before dispatch, executes original tool once and downloads SHA-matched original SSE", + "desktop and actual paired gateway show same bounded stream; mobile stops original HTTP with zero fragment tool dispatch or replay", + "truncated output keeps explicit unknown ledger, partial evidence and no automatic failover or incomplete tool execution" + ], + "screenshots": [ + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\desktop-editor.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\narrow-editor.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\desktop-capabilities.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\narrow-capabilities.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\desktop-ledger.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\desktop-streaming.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\narrow-streaming.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\mobile-streaming.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\mobile-stopped.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\narrow-stopped.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\desktop-incomplete.png", + "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4\\narrow-incomplete.png" + ], + "pageErrors": [], + "requestFailures": [], + "fixtureModelRequests": 7, + "realModelRequests": 0, + "osTrustChanged": false, + "nativeIPhone": "not exercised; paired Edge viewport uses CA-verifying owned relay", + "taskId": "238c7b5e-3a50-41bb-a88b-83612d53de00", + "runIds": [ + "d9ba991e-8cad-4ee5-bdf1-622f9d71347b", + "67e4674f-57eb-4d97-bd70-2c4ef62eb2ae", + "888065cf-7745-4295-9ae0-cd743c89d682" + ] +} \ No newline at end of file diff --git a/docs/model-protocols-progress-specialists.txt b/docs/model-protocols-progress-specialists.txt new file mode 100644 index 00000000..dabc1ff2 --- /dev/null +++ b/docs/model-protocols-progress-specialists.txt @@ -0,0 +1,46 @@ +✔ real Chat SSE carries UTF8 and split tool JSON; Runtime executes only after DONE, stores partial progress and original usage (5983.0173ms) +✔ Responses typed SSE validates original item identity, terminal data, raw usage and tool result pair (6258.0056ms) +✔ incomplete network stream retains unknown attempt and never automatically switches pool or dispatches fragment tools (4047.5165ms) +✔ stopping an active HTTP stream closes only original request and keeps partial text without executing tools (4001.9193ms) +✔ explicit streaming probe uses actual SSE despite unknown declaration and binds its own original attempt (1869.4361ms) +✔ coalesced initial SSE events publish the latest partial state even when the upstream stays idle (4337.4586ms) +✔ stream timeout closes the original HTTP response, preserves redacted capture and never retries (2078.133ms) +✔ SSE accepts CR-only final event boundaries and retains exact invalid UTF8 bytes without dispatch (1.0764ms) +▶ stream parser rejects truncation, finish length, malformed JSON, duplicate sequence, changed final item and oversized data + ✔ reject 0 (0.204ms) + ✔ reject 1 (0.137ms) + ✔ reject 2 (0.192ms) + ✔ reject 3 (5.0447ms) + ✔ reject 4 (0.7307ms) + ✔ reject 5 (0.202ms) +✔ stream parser rejects truncation, finish length, malformed JSON, duplicate sequence, changed final item and oversized data (7.0625ms) +✔ context APIs retain exact request identity, paginate archived groups and reject foreign sessions/runs (6192.0329ms) +✔ delivery reports verify request body, sealed plan and original archived bytes, and show corruption as needing verification (5243.1234ms) +✔ direct code evidence remains selected while recent historical-index browsing is archived within the complete request budget (4520.4396ms) +✔ one long user turn becomes bounded complete groups with exact UTF-8 history and recent JSON arguments (10567.6007ms) +✔ tool definitions, exact system bytes, output reserve and remaining Run/Task budget are accounted before requests (2088.1285ms) +✔ oversized required user instructions pause intact and can be explicitly resumed after increasing the window (4121.4042ms) +✔ all task instructions, constraints and acceptance remain in the runtime system instead of an eight-item or byte prefix (3632.5053ms) +✔ a newest manageable multi-tool group stays exact even beyond the working target; oversized earlier groups are archived (2187.4153ms) +✔ invalid orphan result is rejected before archive or network preparation (1310.8086ms) +✔ invalid missing result is rejected before archive or network preparation (1405.7107ms) +✔ invalid wrong result is rejected before archive or network preparation (1532.416ms) +✔ invalid duplicate call is rejected before archive or network preparation (2103.016ms) +✔ a group larger than the artifact limit uses verified Unicode-safe chunks without replacing tool JSON (4459.0071ms) +✔ changed or missing archived evidence stops reuse and is never silently recreated (2227.314ms) +✔ transaction failure prevents publishing a plan and any corresponding model request (2090.0617ms) +✔ the Provider rejects body mutation after a sealed plan before calling HTTP (1741.8434ms) +✔ HTTP failure and explicit same-Task resume reuse exact completed results and request hashes without repeating a command (13863.0813ms) +✔ a real process exit after plan persistence marks interruption and never issues an automatic model request (2513.3048ms) +✔ hot upgrade adopts a retained virtual data root without reopening SQLite or changing rows, Provider or routing (2472.0281ms) +✔ failed adoption restores the original virtual data-root name and original open database (1811.855ms) +✔ hot upgrade refreshes retained model and importer methods while preserving credential and routing objects (2029.5545ms) +✔ hot upgrade refuses active probes and restores retained model methods if installation fails (1963.2231ms) +ℹ tests 37 +ℹ suites 0 +ℹ pass 37 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 72015.918 diff --git a/docs/model-protocols-selection-specialists.txt b/docs/model-protocols-selection-specialists.txt new file mode 100644 index 00000000..8ff97858 --- /dev/null +++ b/docs/model-protocols-selection-specialists.txt @@ -0,0 +1,28 @@ +✔ the bundled local service enforces host, origin, token and JSON object contracts (2974.454ms) +✔ an in-flight connection probe prevents configuration changes and another probe until its actual result returns (4037.4954ms) +✔ API review applies verified content, detects conflicts, exports sessions and keeps keys in memory (7025.1254ms) +✔ a real bundle restart preserves proposals, interrupts old approvals and requests fresh consent on resume (20310.8193ms) +✔ runtime diagnostics and model-response validation use actual records and preserve the saved connection (3695.7218ms) +✔ persistent event replay is read-only and keeps run/artifact identity across reconnects (13297.8198ms) +✔ model registry keeps original credentials/endpoint intact, rejects stale edits, and forgets only volatile keys on restart (1701.7823ms) +✔ config import previews exact revisions, keeps secrets volatile, syncs only when enabled and preserves manual edits on conflicts (1223.0659ms) +✔ real HTTP pool fails over 429 to another model and never repeats completed tools; attempts seal actual request bytes and Run identity (6081.7127ms) +✔ pool rotation and weights select members on new Runs; disabled and missing credentials are excluded without requests (8632.154ms) +✔ 401 blocks the credential revision; updating the key restores availability without leaking error echoes (4455.0191ms) +✔ queued request cancellation and in-flight disable release only owned leases and do not dispatch another HTTP request (1923.0023ms) +✔ compiled model-center HTTP API persists public profiles, blocks forged origins, and local operations never invoke a model (4051.2999ms) +✔ model registry disk failures restore routing, pool profiles and credential references without partial updates (1738.0266ms) +✔ model selection and saved configuration commit together and failures preserve the original mode and endpoint (1983.278ms) +✔ configuration imports roll back the entire batch and retain one usable preview after validation or commit failure (2341.2948ms) +✔ hot upgrade adopts a retained virtual data root without reopening SQLite or changing rows, Provider or routing (2644.1625ms) +✔ failed adoption restores the original virtual data-root name and original open database (1229.9266ms) +✔ hot upgrade refreshes retained model and importer methods while preserving credential and routing objects (1692.9317ms) +✔ hot upgrade refuses active probes and restores retained model methods if installation fails (1448.422ms) +ℹ tests 20 +ℹ suites 0 +ℹ pass 20 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 51433.0448 diff --git a/progress.md b/progress.md index 862ce122..bd590f4f 100644 --- a/progress.md +++ b/progress.md @@ -823,3 +823,6 @@ formal-stage已成功,12:28:12Z→12:38:20Z约10分9秒;真实产品setup/ ## 1.17 B–E恢复与边界复核 A已提交578cf88。B/C/D新增协议、请求变体、SSE及能力选路,恢复后42/42相关检查和当前TypeScript/Vite/手机壳/服务构建通过,原日志protocol-current-specialists.tap与protocol-e-current-build.log保留。实际审查发现:probe持有可变连接引用,toggle会令旧修订比较失效;改为快照。检测原账本由progress.modelAttemptId绑定,避免并发任务改变最后一条请求。SSE末尾CR在EOF处补齐边界;原捕获改为Buffer,畸形UTF8也保留原字节,只有发生凭据脱敏才改变工件字节。补原停止/断开工件SHA、实际流式probe、禁用期间检测作废、超时不重发及自有CCSwitch SQLite/TOML协议导入回归。补查尚待本轮专项结果,不预判通过。 只读误猜SessionView/verify-desktop-projects等已通过rg定位,实际桌面工程入口controlled-projects --desktop。一次在Windows使用glob路径产生rg路径错误,未写入;改用实际src/core/storage/artifact-store.mjs及目录检索。递归.qa检索误带旧node_modules导致无用超长输出,后续只读顶层自有执行器。正式PID/Provider未动,真实模型请求0。 + +1.17 E真实操作5组通过,原result与13张截图保持在.qa/model-protocols-ui-5c599342-cbbd-4019-8865-ee1d7b4570e4;主窗口池名、手机接收/停止、390px未知账本已目视核对。补修select明确可访问名称、完成外部API新增后刷新UI夹具、mobile-stream实际选择器、上游停顿的延迟进展、主窗口legacy误判/快速关闭同步、原工件下载字节;37/37、20/20及26/26相关专项分别通过。一次精确替换误命中凭据callback,立即rg核对定位并修正,未执行或部署该中间版本。 +第一次历史全量UI运行误将Purge打包目录当源码目录,原结果/日志逐字节复制到protocol-first-ui-environment-failure后,以source/upstream重新整轮,session82022;早于最终修复启动的full-tests session80218仅作开发中诊断。响应协议真实工程新门槛使用同一受控Node/React/Python算法、原测试、审批与Git,但走实际Responses SSE+ModelHub。当前session64602执行,结果尚未判定。只读路径version/gateway误猜后已用rg定位diagnostics.mjs与server/companion-gateway.mjs,无数据写入。 diff --git a/src/client/App.tsx b/src/client/App.tsx index 19eb1a97..5fc7d0c9 100644 --- a/src/client/App.tsx +++ b/src/client/App.tsx @@ -1,8 +1,8 @@ import { useEffect, useMemo, useRef, useState } from 'react'; import { Activity, Brain, ClipboardCheck, RotateCw, ArrowDownToLine, ArrowRight, ArrowUp, BookOpenText, Check, ChevronDown, ChevronRight, Code2, Copy, File, FileCode2, Folder, FolderOpen, GitBranch, Link2, LoaderCircle, Maximize2, MessageSquare, Minimize2, PanelLeftClose, PanelLeftOpen, Pencil, Play, Plus, Puzzle, Search, Server as ModelServer, Settings2, ShieldCheck, Square, SquareTerminal, Trash2, X } from 'lucide-react'; -import type { Bootstrap, Change, Config, FileEntry, OpenFile, Project, ResearchDoc, Session, SessionBrief, ToolEvent, RuntimeDiagnostics, RuntimeFailure } from './types'; +import type { Bootstrap, Change, Config, ModelSelection, FileEntry, OpenFile, Project, ResearchDoc, Session, SessionBrief, ToolEvent, RuntimeDiagnostics, RuntimeFailure } from './types'; import { api, downloadBlob, exportSession, setToken } from './api'; -import { DiffView, EmptyInspector, IconButton, Modal, ResearchContent, Status, ToolRow, FailureCard } from './components'; +import { DiffView, EmptyInspector, IconButton, Modal, ResearchContent, Status, ToolRow, FailureCard, ModelStreamPreview } from './components'; import { DiagnosticsPanel } from './DiagnosticsPanel'; import { TaskPanel } from './TaskPanel'; import { CodeIndexPanel } from './CodeIndexPanel'; @@ -36,6 +36,7 @@ export default function App() { const [sessionId, setSessionId] = useState(''); const [session, setSession] = useState(null); const [config, setConfig] = useState(defaultConfig); + const [modelSelection, setModelSelection] = useState({ type: "legacy", id: "legacy-default", name: "原模型连接" }); const [exampleId, setExampleId] = useState(null); const [files, setFiles] = useState([]); const [filter, setFilter] = useState(''); @@ -242,7 +243,7 @@ export default function App() { async function submit() { if (!composer.trim() || sending || isRunning || (sessionId && !session)) return; if (restrictedWorker || session?.execution?.collaborations?.some(value => !['completed', 'discarded', 'resolved_external'].includes(value.status))) { setWorkersOpen(true); return; } - if (config.mode === 'compatible' && !config.model) { openSettings(); notify('请先填写模型名称。'); return; } + if (config.mode === 'compatible' && modelSelection.type === 'legacy' && !config.model) { openSettings(); notify('请先填写模型名称。'); return; } setSending(true); const content = composer.trim(); try { @@ -336,7 +337,7 @@ export default function App() { setSettingsBusy(true); try { const payload = { ...settings, ...(keyValue || clearKey ? { apiKey: clearKey ? '' : keyValue } : {}) }; - const saved = await api('/config', payload); setConfig(saved); setSettingsOpen(false); + const saved = await api('/config', payload); setConfig(saved); setModelSelection({ type: "legacy", id: "legacy-default", name: "原模型连接" }); setSettingsOpen(false); notify(saved.mode === 'demo' ? '已切换到离线演示。' : '模型连接已保存。API Key 仅在本次服务内存中使用。'); } catch (error) { failure(error); } finally { setSettingsBusy(false); } } @@ -408,7 +409,7 @@ export default function App() { let alive = true; api('/bootstrap').then(result => { if (!alive) return; - setToken(result.token); setAccess(result.token); setVersion(result.version); setProjects(result.projects); setBriefs(result.sessions); setConfig(result.config); setSettings(result.config); setExampleId(result.exampleProjectId); + setToken(result.token); setAccess(result.token); setVersion(result.version); setProjects(result.projects); setBriefs(result.sessions); setConfig(result.config); if (result.modelSelection) setModelSelection(result.modelSelection); setSettings(result.config); setExampleId(result.exampleProjectId); const savedCursor = Number(sessionStorage.getItem('awb-event-cursor:' + location.origin)); eventCursor.current = Number.isSafeInteger(savedCursor) && savedCursor >= 0 && savedCursor <= (result.eventCursor ?? 0) ? savedCursor : result.eventCursor ?? 0; for (const brief of result.sessions) revisions.current.set(brief.id, brief.revision); @@ -536,7 +537,7 @@ export default function App() {
{(!sidebarOpen || mobile) && setSidebarOpen(true)}>}
{selectedProject?.name || '工作空间'} 任务

{session?.title || '让任务走到完成'}

-
{desktop && }
+
{desktop && }
本地项目{session ? : 等待新任务}
openDiagnostics()}> @@ -556,7 +557,7 @@ export default function App() { {session?.recoveryNotice &&
已恢复会话记录

{session.recoveryNotice}

} {entries.map(entry => 'message' in entry && entry.message ?
{entry.message.role === 'user' ? '你' : entry.message.role === 'assistant' ? 'AW' : '·'}
{entry.message.role === 'user' ? '你的任务' : entry.message.role === 'assistant' ? session?.executionMode === 'demo' ? '演示执行器' : '编程助手' : '工作台'}
{entry.message.role === 'system' && failureForMessage(entry.message) ? openDiagnostics()} onRetry={session?.status === 'failed' && session?.failure?.messageId === entry.message.id ? () => resumeSession() : undefined} busy={resuming || isRunning} /> - : entry.message.role === 'assistant' ? : entry.message.content}
: 'event' in entry && entry.event ?
{['tool', 'model'].includes(entry.event.kind) ? { setEventId(entry.event!.id); showInspector('trace'); }} /> :
{entry.event.label}{entry.event.output &&

{entry.event.output}

}
}
: null)} + : entry.message.role === 'assistant' ? : entry.message.content}
: 'event' in entry && entry.event ?
{['tool', 'model'].includes(entry.event.kind) ? <> { setEventId(entry.event!.id); showInspector('trace'); }} /> :
{entry.event.label}{entry.event.output &&

{entry.event.output}

}
}
: null)} {isRunning && !approval &&
{session?.executionMode === 'demo' ? '正在执行演示流程' : '正在处理任务'}
} } {approval &&
{approval.browserPlanId ? '确认实际页面检查' : approval.checkPlanId ? '确认工程检查' : '确认这次终端执行'}

{approval.reason}

{approval.command}
@@ -566,7 +567,7 @@ export default function App() { {canContinueReview && }
-