refactor(desktop): 去黑话 + 收基建灯(商业化语言铺开)
把首屏定的"去黑话+精致克制"语言铺到其余页面: - 顶栏 5 盏基建灯(Gateway/DB/NATS/Milvus/Neo4j)→ 一枚「系统正常」状态点 (客户不看数据库名;异常时 tooltip 提示项数,顺带缓解窄屏拥挤) - 知识库:入库阶段标签去实现名(写入向量库/Milvus/Bleve/Neo4j → 建立语义索引/ 全文索引/构建知识关系);检索台「混合召回+rerank」→「在库中搜索」,命中分数 0.83→83%,"RAG 未配置"→"该库可能为空";图谱去「Neo4j·力导向」 - 运行:流式中→生成中;"token 在此流式呈现"→"回复逐字呈现";忠实→可信度/引用 - 编排节点「检索(RAG)」→「知识检索」,描述去"混合检索" Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,20 @@ import { cn } from "../ui";
|
||||
const DRAG = { "--wails-draggable": "drag" } as CSSProperties;
|
||||
const NODRAG = { "--wails-draggable": "no-drag" } as CSSProperties;
|
||||
|
||||
function Light({ on, label }: { on: boolean; label: string }) {
|
||||
const dot = on ? "bg-success shadow-[0_0_8px_rgba(52,211,153,0.7)]" : "bg-danger";
|
||||
// 系统状态:把 5 项基建健康收成一个整体状态点(客户不看数据库名,异常时 tooltip 提示项数)。
|
||||
function SystemStatus({ h }: { h: ReturnType<typeof useHealth> }) {
|
||||
const down = [h.gateway, h.db, h.nats, h.milvus, h.neo4j].filter((v) => !v).length;
|
||||
const ok = down === 0;
|
||||
return (
|
||||
<span className="flex items-center gap-1.5 text-[11px] text-slate-500" title={`${label} ${on ? "在线" : "离线"}`}>
|
||||
<span className={cn("h-1.5 w-1.5 rounded-full", dot)} />
|
||||
{label}
|
||||
<span
|
||||
title={ok ? "所有服务运行正常" : `${down} 项服务暂不可用`}
|
||||
className={cn(
|
||||
"flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11px]",
|
||||
ok ? "border-line text-slate-500" : "border-warn/40 text-warn",
|
||||
)}
|
||||
>
|
||||
<span className={cn("h-1.5 w-1.5 rounded-full", ok ? "bg-success" : "bg-warn")} />
|
||||
{ok ? "系统正常" : "部分异常"}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@@ -140,12 +148,8 @@ export function TopBar({ user, tenant, tenants = [], onSwitchTenant, space, spac
|
||||
搜索与命令
|
||||
<kbd className="rounded border border-line px-1 font-mono text-[10px] text-slate-500">⌘K</kbd>
|
||||
</button>
|
||||
<div className="ml-2 flex items-center gap-3">
|
||||
<Light on={h.gateway} label="Gateway" />
|
||||
<Light on={h.db} label="DB" />
|
||||
<Light on={h.nats} label="NATS" />
|
||||
<Light on={h.milvus} label="Milvus" />
|
||||
<Light on={h.neo4j} label="Neo4j" />
|
||||
<div className="ml-2">
|
||||
<SystemStatus h={h} />
|
||||
</div>
|
||||
<div className="ml-auto flex items-center gap-2" style={NODRAG}>
|
||||
<TenantSwitcher tenants={tenants} activeId={tenant?.tenant?.id} onSwitch={onSwitchTenant} />
|
||||
|
||||
Reference in New Issue
Block a user