From 1efe29aed3d5270fcff86a7c5c6891a0de7178d4 Mon Sep 17 00:00:00 2001 From: Blizzard Date: Mon, 13 Jul 2026 16:24:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor(desktop):=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=AD=BB=20UI=20/=20=E5=81=87=E5=8A=9F=E8=83=BD(P0=20=E5=AE=8C?= =?UTF-8?q?=E5=96=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 让桌面端只暴露"真的能用"的东西,提升完成度观感、避免误导: - 删顶栏假"版本选择器"(通用版/法律版/医疗版)——死 defaultValue、无 onChange - 删「管理」导航项 + 其占位页/命令——内容是 admin 控制台的事(租户/计费/护栏/模型), 违背 desktop/admin 产品边界,留着只是让用户点了扑空 - 「市场·Packs」标记 ready:false(规划中徽标 + 标题标注),不再伪装成已就绪功能; 移除其命令面板项(命令面板只列真实可达目的地) - Agent 节点模型选项去掉假的"占位 Pool/ollama:qwen/vllm:custom",改由已登记模型 运行时填充(无模型时显示"(无,先创建)"而非可误选的假项);默认 model 置空 Co-Authored-By: Claude Opus 4.8 --- sundynix-desktop/frontend/src/App.tsx | 7 ++----- sundynix-desktop/frontend/src/shell/LeftNav.tsx | 6 ++---- sundynix-desktop/frontend/src/shell/TopBar.tsx | 11 ----------- sundynix-desktop/frontend/src/studio/nodeCatalog.ts | 4 ++-- 4 files changed, 6 insertions(+), 22 deletions(-) diff --git a/sundynix-desktop/frontend/src/App.tsx b/sundynix-desktop/frontend/src/App.tsx index de3b462..1e1b0f6 100644 --- a/sundynix-desktop/frontend/src/App.tsx +++ b/sundynix-desktop/frontend/src/App.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { LayoutDashboard, Workflow, Database, FileText, Activity, Bookmark, Boxes, Settings } from "lucide-react"; +import { LayoutDashboard, Workflow, Database, FileText, Activity, Bookmark } from "lucide-react"; import { TopBar } from "./shell/TopBar"; import { LeftNav, type ViewKey } from "./shell/LeftNav"; @@ -36,8 +36,7 @@ const PLACEHOLDERS: Partial> = kb: { title: "知识库 (RAG)", desc: "入库流水线监控 · 检索调试台(带来源徽标) · 文档/块浏览 · 知识图谱 · 检索评测。依赖 embedding + 入库 worker + 真实混合检索。" }, report: { title: "报告生成", desc: "模板库 · 大纲编辑 · 章节并行生成进度 · 实时预览(含引用) · 导出 docx/pdf。依赖 RAG 核心链 + UniOffice。" }, runs: { title: "运行 · 观测", desc: "实时执行 · 节点轨迹 · 工具调用 · 运行历史复盘。当前运行结果见底部抽屉。" }, - market: { title: "市场 · Packs", desc: "垂直包(法律/医疗/金融) · Agent 模板 · 开通向导(建租户→入库→注册模板→应用配置)。依赖多租户 + Pack 格式。" }, - admin: { title: "管理", desc: "租户/工作区 · 用户计费 · 护栏 · 模型与连接 · 设置。" }, + market: { title: "市场 · Packs(规划中)", desc: "垂直包(法律/医疗/金融) · Agent 模板 · 开通向导(建租户→入库→注册模板→应用配置)。依赖多租户 + Pack 格式。" }, }; export default function App() { @@ -177,8 +176,6 @@ export default function App() { { id: "report", label: "前往 · 报告生成", icon: FileText, group: "页面", keywords: "report 报告 word docx", run: go("report") }, { id: "runs", label: "前往 · 运行观测", icon: Activity, group: "页面", keywords: "runs trace 轨迹 观测", run: go("runs") }, { id: "memory", label: "前往 · 记忆", icon: Bookmark, group: "页面", keywords: "memory 画像 偏好", run: go("memory") }, - { id: "market", label: "前往 · 市场 Packs", icon: Boxes, group: "页面", keywords: "market pack 垂直", run: go("market") }, - { id: "admin", label: "前往 · 管理", icon: Settings, group: "页面", keywords: "admin 租户 模型 设置", run: go("admin") }, { id: "act-report", label: "生成报告", icon: FileText, group: "动作", keywords: "新建 report 撰写", run: go("report") }, { id: "act-ingest", label: "入库知识", icon: Database, group: "动作", keywords: "上传 ingest 文件", run: go("kb") }, { id: "act-studio", label: "新建 Agent 编排", icon: Workflow, group: "动作", keywords: "new flow", run: go("studio") }, diff --git a/sundynix-desktop/frontend/src/shell/LeftNav.tsx b/sundynix-desktop/frontend/src/shell/LeftNav.tsx index 943aed1..374261a 100644 --- a/sundynix-desktop/frontend/src/shell/LeftNav.tsx +++ b/sundynix-desktop/frontend/src/shell/LeftNav.tsx @@ -6,13 +6,12 @@ import { Activity, Bookmark, Boxes, - Settings, Coins, type LucideIcon, } from "lucide-react"; import { cn } from "../ui"; -export type ViewKey = "home" | "studio" | "kb" | "report" | "runs" | "memory" | "usage" | "market" | "admin"; +export type ViewKey = "home" | "studio" | "kb" | "report" | "runs" | "memory" | "usage" | "market"; interface Item { key: ViewKey; @@ -30,8 +29,7 @@ const ITEMS: Item[] = [ { key: "runs", label: "运行", icon: Activity, group: "RUN", ready: true }, { key: "memory", label: "记忆", icon: Bookmark, group: "MANAGE", ready: true }, { key: "usage", label: "用量", icon: Coins, group: "MANAGE", ready: true }, - { key: "market", label: "市场", icon: Boxes, group: "MANAGE" }, - { key: "admin", label: "管理", icon: Settings, group: "MANAGE" }, + { key: "market", label: "市场", icon: Boxes, group: "MANAGE", ready: false }, ]; // 左导航:深色,激活态紫色高亮 + 左侧光条,描线图标。 diff --git a/sundynix-desktop/frontend/src/shell/TopBar.tsx b/sundynix-desktop/frontend/src/shell/TopBar.tsx index ca5bbc5..26d369a 100644 --- a/sundynix-desktop/frontend/src/shell/TopBar.tsx +++ b/sundynix-desktop/frontend/src/shell/TopBar.tsx @@ -130,17 +130,6 @@ export function TopBar({ user, tenant, tenants = [], onSwitchTenant, space, spac sundynix-agentix -
- - -