refactor(desktop): 清理死 UI / 假功能(P0 完善)
让桌面端只暴露"真的能用"的东西,提升完成度观感、避免误导: - 删顶栏假"版本选择器"(通用版/法律版/医疗版)——死 defaultValue、无 onChange - 删「管理」导航项 + 其占位页/命令——内容是 admin 控制台的事(租户/计费/护栏/模型), 违背 desktop/admin 产品边界,留着只是让用户点了扑空 - 「市场·Packs」标记 ready:false(规划中徽标 + 标题标注),不再伪装成已就绪功能; 移除其命令面板项(命令面板只列真实可达目的地) - Agent 节点模型选项去掉假的"占位 Pool/ollama:qwen/vllm:custom",改由已登记模型 运行时填充(无模型时显示"(无,先创建)"而非可误选的假项);默认 model 置空 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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<Record<ViewKey, { title: string; desc: string }>> =
|
||||
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") },
|
||||
|
||||
@@ -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 },
|
||||
];
|
||||
|
||||
// 左导航:深色,激活态紫色高亮 + 左侧光条,描线图标。
|
||||
|
||||
@@ -130,17 +130,6 @@ export function TopBar({ user, tenant, tenants = [], onSwitchTenant, space, spac
|
||||
</div>
|
||||
<span className="brand-gradient text-sm font-semibold">sundynix-agentix</span>
|
||||
</div>
|
||||
<div className="relative" style={NODRAG}>
|
||||
<select
|
||||
className="appearance-none rounded-md border border-line bg-ink-800 py-1 pl-2.5 pr-7 text-xs text-slate-300 focus:border-brand focus:outline-none"
|
||||
defaultValue="通用版"
|
||||
>
|
||||
<option>通用版</option>
|
||||
<option>法律版</option>
|
||||
<option>医疗版</option>
|
||||
</select>
|
||||
<ChevronDown className="pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-500" />
|
||||
</div>
|
||||
<button
|
||||
onClick={onCommand}
|
||||
style={NODRAG}
|
||||
|
||||
@@ -63,12 +63,12 @@ export const NODE_KINDS: Record<string, NodeKind> = {
|
||||
badge: "bg-violet-100 text-violet-700",
|
||||
desc: "调模型生成",
|
||||
fields: [
|
||||
{ key: "model", label: "模型", type: "select", options: ["占位 Pool", "ollama:qwen", "vllm:custom"], required: true },
|
||||
{ key: "model", label: "模型", type: "select", options: [], required: true }, // 运行时由已登记模型填充(dynamicOptions.model)
|
||||
{ key: "system", label: "系统提示词", type: "textarea", placeholder: "你是…" },
|
||||
{ key: "temperature", label: "温度", type: "number" },
|
||||
{ key: "autonomous", label: "自主工具 (ReAct)", type: "checkbox" },
|
||||
],
|
||||
defaults: { model: "占位 Pool", system: "", temperature: 0.7, autonomous: false },
|
||||
defaults: { model: "", system: "", temperature: 0.7, autonomous: false },
|
||||
},
|
||||
coordinator: {
|
||||
kind: "coordinator",
|
||||
|
||||
Reference in New Issue
Block a user