console: 一页式控制台排版 + 数据卡片
保持 Muse 风格(白底、细线、灰/浅蓝气泡),不再四栏切视图: 顶栏(连接/健康/配额/刷新 + 锚点导航)+ 6 张数据卡片 (健康、配额、任务、Workers、项目、项目数据,均取自已有 store 数据,未加载不以 0 充数)+ 所有模块按顺序铺在一页 (派发、任务列表、对话+详情、项目、环境、Workers、技能、 自动化、分诊、管理区、API Key)。图标栏与右侧栏删除, 内容分别移到顶栏与各自模块下;今天列表与任务列表重复, 不再单独保留;对话为空时不再重复渲染派发表单。 含自动选第一个项目修复(主要聊天不再空)与继续消息 历史,console 标记单测本地 53 项通过。
This commit is contained in:
1 parent
a13762cfbe
commit
8b455c6554
9 files changed
+263
-272
No files matched your search
@@ -35,6 +35,18 @@ export function useConsoleStore(): ConsoleCtx {
|
||||
void tools.refreshTriage(id);
|
||||
}, [catalog, taskList, tools]);
|
||||
|
||||
// Fix: the old single page's project <select> defaulted to its first
|
||||
// option once loaded, so tasks loaded without a click. The React
|
||||
// version is a controlled select with projectId "" on every reload,
|
||||
// so without this the task list stayed on "先选项目" forever and
|
||||
// auto-refresh never fixed it. Auto-select the first project only
|
||||
// while nothing is selected; an explicit user choice is never
|
||||
// overridden.
|
||||
const firstProjectId = catalog.projects[0]?.id;
|
||||
useEffect(() => {
|
||||
if (!catalog.projectId && firstProjectId) selectProject(firstProjectId);
|
||||
}, [catalog.projectId, firstProjectId, selectProject]);
|
||||
|
||||
const saveKeyInput = useCallback((v: string) => {
|
||||
catalog.saveKeyInput(v);
|
||||
if (!v.trim()) return;
|
||||
|
||||
Reference in new issue
Block a user