console: React 生产级重写(左列表 + 中对话 + 右详情)
旧单页 console.html 换成 Vite + React + TypeScript 单文件构建产物 (309525 字节,sha 90345ec8…,重建字节一致),源码在 cloud/console-react/,改页面只改 src 再 npm run build:console, 产物不手改。布局:左侧列表(模块导航 + 任务列表)、中间标准对话 (实时链路时间线 + 继续会话聊天框,共用 Chat 组件)、右侧详情 (元数据、操作、评审、审批、协调子任务、子代理、线程)。 API 与后端语义未改,key 只存浏览器 localStorage。 6 个 console 标记单测随实现改名更新(意图不变:壳确实调了 这些接口、turn 信息仍在详情里、旧 goal 输入仍不存在); P1 标记单测未动且通过。
This commit is contained in:
1 parent
3f4e849a93
commit
ebc5624893
57 files changed
+4789
-1746
No files matched your search
+17
-11
@@ -63,15 +63,19 @@ class ConsoleTestCase(unittest.TestCase):
|
||||
text = body.decode("utf-8")
|
||||
self.assertIn("Codex 命令台", text)
|
||||
# 壳必须引用它实际调的接口,防 JS 与服务端路由漂移。
|
||||
# React 版(2026-10-29 起):旧单页的 agentBox / threadBox /
|
||||
# THREAD_MUTATION_STATUSES / skillList / appList / mcpList
|
||||
# id 与 /thread/<动作> 字面路径已不存在,改为 React 的
|
||||
# taskAgents / threadText / threadAction + 动作名 /
|
||||
# nav-skills;断言意图不变(壳确实调了这些接口),
|
||||
# 只换成构建产物里实际存在的标记。
|
||||
for marker in ("/health", "/projects", "/tasks", "/workers",
|
||||
"X-API-Key", "agentBox", "/agents",
|
||||
"X-API-Key", "taskAgents", "/agents",
|
||||
"peerMessage", "/messages",
|
||||
"threadBox", "threadGateNote", "threadList",
|
||||
"THREAD_MUTATION_STATUSES",
|
||||
"/thread", "/threads",
|
||||
"/thread/rename", "/thread/archive",
|
||||
"/thread/unarchive", "/thread/compact",
|
||||
"skillList", "appList", "mcpList", "mcpOauthBox",
|
||||
"threadText", "threadGateNote", "threadList",
|
||||
"threadAction", "/thread", "/threads",
|
||||
"rename", "archive", "unarchive", "compact",
|
||||
"nav-skills", "mcpOauthBox",
|
||||
"/skills", "/apps", "/mcp-servers",
|
||||
"/mcp-servers/reload", "/oauth-login"):
|
||||
self.assertIn(marker, text)
|
||||
@@ -99,12 +103,14 @@ class ConsoleTestCase(unittest.TestCase):
|
||||
# 回访用户 key 已在 localStorage 里:初始化序列必须含
|
||||
# loadRelayModels 调用,否则模型下拉永远只有默认项
|
||||
# (2026-10-27 实测:此前只在点“保存”时调一次)。
|
||||
# React 版(2026-10-29 起):旧单页的 setKeyState/loadHealth
|
||||
# 序列已不存在,初始化在 useConsoleStore 的 useEffect 里,
|
||||
# 有 key 时调 loadRelayModels;断言意图不变,只换成
|
||||
# React 构建产物里实际存在的标记。
|
||||
_status, _headers, body = self._get("/console")
|
||||
text = body.decode("utf-8")
|
||||
anchor = "setKeyState();\nloadHealth();\nloadProjects();\nloadWorkers();"
|
||||
self.assertIn(anchor, text)
|
||||
init = text[text.index(anchor):]
|
||||
self.assertIn("if (getKey()) loadRelayModels();", init)
|
||||
self.assertIn("loadRelayModels", text)
|
||||
self.assertIn("/relay/models", text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user