Sync: add semantic index and lsp notes
This commit is contained in:
790
Project/fonrey/UI_SYSTEM/preview.html
Normal file
790
Project/fonrey/UI_SYSTEM/preview.html
Normal file
@@ -0,0 +1,790 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fonrey UI System · 样板预览 v1.0</title>
|
||||
<meta name="viewport" content="width=1280">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: {
|
||||
50:'#F0FDFA',100:'#CCFBF1',200:'#99F6E4',
|
||||
500:'#14B8A6',600:'#0F766E',700:'#115E59',800:'#134E4A',
|
||||
},
|
||||
neutral: {
|
||||
50:'#F8FAFC',100:'#F1F5F9',200:'#E2E8F0',300:'#CBD5E1',
|
||||
400:'#94A3B8',500:'#64748B',600:'#475569',700:'#334155',
|
||||
800:'#1E293B',900:'#0F172A',
|
||||
},
|
||||
success:{50:'#F0FDF4',600:'#16A34A'},
|
||||
warning:{50:'#FFFBEB',600:'#D97706'},
|
||||
danger: {50:'#FEF2F2',600:'#DC2626'},
|
||||
info: {50:'#EFF6FF',600:'#2563EB'},
|
||||
},
|
||||
boxShadow: {
|
||||
xs:'0 1px 2px rgba(15,23,42,0.04)',
|
||||
},
|
||||
fontFamily: {
|
||||
sans:['Inter','PingFang SC','Microsoft YaHei','sans-serif'],
|
||||
mono:['JetBrains Mono','SFMono-Regular','Menlo','monospace'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body { font-family: 'Inter','PingFang SC','Microsoft YaHei',sans-serif; }
|
||||
.tabular-nums { font-variant-numeric: tabular-nums; }
|
||||
/* 轻微滚动条 */
|
||||
::-webkit-scrollbar{width:8px;height:8px}
|
||||
::-webkit-scrollbar-thumb{background:#CBD5E1;border-radius:4px}
|
||||
::-webkit-scrollbar-thumb:hover{background:#94A3B8}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-neutral-50 text-neutral-700 text-sm antialiased">
|
||||
|
||||
<!-- ============ 顶部导航 ============ -->
|
||||
<header class="sticky top-0 z-20 bg-white border-b border-neutral-200">
|
||||
<div class="flex items-center h-14 px-6 gap-6">
|
||||
<!-- Logo -->
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-7 h-7 rounded-md bg-primary-600 flex items-center justify-center text-white font-semibold">F</div>
|
||||
<span class="font-semibold text-neutral-800 text-base">Fonrey · 房睿</span>
|
||||
</div>
|
||||
<!-- 主导航 -->
|
||||
<nav class="flex items-center gap-1 text-sm">
|
||||
<a class="px-3 py-1.5 rounded-md text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900">工作台</a>
|
||||
<a class="px-3 py-1.5 rounded-md bg-primary-50 text-primary-700 font-medium">房源</a>
|
||||
<a class="px-3 py-1.5 rounded-md text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900">客源</a>
|
||||
<a class="px-3 py-1.5 rounded-md text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900">楼盘</a>
|
||||
<a class="px-3 py-1.5 rounded-md text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900">组织人事</a>
|
||||
<a class="px-3 py-1.5 rounded-md text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900">设置</a>
|
||||
</nav>
|
||||
<!-- 全局搜索 -->
|
||||
<div class="flex-1 max-w-md relative">
|
||||
<svg class="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-neutral-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-4.3-4.3M11 19a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/></svg>
|
||||
<input type="text" placeholder="搜索房源 / 客户 / 楼盘 ⌘K"
|
||||
class="w-full pl-9 pr-3 py-1.5 text-sm rounded-md bg-neutral-100 border border-transparent hover:bg-neutral-50 hover:border-neutral-300 focus:bg-white focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20 focus:outline-none placeholder:text-neutral-400">
|
||||
</div>
|
||||
<!-- 右侧操作 -->
|
||||
<div class="flex items-center gap-1">
|
||||
<button class="relative p-1.5 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 rounded-md">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022 23.848 23.848 0 0 0 5.454 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"/></svg>
|
||||
<span class="absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-danger-600"></span>
|
||||
</button>
|
||||
<button class="p-1.5 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 rounded-md">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/></svg>
|
||||
</button>
|
||||
<div class="flex items-center gap-2 pl-3 ml-1 border-l border-neutral-200">
|
||||
<div class="w-7 h-7 rounded-full bg-primary-600 text-white flex items-center justify-center text-xs font-semibold">WS</div>
|
||||
<div class="text-xs leading-tight">
|
||||
<div class="font-medium text-neutral-800">魏深</div>
|
||||
<div class="text-neutral-500">朝阳大区·大望路店</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- ============ 主容器 ============ -->
|
||||
<div class="flex">
|
||||
<!-- 侧边栏 -->
|
||||
<aside class="w-56 shrink-0 border-r border-neutral-200 bg-white min-h-[calc(100vh-3.5rem)]">
|
||||
<nav class="p-3 space-y-0.5 text-sm">
|
||||
<div class="px-2 pt-2 pb-1 text-xs font-medium text-neutral-500 uppercase tracking-wide">房源管理</div>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md bg-primary-50 text-primary-700 font-medium">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12 12 3l9.75 9M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75"/></svg>
|
||||
全部房源 <span class="ml-auto text-xs text-neutral-500 tabular-nums">89,204</span>
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<svg class="w-4 h-4 text-neutral-400" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75Zm6.75-3C9.75 9.504 10.254 9 10.875 9h2.25c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125v-9.75Zm6.75-4.5c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v14.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V5.625Z"/></svg>
|
||||
我的房源 <span class="ml-auto text-xs text-neutral-500 tabular-nums">248</span>
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<svg class="w-4 h-4 text-neutral-400" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"/></svg>
|
||||
收藏
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<svg class="w-4 h-4 text-neutral-400" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>
|
||||
待审核 <span class="ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-warning-50 text-warning-600 tabular-nums">12</span>
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<svg class="w-4 h-4 text-neutral-400" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/></svg>
|
||||
回收站
|
||||
</a>
|
||||
|
||||
<div class="px-2 pt-4 pb-1 text-xs font-medium text-neutral-500 uppercase tracking-wide">视图</div>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-success-600"></span> 本周新上
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-warning-600"></span> 钥匙房源
|
||||
</a>
|
||||
<a class="flex items-center gap-2 px-2 py-1.5 rounded-md text-neutral-700 hover:bg-neutral-100">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-info-600"></span> 降价提醒
|
||||
</a>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<!-- 内容区 -->
|
||||
<main class="flex-1 min-w-0 px-6 py-5 space-y-6">
|
||||
|
||||
<!-- 面包屑 + 页面头 -->
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<nav class="flex items-center gap-1 text-xs text-neutral-500 mb-1">
|
||||
<a class="hover:text-neutral-700">工作台</a>
|
||||
<svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/></svg>
|
||||
<a class="hover:text-neutral-700">房源</a>
|
||||
<svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/></svg>
|
||||
<span class="text-neutral-700">全部房源</span>
|
||||
</nav>
|
||||
<h1 class="text-xl font-semibold text-neutral-800">全部房源</h1>
|
||||
<p class="text-xs text-neutral-500 mt-0.5">管理租户下所有房源数据 · 最近同步于 2 分钟前</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium bg-white border border-neutral-300 text-neutral-700 rounded-md hover:bg-neutral-50 hover:border-neutral-400">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg>
|
||||
导出
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium bg-white border border-neutral-300 text-neutral-700 rounded-md hover:bg-neutral-50 hover:border-neutral-400">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"/></svg>
|
||||
导入
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium bg-primary-600 text-white rounded-md hover:bg-primary-700 active:bg-primary-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-600/40">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
|
||||
新增房源
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Stat Cards -->
|
||||
<section class="grid grid-cols-4 gap-4">
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<div class="text-xs text-neutral-500">在售房源</div>
|
||||
<div class="mt-1.5 text-xl font-semibold text-neutral-900 tabular-nums">24,891</div>
|
||||
</div>
|
||||
<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600 tabular-nums">
|
||||
<svg class="w-3 h-3" fill="currentColor" viewBox="0 0 20 20"><path d="M10 3a1 1 0 0 1 .7.3l5 5a1 1 0 1 1-1.4 1.4L11 6.42V16a1 1 0 1 1-2 0V6.42L5.7 9.7a1 1 0 0 1-1.4-1.4l5-5A1 1 0 0 1 10 3Z"/></svg>
|
||||
+4.2%
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-2 text-xs text-neutral-500">较上周 <span class="tabular-nums">+1,003</span></div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<div class="text-xs text-neutral-500">本月新增</div>
|
||||
<div class="mt-1.5 text-xl font-semibold text-neutral-900 tabular-nums">1,284</div>
|
||||
</div>
|
||||
<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600 tabular-nums">+12.8%</span>
|
||||
</div>
|
||||
<div class="mt-2 text-xs text-neutral-500">目标 <span class="tabular-nums">1,500</span> · 完成 85%</div>
|
||||
<div class="mt-2 h-1 rounded-full bg-neutral-100 overflow-hidden">
|
||||
<div class="h-full bg-primary-600" style="width:85%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<div class="text-xs text-neutral-500">待审核</div>
|
||||
<div class="mt-1.5 text-xl font-semibold text-neutral-900 tabular-nums">12</div>
|
||||
</div>
|
||||
<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-warning-50 text-warning-600">需处理</span>
|
||||
</div>
|
||||
<div class="mt-2 text-xs text-primary-600 hover:underline cursor-pointer">查看待审核列表 →</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<div class="text-xs text-neutral-500">本月成交</div>
|
||||
<div class="mt-1.5 text-xl font-semibold text-neutral-900 tabular-nums">86</div>
|
||||
</div>
|
||||
<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-danger-50 text-danger-600 tabular-nums">-2.1%</span>
|
||||
</div>
|
||||
<div class="mt-2 text-xs text-neutral-500">GMV <span class="tabular-nums font-medium text-neutral-700">¥2.14亿</span></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 筛选栏 -->
|
||||
<section class="bg-white rounded-lg border border-neutral-200 shadow-xs">
|
||||
<!-- Tabs -->
|
||||
<div class="flex items-center px-4 border-b border-neutral-200">
|
||||
<nav class="flex items-center gap-1">
|
||||
<button class="relative px-3 py-3 text-sm font-medium text-primary-700">
|
||||
全部 <span class="ml-1 text-xs text-neutral-500 tabular-nums">89,204</span>
|
||||
<span class="absolute bottom-0 inset-x-0 h-0.5 bg-primary-600 rounded-t"></span>
|
||||
</button>
|
||||
<button class="px-3 py-3 text-sm text-neutral-600 hover:text-neutral-900">在售 <span class="ml-1 text-xs text-neutral-500 tabular-nums">24,891</span></button>
|
||||
<button class="px-3 py-3 text-sm text-neutral-600 hover:text-neutral-900">已成交 <span class="ml-1 text-xs text-neutral-500 tabular-nums">8,120</span></button>
|
||||
<button class="px-3 py-3 text-sm text-neutral-600 hover:text-neutral-900">已下架 <span class="ml-1 text-xs text-neutral-500 tabular-nums">3,402</span></button>
|
||||
<button class="px-3 py-3 text-sm text-neutral-600 hover:text-neutral-900">钥匙房源 <span class="ml-1 text-xs text-neutral-500 tabular-nums">612</span></button>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- 筛选条件 -->
|
||||
<div class="p-4 border-b border-neutral-200 space-y-3">
|
||||
<div class="flex flex-wrap gap-2 items-center">
|
||||
<!-- 搜索 -->
|
||||
<div class="relative w-64">
|
||||
<svg class="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-neutral-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-4.3-4.3M11 19a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/></svg>
|
||||
<input type="text" placeholder="房源编号 / 标题 / 业主"
|
||||
class="w-full pl-9 pr-3 py-1.5 text-sm rounded-md border border-neutral-300 focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20 focus:outline-none">
|
||||
</div>
|
||||
<!-- 下拉筛选 -->
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-white border border-neutral-300 rounded-md hover:bg-neutral-50 text-neutral-700">
|
||||
商圈:朝阳·大望路 <svg class="w-3 h-3 text-neutral-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/></svg>
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-white border border-neutral-300 rounded-md hover:bg-neutral-50 text-neutral-700">
|
||||
户型:全部 <svg class="w-3 h-3 text-neutral-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/></svg>
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-primary-50 border border-primary-600 rounded-md text-primary-700">
|
||||
价格:500-800万 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/></svg>
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-white border border-neutral-300 rounded-md hover:bg-neutral-50 text-neutral-700">
|
||||
面积 <svg class="w-3 h-3 text-neutral-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/></svg>
|
||||
</button>
|
||||
<button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-white border border-neutral-300 rounded-md hover:bg-neutral-50 text-neutral-700">
|
||||
更多筛选 <span class="px-1 rounded bg-primary-600 text-white text-xs tabular-nums">2</span>
|
||||
</button>
|
||||
<div class="flex-1"></div>
|
||||
<button class="text-sm text-neutral-500 hover:text-neutral-700 px-2 py-1.5">重置</button>
|
||||
</div>
|
||||
|
||||
<!-- 已选条件 Tag -->
|
||||
<div class="flex flex-wrap gap-1.5 items-center text-xs">
|
||||
<span class="text-neutral-500">已筛选:</span>
|
||||
<span class="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-primary-50 text-primary-700 font-medium">
|
||||
价格 500-800万
|
||||
<button class="hover:text-primary-800"><svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/></svg></button>
|
||||
</span>
|
||||
<span class="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-primary-50 text-primary-700 font-medium">
|
||||
朝阳·大望路
|
||||
<button class="hover:text-primary-800"><svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/></svg></button>
|
||||
</span>
|
||||
<button class="text-neutral-500 hover:text-neutral-700 underline underline-offset-2">清除全部</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工具栏 -->
|
||||
<div class="flex items-center justify-between px-4 py-2 bg-neutral-50 border-b border-neutral-200">
|
||||
<div class="flex items-center gap-2 text-xs text-neutral-600">
|
||||
共 <span class="font-medium text-neutral-900 tabular-nums">1,284</span> 条结果
|
||||
<span class="text-neutral-400">·</span>
|
||||
已选 <span class="font-medium text-primary-700 tabular-nums">3</span> 条
|
||||
<button class="text-primary-600 hover:text-primary-700 hover:underline underline-offset-2 ml-1">批量操作 ▾</button>
|
||||
</div>
|
||||
<div class="flex items-center gap-1">
|
||||
<button class="p-1.5 text-neutral-500 hover:bg-neutral-100 rounded-md" title="密度">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"/></svg>
|
||||
</button>
|
||||
<button class="p-1.5 text-neutral-500 hover:bg-neutral-100 rounded-md" title="列设置">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"/></svg>
|
||||
</button>
|
||||
<button class="p-1.5 text-neutral-500 hover:bg-neutral-100 rounded-md" title="刷新">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-neutral-50 border-b border-neutral-200">
|
||||
<tr class="text-left text-xs font-medium text-neutral-600 uppercase tracking-wide">
|
||||
<th class="px-3 py-2.5 w-10"><input type="checkbox" class="rounded border-neutral-300 text-primary-600 focus:ring-primary-600/30"></th>
|
||||
<th class="px-3 py-2.5 w-28">编号</th>
|
||||
<th class="px-3 py-2.5 min-w-[240px]">房源标题</th>
|
||||
<th class="px-3 py-2.5">户型</th>
|
||||
<th class="px-3 py-2.5 text-right">面积 (㎡)</th>
|
||||
<th class="px-3 py-2.5 text-right">总价 (万)</th>
|
||||
<th class="px-3 py-2.5 text-right">单价 (元/㎡)</th>
|
||||
<th class="px-3 py-2.5">状态</th>
|
||||
<th class="px-3 py-2.5">维护人</th>
|
||||
<th class="px-3 py-2.5">录入时间</th>
|
||||
<th class="px-3 py-2.5 w-24 text-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-neutral-100">
|
||||
<!-- Row 1 -->
|
||||
<tr class="hover:bg-neutral-50 group">
|
||||
<td class="px-3 py-3"><input type="checkbox" checked class="rounded border-neutral-300 text-primary-600 focus:ring-primary-600/30"></td>
|
||||
<td class="px-3 py-3 font-mono text-xs text-neutral-600">F20268142</td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded bg-neutral-100 shrink-0 overflow-hidden flex items-center justify-center text-neutral-400">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"/></svg>
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<div class="font-medium text-neutral-900 truncate">绿城百合公寓 · 南北通透三居 · 业主诚心出售</div>
|
||||
<div class="text-xs text-neutral-500 truncate">大望路 · 绿城百合公寓 · 中楼层/32层</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-700">3室2厅</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">128.50</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums font-medium text-neutral-900">680</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">52,918</td>
|
||||
<td class="px-3 py-3"><span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600"><span class="w-1.5 h-1.5 rounded-full bg-success-600"></span>在售</span></td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<div class="w-6 h-6 rounded-full bg-primary-600 text-white flex items-center justify-center text-xs font-semibold">魏</div>
|
||||
<span class="text-neutral-700">魏深</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-500 text-xs tabular-nums">2026-04-20 14:32</td>
|
||||
<td class="px-3 py-3 text-right">
|
||||
<div class="flex items-center gap-1 justify-end opacity-0 group-hover:opacity-100 transition">
|
||||
<button class="p-1 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 rounded" title="编辑"><svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"/></svg></button>
|
||||
<button class="p-1 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 rounded" title="更多"><svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20"><path d="M10 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM10 11.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM11.5 15.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"/></svg></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Row 2 -->
|
||||
<tr class="hover:bg-neutral-50 group bg-primary-50/40">
|
||||
<td class="px-3 py-3"><input type="checkbox" checked class="rounded border-neutral-300 text-primary-600"></td>
|
||||
<td class="px-3 py-3 font-mono text-xs text-neutral-600">F20267891</td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded bg-neutral-100 shrink-0"></div>
|
||||
<div class="min-w-0">
|
||||
<div class="font-medium text-neutral-900 truncate">
|
||||
万科翡翠长安 · 精装两居 · 满五唯一
|
||||
<span class="ml-1 inline-flex items-center px-1 py-0 rounded text-[10px] font-medium bg-danger-50 text-danger-600 align-middle">急售</span>
|
||||
</div>
|
||||
<div class="text-xs text-neutral-500 truncate">CBD · 万科翡翠长安 · 高楼层/28层</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-700">2室1厅</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">89.20</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums font-medium text-neutral-900">
|
||||
<span class="line-through text-neutral-400 text-xs mr-1">780</span>720
|
||||
</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">80,717</td>
|
||||
<td class="px-3 py-3"><span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-warning-50 text-warning-600"><span class="w-1.5 h-1.5 rounded-full bg-warning-600"></span>待核验</span></td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<div class="w-6 h-6 rounded-full bg-info-600 text-white flex items-center justify-center text-xs font-semibold">李</div>
|
||||
<span class="text-neutral-700">李明泽</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-500 text-xs tabular-nums">2026-04-19 09:15</td>
|
||||
<td class="px-3 py-3"></td>
|
||||
</tr>
|
||||
<!-- Row 3 -->
|
||||
<tr class="hover:bg-neutral-50 group">
|
||||
<td class="px-3 py-3"><input type="checkbox" checked class="rounded border-neutral-300 text-primary-600"></td>
|
||||
<td class="px-3 py-3 font-mono text-xs text-neutral-600">F20267403</td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded bg-neutral-100 shrink-0"></div>
|
||||
<div class="min-w-0">
|
||||
<div class="font-medium text-neutral-900 truncate">远洋万和城 · 花园洋房 · 带车位</div>
|
||||
<div class="text-xs text-neutral-500 truncate">亮马桥 · 远洋万和城 · 低楼层/6层</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-700">4室2厅</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">186.00</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums font-medium text-neutral-900">1,280</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">68,817</td>
|
||||
<td class="px-3 py-3"><span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-info-50 text-info-600"><span class="w-1.5 h-1.5 rounded-full bg-info-600"></span>已成交</span></td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<div class="w-6 h-6 rounded-full bg-warning-600 text-white flex items-center justify-center text-xs font-semibold">张</div>
|
||||
<span class="text-neutral-700">张晓雨</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-500 text-xs tabular-nums">2026-04-15 16:48</td>
|
||||
<td class="px-3 py-3"></td>
|
||||
</tr>
|
||||
<!-- Row 4 -->
|
||||
<tr class="hover:bg-neutral-50 group">
|
||||
<td class="px-3 py-3"><input type="checkbox" class="rounded border-neutral-300 text-primary-600"></td>
|
||||
<td class="px-3 py-3 font-mono text-xs text-neutral-600">F20266912</td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded bg-neutral-100 shrink-0"></div>
|
||||
<div class="min-w-0">
|
||||
<div class="font-medium text-neutral-900 truncate">
|
||||
华贸城 · 顶跃复式 · 精装未住
|
||||
<span class="ml-1 inline-flex items-center px-1 py-0 rounded text-[10px] font-medium bg-primary-100 text-primary-700 align-middle">VR</span>
|
||||
<span class="ml-1 inline-flex items-center px-1 py-0 rounded text-[10px] font-medium bg-warning-50 text-warning-600 align-middle">钥匙</span>
|
||||
</div>
|
||||
<div class="text-xs text-neutral-500 truncate">建外 · 华贸城 · 顶层/26层</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-700">5室3厅</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">280.50</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums font-medium text-neutral-900">2,680</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">95,544</td>
|
||||
<td class="px-3 py-3"><span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600"><span class="w-1.5 h-1.5 rounded-full bg-success-600"></span>在售</span></td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<div class="w-6 h-6 rounded-full bg-neutral-400 text-white flex items-center justify-center text-xs font-semibold">王</div>
|
||||
<span class="text-neutral-700">王建国</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-500 text-xs tabular-nums">2026-04-12 11:20</td>
|
||||
<td class="px-3 py-3"></td>
|
||||
</tr>
|
||||
<!-- Row 5 - 下架 -->
|
||||
<tr class="hover:bg-neutral-50 group opacity-60">
|
||||
<td class="px-3 py-3"><input type="checkbox" class="rounded border-neutral-300 text-primary-600"></td>
|
||||
<td class="px-3 py-3 font-mono text-xs text-neutral-600">F20266541</td>
|
||||
<td class="px-3 py-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded bg-neutral-100 shrink-0"></div>
|
||||
<div class="min-w-0">
|
||||
<div class="font-medium text-neutral-700 truncate line-through">观湖国际 · 商住两用</div>
|
||||
<div class="text-xs text-neutral-500 truncate">国贸 · 观湖国际</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-3 text-neutral-700">1室</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">52.80</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums font-medium text-neutral-700">380</td>
|
||||
<td class="px-3 py-3 text-right tabular-nums text-neutral-700">71,970</td>
|
||||
<td class="px-3 py-3"><span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-neutral-100 text-neutral-600"><span class="w-1.5 h-1.5 rounded-full bg-neutral-400"></span>已下架</span></td>
|
||||
<td class="px-3 py-3"><span class="text-neutral-500">—</span></td>
|
||||
<td class="px-3 py-3 text-neutral-500 text-xs tabular-nums">2026-03-28 08:05</td>
|
||||
<td class="px-3 py-3"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="flex items-center justify-between px-4 py-3 border-t border-neutral-200">
|
||||
<div class="text-xs text-neutral-500">
|
||||
显示 <span class="tabular-nums font-medium text-neutral-700">1-20</span> 条,共 <span class="tabular-nums font-medium text-neutral-700">1,284</span> 条
|
||||
</div>
|
||||
<div class="flex items-center gap-1">
|
||||
<button class="px-2 py-1 text-sm text-neutral-400 rounded-md cursor-not-allowed">← 上一页</button>
|
||||
<button class="w-8 h-8 text-sm rounded-md bg-primary-600 text-white font-medium tabular-nums">1</button>
|
||||
<button class="w-8 h-8 text-sm rounded-md hover:bg-neutral-100 text-neutral-700 tabular-nums">2</button>
|
||||
<button class="w-8 h-8 text-sm rounded-md hover:bg-neutral-100 text-neutral-700 tabular-nums">3</button>
|
||||
<button class="w-8 h-8 text-sm rounded-md hover:bg-neutral-100 text-neutral-700 tabular-nums">4</button>
|
||||
<span class="px-1 text-neutral-400">…</span>
|
||||
<button class="w-8 h-8 text-sm rounded-md hover:bg-neutral-100 text-neutral-700 tabular-nums">65</button>
|
||||
<button class="px-2 py-1 text-sm text-neutral-700 hover:bg-neutral-100 rounded-md">下一页 →</button>
|
||||
<select class="ml-3 px-2 py-1 text-sm border border-neutral-300 rounded-md bg-white text-neutral-700 focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20 focus:outline-none">
|
||||
<option>20 条/页</option>
|
||||
<option>50 条/页</option>
|
||||
<option>100 条/页</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 组件展示区 -->
|
||||
<section class="grid grid-cols-2 gap-4">
|
||||
|
||||
<!-- 表单 -->
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">表单组件 · Form</h2>
|
||||
<form class="space-y-3">
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-neutral-700">房源标题 <span class="text-danger-600">*</span></label>
|
||||
<input type="text" value="绿城百合公寓 · 南北通透三居"
|
||||
class="block w-full px-3 py-2 text-sm rounded-md border border-neutral-300 focus:outline-none focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20">
|
||||
<p class="text-xs text-neutral-500">不超过 50 字,将用于客户端展示</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-neutral-700">户型</label>
|
||||
<select class="block w-full px-3 py-2 text-sm rounded-md border border-neutral-300 bg-white focus:outline-none focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20">
|
||||
<option>3室2厅2卫</option><option>2室1厅1卫</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-neutral-700">面积 (㎡)</label>
|
||||
<input type="text" value="128.5"
|
||||
class="block w-full px-3 py-2 text-sm rounded-md border border-neutral-300 tabular-nums focus:outline-none focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-neutral-700">价格 (万) <span class="text-danger-600">*</span></label>
|
||||
<input type="text" value="abc"
|
||||
class="block w-full px-3 py-2 text-sm rounded-md border border-danger-600 tabular-nums focus:outline-none focus:ring-2 focus:ring-danger-600/20">
|
||||
<p class="text-xs text-danger-600">价格必须是数字</p>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-neutral-700">描述</label>
|
||||
<textarea rows="3" class="block w-full px-3 py-2 text-sm rounded-md border border-neutral-300 focus:outline-none focus:border-primary-600 focus:ring-2 focus:ring-primary-600/20" placeholder="请输入房源描述..."></textarea>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<label class="inline-flex items-center gap-2 text-sm text-neutral-700">
|
||||
<input type="checkbox" checked class="rounded border-neutral-300 text-primary-600 focus:ring-primary-600/30"> 同步到小程序
|
||||
</label>
|
||||
<label class="inline-flex items-center gap-2 text-sm text-neutral-700">
|
||||
<input type="radio" name="r" checked class="border-neutral-300 text-primary-600 focus:ring-primary-600/30"> 出售
|
||||
</label>
|
||||
<label class="inline-flex items-center gap-2 text-sm text-neutral-700">
|
||||
<input type="radio" name="r" class="border-neutral-300 text-primary-600 focus:ring-primary-600/30"> 出租
|
||||
</label>
|
||||
<!-- Switch -->
|
||||
<label class="inline-flex items-center gap-2 text-sm text-neutral-700 ml-auto">
|
||||
启用
|
||||
<span class="relative inline-flex h-5 w-9 items-center rounded-full bg-primary-600 transition">
|
||||
<span class="inline-block h-4 w-4 transform rounded-full bg-white translate-x-4 transition"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex justify-end gap-2 pt-3 border-t border-neutral-200">
|
||||
<button type="button" class="px-3 py-1.5 text-sm font-medium bg-white border border-neutral-300 text-neutral-700 rounded-md hover:bg-neutral-50">取消</button>
|
||||
<button type="submit" class="px-3 py-1.5 text-sm font-medium bg-primary-600 text-white rounded-md hover:bg-primary-700">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 按钮 + Badge + Alert + Timeline -->
|
||||
<div class="space-y-4">
|
||||
|
||||
<!-- 按钮 -->
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">按钮与标签 · Buttons & Badges</h2>
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
<button class="px-3 py-1.5 text-sm font-medium bg-primary-600 text-white rounded-md hover:bg-primary-700">Primary</button>
|
||||
<button class="px-3 py-1.5 text-sm font-medium bg-white border border-neutral-300 text-neutral-700 rounded-md hover:bg-neutral-50 hover:border-neutral-400">Secondary</button>
|
||||
<button class="px-3 py-1.5 text-sm font-medium bg-danger-600 text-white rounded-md hover:bg-danger-600/90">Danger</button>
|
||||
<button class="px-3 py-1.5 text-sm font-medium text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900 rounded-md">Ghost</button>
|
||||
<button class="px-3 py-1.5 text-sm font-medium text-primary-600 hover:text-primary-700 hover:underline underline-offset-2">Link</button>
|
||||
<button disabled class="px-3 py-1.5 text-sm font-medium bg-primary-600 text-white rounded-md opacity-50 cursor-not-allowed">Disabled</button>
|
||||
<button disabled class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium bg-primary-600 text-white rounded-md opacity-70 cursor-wait">
|
||||
<svg class="w-4 h-4 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4z"/></svg>
|
||||
保存中…
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-1.5 mb-3">
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary-50 text-primary-700">Primary</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600">Success</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-warning-50 text-warning-600">Warning</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-danger-50 text-danger-600">Danger</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-info-50 text-info-600">Info</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-neutral-100 text-neutral-600">Neutral</span>
|
||||
<span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-success-50 text-success-600"><span class="w-1.5 h-1.5 rounded-full bg-success-600"></span>带圆点</span>
|
||||
</div>
|
||||
<div class="flex gap-1.5">
|
||||
<kbd class="px-1.5 py-0.5 text-xs font-mono border border-neutral-300 rounded bg-neutral-50 text-neutral-600">⌘</kbd>
|
||||
<kbd class="px-1.5 py-0.5 text-xs font-mono border border-neutral-300 rounded bg-neutral-50 text-neutral-600">K</kbd>
|
||||
<span class="text-xs text-neutral-500 self-center ml-1">快捷键样式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Alert -->
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">提示条 · Alert</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex gap-3 p-3 rounded-md bg-info-50 border border-info-600/20">
|
||||
<svg class="w-5 h-5 text-info-600 shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd"/></svg>
|
||||
<div class="text-sm text-info-600">
|
||||
<div class="font-medium">提示</div>
|
||||
<div class="text-info-600/80 mt-0.5">房源信息将在审核后对外展示</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-3 p-3 rounded-md bg-warning-50 border border-warning-600/20">
|
||||
<svg class="w-5 h-5 text-warning-600 shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd"/></svg>
|
||||
<div class="text-sm text-warning-600">
|
||||
<div class="font-medium">即将过期</div>
|
||||
<div class="text-warning-600/80 mt-0.5">3 个房源委托将在 7 天内到期</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-3 p-3 rounded-md bg-danger-50 border border-danger-600/20">
|
||||
<svg class="w-5 h-5 text-danger-600 shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm-1.75-4.75a.75.75 0 1 1 1.5 0v3a.75.75 0 0 1-1.5 0v-3ZM10 6a.75.75 0 0 0-.75.75v5.25a.75.75 0 0 0 1.5 0V6.75A.75.75 0 0 0 10 6Z" clip-rule="evenodd"/></svg>
|
||||
<div class="text-sm text-danger-600">
|
||||
<div class="font-medium">操作失败</div>
|
||||
<div class="text-danger-600/80 mt-0.5">无法删除该房源,仍有关联跟进记录</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Timeline -->
|
||||
<div class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">跟进时间线 · Timeline</h2>
|
||||
<ol class="relative border-l-2 border-neutral-200 ml-2 space-y-5">
|
||||
<li class="ml-4">
|
||||
<span class="absolute -left-[7px] w-3 h-3 rounded-full bg-primary-600 ring-4 ring-white"></span>
|
||||
<div class="text-sm">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-medium text-neutral-900">魏深</span>
|
||||
<span class="text-xs text-neutral-500 tabular-nums">今天 14:32</span>
|
||||
</div>
|
||||
<div class="text-neutral-700 mt-1">带客户看房,客户对户型满意,但希望价格再谈 20 万</div>
|
||||
<div class="flex gap-1 mt-2">
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary-50 text-primary-700">看房</span>
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-neutral-100 text-neutral-600">高意向</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="ml-4">
|
||||
<span class="absolute -left-[7px] w-3 h-3 rounded-full bg-info-600 ring-4 ring-white"></span>
|
||||
<div class="text-sm">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-medium text-neutral-900">李明泽</span>
|
||||
<span class="text-xs text-neutral-500 tabular-nums">昨天 10:12</span>
|
||||
</div>
|
||||
<div class="text-neutral-700 mt-1">电话跟进业主,确认可协商空间为 30 万</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="ml-4">
|
||||
<span class="absolute -left-[7px] w-3 h-3 rounded-full bg-neutral-300 ring-4 ring-white"></span>
|
||||
<div class="text-sm">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-neutral-600">系统</span>
|
||||
<span class="text-xs text-neutral-500 tabular-nums">04-20 14:32</span>
|
||||
</div>
|
||||
<div class="text-neutral-500 mt-1">房源录入系统,分配维护人 <span class="text-neutral-700">魏深</span></div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 色板展示 -->
|
||||
<section class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">颜色系统 · Color Palette</h2>
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<div class="text-xs font-medium text-neutral-500 uppercase tracking-wide mb-2">Primary (Teal · 品牌主色)</div>
|
||||
<div class="grid grid-cols-7 gap-2">
|
||||
<div><div class="h-14 rounded-md bg-primary-50 border border-neutral-200"></div><div class="text-xs mt-1 text-neutral-600">50 <span class="font-mono text-neutral-400">#F0FDFA</span></div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-100"></div><div class="text-xs mt-1 text-neutral-600">100 <span class="font-mono text-neutral-400">#CCFBF1</span></div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-200"></div><div class="text-xs mt-1 text-neutral-600">200 <span class="font-mono text-neutral-400">#99F6E4</span></div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-500"></div><div class="text-xs mt-1 text-neutral-600">500 <span class="font-mono text-neutral-400">#14B8A6</span></div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-600 ring-2 ring-primary-600/30 ring-offset-2"></div><div class="text-xs mt-1 text-primary-700 font-medium">600 基准</div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-700"></div><div class="text-xs mt-1 text-neutral-600">700 <span class="font-mono text-neutral-400">#115E59</span></div></div>
|
||||
<div><div class="h-14 rounded-md bg-primary-800"></div><div class="text-xs mt-1 text-neutral-600">800 <span class="font-mono text-neutral-400">#134E4A</span></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="text-xs font-medium text-neutral-500 uppercase tracking-wide mb-2">Neutral (Slate · 中性灰)</div>
|
||||
<div class="grid grid-cols-10 gap-2">
|
||||
<div><div class="h-10 rounded bg-neutral-50 border border-neutral-200"></div><div class="text-xs mt-1 text-neutral-600">50</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-100"></div><div class="text-xs mt-1 text-neutral-600">100</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-200"></div><div class="text-xs mt-1 text-neutral-600">200</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-300"></div><div class="text-xs mt-1 text-neutral-600">300</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-400"></div><div class="text-xs mt-1 text-neutral-600">400</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-500"></div><div class="text-xs mt-1 text-neutral-600">500</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-600"></div><div class="text-xs mt-1 text-neutral-600">600</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-700"></div><div class="text-xs mt-1 text-neutral-600">700</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-800"></div><div class="text-xs mt-1 text-neutral-600">800</div></div>
|
||||
<div><div class="h-10 rounded bg-neutral-900"></div><div class="text-xs mt-1 text-neutral-600">900</div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="text-xs font-medium text-neutral-500 uppercase tracking-wide mb-2">Semantic · 语义色</div>
|
||||
<div class="grid grid-cols-4 gap-3">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="h-10 w-10 rounded bg-success-600"></div>
|
||||
<div class="text-xs">
|
||||
<div class="font-medium text-neutral-700">Success</div>
|
||||
<div class="font-mono text-neutral-400">#16A34A</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="h-10 w-10 rounded bg-warning-600"></div>
|
||||
<div class="text-xs">
|
||||
<div class="font-medium text-neutral-700">Warning</div>
|
||||
<div class="font-mono text-neutral-400">#D97706</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="h-10 w-10 rounded bg-danger-600"></div>
|
||||
<div class="text-xs">
|
||||
<div class="font-medium text-neutral-700">Danger</div>
|
||||
<div class="font-mono text-neutral-400">#DC2626</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="h-10 w-10 rounded bg-info-600"></div>
|
||||
<div class="text-xs">
|
||||
<div class="font-medium text-neutral-700">Info</div>
|
||||
<div class="font-mono text-neutral-400">#2563EB</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 字体层级 -->
|
||||
<section class="bg-white rounded-lg border border-neutral-200 shadow-xs p-6">
|
||||
<h2 class="text-base font-semibold text-neutral-800 mb-4">字体层级 · Typography</h2>
|
||||
<div class="space-y-3">
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">H1 · 20/600</div>
|
||||
<div class="text-xl font-semibold text-neutral-800">全部房源</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">H2 · 16/600</div>
|
||||
<div class="text-base font-semibold text-neutral-800">房源基本信息</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">Body · 14/400</div>
|
||||
<div class="text-sm text-neutral-700">绿城百合公寓 · 南北通透三居 · 业主诚心出售</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">Data · 14/500</div>
|
||||
<div class="text-sm font-medium text-neutral-900 tabular-nums">680 万 · 128.50 ㎡</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">Number · 20/600</div>
|
||||
<div class="text-xl font-semibold tabular-nums text-neutral-900">24,891</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4 border-b border-neutral-100 pb-2">
|
||||
<div class="w-32 text-xs text-neutral-500">Caption · 12/400</div>
|
||||
<div class="text-xs text-neutral-500">最近同步于 2 分钟前</div>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-4">
|
||||
<div class="w-32 text-xs text-neutral-500">Mono · 12/400</div>
|
||||
<div class="text-xs font-mono text-neutral-600">F20268142</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="text-center text-xs text-neutral-400 py-4">
|
||||
Fonrey UI System v1.0 · Preview · 2026-04-25
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- ============ Toast 演示 ============ -->
|
||||
<div class="fixed bottom-6 right-6 z-[70] space-y-2 w-80">
|
||||
<div class="flex gap-3 p-3 bg-white rounded-lg shadow-lg border border-neutral-200">
|
||||
<div class="w-8 h-8 rounded-full bg-success-50 text-success-600 flex items-center justify-center shrink-0">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.707-9.293a1 1 0 0 0-1.414-1.414L9 10.586 7.707 9.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4Z" clip-rule="evenodd"/></svg>
|
||||
</div>
|
||||
<div class="flex-1 text-sm">
|
||||
<div class="font-medium text-neutral-800">保存成功</div>
|
||||
<div class="text-xs text-neutral-500 mt-0.5">房源信息已更新</div>
|
||||
</div>
|
||||
<button class="text-neutral-400 hover:text-neutral-600"><svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/></svg></button>
|
||||
</div>
|
||||
<div class="flex gap-3 p-3 bg-white rounded-lg shadow-lg border border-neutral-200">
|
||||
<div class="w-8 h-8 rounded-full bg-info-50 text-info-600 flex items-center justify-center shrink-0">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd"/></svg>
|
||||
</div>
|
||||
<div class="flex-1 text-sm">
|
||||
<div class="font-medium text-neutral-800">有 3 条新消息</div>
|
||||
<div class="text-xs text-primary-600 hover:underline cursor-pointer mt-0.5">点击查看 →</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
32
wiki/concepts/Incremental-Graph-Update.md
Normal file
32
wiki/concepts/Incremental-Graph-Update.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: "Incremental Graph Update"
|
||||
type: concept
|
||||
tags: [graph, real-time, file-watching]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
增量图谱更新(Incremental Graph Update)是 LSP/Index Engineer 维护代码语义图谱的核心策略——通过文件监视器(File Watchers)和 Git hooks 检测变更,仅更新受影响的图谱子图,而非全量重建,从而实现亚秒级增量同步。
|
||||
|
||||
## Trigger Mechanisms
|
||||
|
||||
- **文件监视器**:监听文件系统变更,触发相关符号的重新索引
|
||||
- **Git hooks**:在提交前后执行图谱增量更新,确保版本控制集成
|
||||
- **WebSocket 推送**:将图谱差异实时推送至连接的客户端
|
||||
|
||||
## Consistency Guarantees
|
||||
|
||||
LSP/Index Engineer 的原子性保证:图谱更新必须是原子性的——从不将图谱置于不一致状态。具体约束:
|
||||
- 每个符号有且仅有一个定义节点
|
||||
- 所有边必须引用有效节点 ID
|
||||
- 文件节点必须在符号节点之前创建
|
||||
- 导入边必须解析到实际文件/模块节点
|
||||
|
||||
## Performance Impact
|
||||
|
||||
增量更新使得图谱在 100k+ 符号规模下依然保持亚秒级响应:
|
||||
- 文件保存后 → 图谱更新传播至客户端 <500ms
|
||||
- 单个文件变更 → 仅更新受影响子图,而非全量重建
|
||||
- WebSocket 推送延迟 <50ms
|
||||
36
wiki/concepts/LSP-317-Specification.md
Normal file
36
wiki/concepts/LSP-317-Specification.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "LSP 3.17 Specification"
|
||||
type: concept
|
||||
tags: [protocol, language-server, standardization]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
Language Server Protocol 3.17(LSP 3.17)是 Microsoft 发起的语言服务器协议的最新版本,定义了编辑器/IDE 与语言服务器之间的标准化 JSON-RPC 通信规范,使得不同语言可以有统一的方式提供代码智能功能(跳转到定义、查找引用、悬停文档等)。
|
||||
|
||||
## Core Components
|
||||
|
||||
- **JSON-RPC 2.0**:基于 JSON 的远程过程调用协议
|
||||
- **Server Capabilities**:服务器声明其支持的功能(如 definitionProvider、referencesProvider)
|
||||
- **Client Capabilities**:客户端声明其支持的功能
|
||||
- **Lifecycle**:initialize → initialized → shutdown → exit
|
||||
- **textDocument/* 请求**:textDocument/definition、textDocument/references、textDocument/hover 等
|
||||
|
||||
## Why LSP 3.17
|
||||
|
||||
LSP/Index Engineer 严格遵循 LSP 3.17 规范进行所有客户端通信,正确处理每个语言服务器的能力协商。LSP 3.17 相比早期版本增加了:
|
||||
- 增量同步(Incremental同步)
|
||||
- Call Hierarchy 和 Type Hierarchy
|
||||
- 更完整的诊断能力
|
||||
- 更好的多根工作区支持
|
||||
|
||||
## Implementation Note
|
||||
|
||||
LSP/Index Engineer 的核心约束:**永远不要假设能力,必须始终检查服务器能力响应**。这确保了 graphd 能与任何符合 LSP 规范的服务器协作。
|
||||
|
||||
## Aliases
|
||||
- LSP
|
||||
- Language Server Protocol
|
||||
- LSP 3.17
|
||||
40
wiki/concepts/Performance-Contracts.md
Normal file
40
wiki/concepts/Performance-Contracts.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: "Performance Contracts"
|
||||
type: concept
|
||||
tags: [performance, latency, engineering]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
性能契约(Performance Contracts)是 LSP/Index Engineer 定义的量化性能约束体系,为 graphd 系统的每个关键操作设定明确的延迟、吞吐量和资源上限,作为所有实现决策的北极星指标。
|
||||
|
||||
## Contract Table
|
||||
|
||||
| Operation | Constraint | Notes |
|
||||
|-----------|-----------|-------|
|
||||
| `/graph` endpoint | <100ms | 数据集 <10k 节点 |
|
||||
| `/nav/:symId` (cached) | <20ms | 缓存命中 |
|
||||
| `/nav/:symId` (uncached) | <60ms | 缓存未命中 |
|
||||
| WebSocket event stream | <50ms latency | 端到端推送延迟 |
|
||||
| Memory usage | <500MB | 典型项目 |
|
||||
| Go-to-definition | <150ms | 任意符号 |
|
||||
| Hover documentation | <60ms | 悬停响应 |
|
||||
| Graph update propagation | <500ms | 文件保存后 |
|
||||
| Symbol scale | 100k+ symbols | 无性能降级 |
|
||||
|
||||
## Measurement Strategy
|
||||
|
||||
- **基准测试**:每次提交后运行基准测试套件
|
||||
- **Profiling**:识别性能瓶颈并优先处理
|
||||
- **P99 监控**:关注 P99 而非平均值,确保长尾性能
|
||||
|
||||
## Optimization Techniques
|
||||
|
||||
- 内存映射文件(Memory-mapped files)
|
||||
- 零拷贝网络传输(io_uring)
|
||||
- 无锁数据结构(Lock-free data structures)
|
||||
- SIMD 优化图操作
|
||||
- 批量 LSP 请求以减少往返开销
|
||||
- 主动缓存 + 精确失效
|
||||
36
wiki/concepts/Semantic-Index-Infrastructure.md
Normal file
36
wiki/concepts/Semantic-Index-Infrastructure.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "Semantic Index Infrastructure"
|
||||
type: concept
|
||||
tags: [indexing, code-intelligence, persistence]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
语义索引基础设施(Semantic Index Infrastructure)是 LSP/Index Engineer 构建的核心数据管道——将 LSP 语义数据(符号定义、引用、悬停文档)持久化为标准化索引格式,支持快速启动、增量更新和跨语言统一查询。
|
||||
|
||||
## Core Components
|
||||
|
||||
- **nav.index.jsonl**:导航索引行格式,存储符号 ID、定义位置、引用列表、悬停内容
|
||||
- **LSIF 导入/导出**:Language Server Index Format,支持预计算语义数据的标准化交换
|
||||
- **SQLite/JSON 缓存层**:持久化层,支持快速启动和低延迟查询
|
||||
- **WebSocket 实时推送**:图谱变更通过 WebSocket 实时推送至客户端
|
||||
|
||||
## nav.index.jsonl Format
|
||||
|
||||
```jsonl
|
||||
{"symId":"sym:AppController","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}
|
||||
{"symId":"sym:AppController","refs":[
|
||||
{"uri":"file:///src/routes.php","l":5,"c":10},
|
||||
{"uri":"file:///tests/app.test.php","l":15,"c":20}
|
||||
]}
|
||||
{"symId":"sym:AppController","hover":{"contents":{"kind":"markdown","value":"```php\nclass AppController extends BaseController\n```\nMain application controller"}}}
|
||||
```
|
||||
|
||||
## Design Principles
|
||||
|
||||
- **原子性更新**:从不将图谱置于不一致状态
|
||||
- **增量构建**:通过文件监视器和 Git hooks 触发增量更新
|
||||
- **零重启启动**:缓存层确保热启动无需重新索引
|
||||
- **可序列化**:支持 WebSocket 流式推送图谱差异
|
||||
39
wiki/entities/Intelephense.md
Normal file
39
wiki/entities/Intelephense.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "Intelephense"
|
||||
type: entity
|
||||
tags: [language-server, php]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
Intelephense 是 PHP 语言的主流 Language Server Protocol 实现,提供高性能的 PHP 代码智能功能,包括跳转到定义、查找引用、悬停文档、符号导航等。
|
||||
|
||||
## Usage in LSP/Index Engineer
|
||||
|
||||
LSP/Index Engineer 的 graphd 系统通过以下方式使用 Intelephense:
|
||||
|
||||
```typescript
|
||||
const phpClient = new LanguageClient('php', {
|
||||
command: 'intelephense',
|
||||
args: ['--stdio'],
|
||||
rootPath: projectRoot
|
||||
});
|
||||
```
|
||||
|
||||
## Known Limitations
|
||||
|
||||
Intelephense 与 TypeScript Language Server 相比:
|
||||
- 不支持层级符号(Hierarchical Symbols)
|
||||
- PHP 的命名空间和类结构解析有差异
|
||||
- LSP/Index Engineer 在 graphd 中需要针对这些差异进行适配处理
|
||||
|
||||
## Note
|
||||
|
||||
TypeScript 和 PHP 支持是 LSP/Index Engineer 的**默认要求**,必须首先达到生产就绪状态。PHP 优先使用 Intelephense,也可选择 phpactor 作为替代。
|
||||
|
||||
## Aliases
|
||||
- intelephense
|
||||
- PHP Language Server
|
||||
- PHP LSP
|
||||
35
wiki/entities/LSIF.md
Normal file
35
wiki/entities/LSIF.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "LSIF"
|
||||
type: entity
|
||||
tags: [code-intelligence, index-format, exchange]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
LSIF(Language Server Index Format)是一种预计算语义数据的标准化交换格式,允许在不运行语言服务器的情况下直接加载代码索引数据。
|
||||
|
||||
## Purpose
|
||||
|
||||
LSIF 解决了以下问题:
|
||||
- 语言服务器启动慢 → 直接加载预计算索引
|
||||
- 协作场景 → 团队成员共享索引而非各自运行 LSP
|
||||
- CI/CD → 在流水线中预先生成索引
|
||||
- 跨平台 → 不同编辑器共享同一索引源
|
||||
|
||||
## Usage in LSP/Index Engineer
|
||||
|
||||
LSP/Index Engineer 的语义索引基础设施支持 LSIF 导入/导出:
|
||||
- 导入:加载预先生成的 LSIF 数据,零延迟启动
|
||||
- 导出:将 nav.index.jsonl 数据导出为 LSIF 格式
|
||||
|
||||
## Relationship to nav.index.jsonl
|
||||
|
||||
LSIF 和 nav.index.jsonl 相互补充:
|
||||
- LSIF:用于交换和分发的标准化格式
|
||||
- nav.index.jsonl:LSP/Index Engineer 的内部流式索引格式
|
||||
|
||||
## Aliases
|
||||
- Language Server Index Format
|
||||
- LSIF
|
||||
@@ -1,40 +1,37 @@
|
||||
---
|
||||
title: "The Agency"
|
||||
type: entity
|
||||
tags: [multi-agent, open-source, ai-agents]
|
||||
sources: [contributing, contributing_zh-cn, specialized-workflow-architect, agentic-identity-trust, specialized-document-generator, government-digital-presales-consultant, healthcare-marketing-compliance, specialized-civil-engineer, specialized-cultural-intelligence-strategist]
|
||||
tags: [multi-agent, organization, specialized]
|
||||
sources: [lsp-index-engineer, corporate-training-designer, specialized-cultural-intelligence-strategist, specialized-model-qa, specialized-workflow-architect]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
The Agency 是一个开源的多智能体(Multi-Agent)系统,提供了 147 个专业 Agent,涵盖 12 个业务部门:Engineering、Design、Finance、Game Dev、Marketing、Paid Media、Product、Project Management、Testing、Support、Spatial Computing、Specialized。
|
||||
|
||||
## Structure
|
||||
The Agency 是一个多智能体(Multi-Agent)系统组织框架,提供 147 个专业化 Agent,跨 12 个业务部门,覆盖工程(Engineering)、设计(Design)、金融(Finance)、游戏开发(Game Dev)、营销(Marketing)、付费媒体(Paid Media)、产品(Product)、项目管理(Project Management)、测试(Testing)、支持(Support)、空间计算(Spatial Computing)和专业化(Specialized)。
|
||||
|
||||
### Departments
|
||||
| 部门 | 职能 | 代表 Agent |
|
||||
|------|------|-----------|
|
||||
| Specialized | 垂直领域专家 | [[Cultural Intelligence Strategist]]、Civil Engineer、Document Generator |
|
||||
| Engineering | 软件开发 | Backend Architect、Reality Checker、API Tester |
|
||||
| Design | 视觉与体验设计 | [[ArchitectUX]]、Brand Guardian、UX Researcher |
|
||||
| Project Management | 项目组合管理 | Studio Producer、Senior PM、Jira Workflow Steward |
|
||||
| Spatial Computing | XR/AR/VR | XR Interface Architect、visionOS Engineer |
|
||||
| Paid Media | 广告投放 | PPC Strategist、Programmatic Buyer |
|
||||
| Marketing | 内容与增长 | Content Creator、Growth Hacker |
|
||||
| Product | 产品策略 | Product Manager、Trend Researcher |
|
||||
| Testing | 质量保障 | Accessibility Auditor、Performance Benchmarker |
|
||||
| Support | 客户支持 | Support Responder、Analytics Reporter |
|
||||
## Key Characteristics
|
||||
|
||||
### Core Principles
|
||||
- **鲜明性格**:每个 Agent 都有明确的个性,而非泛化的人设
|
||||
- **明确交付物**:真实代码、模板、量化指标
|
||||
- **可验证工作流**:经过实践检验的操作流程
|
||||
- **学习与记忆**:持续更新领域知识
|
||||
- **Agent 设计五原则**:鲜明性格(拒绝通用人设)、明确交付物(真实代码/模板)、可量化指标、经过验证的工作流、学习记忆机制
|
||||
- **协作模式**:Agent 间通过交接合同(Handoff Contract)进行确定性状态传递
|
||||
- **Specialized 部门**:包含 9 个专业化 Agent(见下方列表),专注于特定领域的深度专业知识
|
||||
|
||||
## Key Files
|
||||
- `Agent/agency-agents/`:所有 Agent 定义文件
|
||||
- `SPEC.md`:Agent 设计规范
|
||||
## Agent Collaboration Protocol
|
||||
|
||||
## Related
|
||||
- [[Multi-Agent-System-Reliability]]:The Agency 的可靠性架构模式
|
||||
- [[Multi-Agent-Team]]:多 Agent 团队配置最佳实践
|
||||
标准协作链:Reality Checker 验证 → Backend Architect 实现 → API Tester 生成测试用例 → DevOps Automator 验证清理顺序。Workflow Architect 在此体系中提供工作流建模能力,LSP/Index Engineer 提供代码语义基础设施。
|
||||
|
||||
## Specialized Department Agents
|
||||
|
||||
1. **LSP/Index Engineer** — LSP 客户端编排和语义索引基础设施专家
|
||||
2. **Model QA Specialist** — ML/统计模型的端到端独立审计专家
|
||||
3. **Corporate Training Designer** — 企业培训体系架构师
|
||||
4. **Cultural Intelligence Strategist** — 文化包容性专家
|
||||
5. **Workflow Architect** — 工作流设计专家
|
||||
6. **Identity & Trust Architect** — Agentic 身份与信任架构专家
|
||||
7. **Automation Governance Architect** — 自动化治理架构师
|
||||
8. **Government Digital Presales Consultant** — 政府数字化售前顾问
|
||||
9. **Document Generator Agent** — 文档生成 Agent
|
||||
|
||||
## Value
|
||||
|
||||
The Agency 的核心价值在于将复杂任务分解为专业化 Agent 协作,每个 Agent 拥有鲜明的人设、明确的交付物和可量化的成功指标,避免了通用 LLM 的"万事通但样样松"问题。
|
||||
|
||||
41
wiki/entities/TypeScript-Language-Server.md
Normal file
41
wiki/entities/TypeScript-Language-Server.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: "TypeScript Language Server"
|
||||
type: entity
|
||||
tags: [language-server, typescript, javascript]
|
||||
sources: [lsp-index-engineer]
|
||||
last_updated: 2026-04-25
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
TypeScript Language Server 是 TypeScript/JavaScript 的官方 Language Server Protocol 实现,提供代码补全、跳转到定义、查找引用、悬停文档、符号导航等代码智能功能。
|
||||
|
||||
## Usage in LSP/Index Engineer
|
||||
|
||||
LSP/Index Engineer 的 graphd 系统通过以下方式使用 TypeScript Language Server:
|
||||
|
||||
```typescript
|
||||
const tsClient = new LanguageClient('typescript', {
|
||||
command: 'typescript-language-server',
|
||||
args: ['--stdio'],
|
||||
rootPath: projectRoot
|
||||
});
|
||||
```
|
||||
|
||||
## Key Capabilities
|
||||
|
||||
- 符号层级(Symbol Hierarchy)
|
||||
- 跳转到定义(Go-to-Definition)
|
||||
- 查找所有引用(Find All References)
|
||||
- 悬停文档(Hover Documentation)
|
||||
- 自动补全(Auto-completion)
|
||||
- 代码格式化(Code Formatting)
|
||||
|
||||
## Note
|
||||
|
||||
TypeScript 和 PHP 支持是 LSP/Index Engineer 的**默认要求**,必须首先达到生产就绪状态。
|
||||
|
||||
## Aliases
|
||||
- typescript-language-server
|
||||
- tsserver
|
||||
- ts-language-server
|
||||
@@ -4,6 +4,7 @@
|
||||
- [Overview](overview.md) — living synthesis
|
||||
|
||||
## Sources
|
||||
- [2026-04-25] [LSP/Index Engineer Agent Personality](sources/lsp-index-engineer.md)
|
||||
- [2026-04-25] [Model QA Specialist](sources/specialized-model-qa.md)
|
||||
- [2026-04-25] [Corporate Training Designer](sources/corporate-training-designer.md)
|
||||
- [2026-04-25] [Cultural Intelligence Strategist](sources/specialized-cultural-intelligence-strategist.md)
|
||||
@@ -410,7 +411,6 @@
|
||||
- [2026-04-20] [specialized-mcp-builder](sources/specialized-mcp-builder.md) — (expected: wiki/sources/specialized-mcp-builder.md — source missing)
|
||||
- [2026-04-20] [compliance-auditor](sources/compliance-auditor.md) — (expected: wiki/sources/compliance-auditor.md — source missing)
|
||||
- [2026-04-20] [specialized-salesforce-architect](sources/specialized-salesforce-architect.md) — (expected: wiki/sources/specialized-salesforce-architect.md — source missing)
|
||||
- [2026-04-20] [lsp-index-engineer](sources/lsp-index-engineer.md) — (expected: wiki/sources/lsp-index-engineer.md — source missing)
|
||||
- [2026-04-20] [automation-governance-architect](sources/automation-governance-architect.md) — (expected: wiki/sources/automation-governance-architect.md — source missing)
|
||||
- [2026-04-20] [llm-wiki](sources/llm-wiki.md) — (expected: wiki/sources/llm-wiki.md — source missing)
|
||||
- [2026-04-20] [baoyu-skills](sources/baoyu-skills.md) — (expected: wiki/sources/baoyu-skills.md — source missing)
|
||||
@@ -653,6 +653,7 @@
|
||||
- [IBM](entities/IBM.md)
|
||||
- [idea-reality-mcp](entities/idea-reality-mcp.md)
|
||||
- [InsightsLM](entities/InsightsLM.md)
|
||||
- [Intelephense](entities/Intelephense.md)
|
||||
- [Intsas.local](entities/Intsas.local.md)
|
||||
- [ISO-27001](entities/ISO-27001.md)
|
||||
- [it-tools](entities/it-tools.md)
|
||||
@@ -672,6 +673,7 @@
|
||||
- [Linear](entities/Linear.md)
|
||||
- [LinkedIn-Campaign-Manager](entities/LinkedIn-Campaign-Manager.md)
|
||||
- [LinuxServer.io](entities/LinuxServer.io.md)
|
||||
- [LSIF](entities/LSIF.md)
|
||||
- [Mac-Mini-M4](entities/Mac-Mini-M4.md)
|
||||
- [macOS-Spatial-Metal-Engineer](entities/macOS-Spatial-Metal-Engineer.md)
|
||||
- [Manus](entities/Manus.md)
|
||||
@@ -768,6 +770,7 @@
|
||||
- [TruffleHog](entities/TruffleHog.md)
|
||||
- [tukuai](entities/tukuai.md)
|
||||
- [TweetClaw](entities/TweetClaw.md)
|
||||
- [TypeScript-Language-Server](entities/TypeScript-Language-Server.md)
|
||||
- [Ubuntu-Server](entities/Ubuntu-Server.md)
|
||||
- [Uptime-Kuma](entities/Uptime-Kuma.md)
|
||||
- [Veeam](entities/Veeam.md)
|
||||
@@ -1061,6 +1064,7 @@
|
||||
- [Immutable-Root-Filesystem](concepts/Immutable-Root-Filesystem.md)
|
||||
- [Incident-Management](concepts/Incident-Management.md)
|
||||
- [InclusiveVisuals](concepts/InclusiveVisuals.md)
|
||||
- [Incremental-Graph-Update](concepts/Incremental-Graph-Update.md)
|
||||
- [Incrementality-Testing](concepts/Incrementality-Testing.md)
|
||||
- [Indexing](concepts/Indexing.md)
|
||||
- [Infrastructure-as-Code](concepts/Infrastructure-as-Code.md)
|
||||
@@ -1103,6 +1107,7 @@
|
||||
- [Local-LLM-Deployment](concepts/Local-LLM-Deployment.md)
|
||||
- [Lockable-Workflow](concepts/Lockable-Workflow.md)
|
||||
- [Log-Driven-Debugging](concepts/Log-Driven-Debugging.md)
|
||||
- [LSP-317-Specification](concepts/LSP-317-Specification.md)
|
||||
- [Management-Pack](concepts/Management-Pack.md)
|
||||
- [MCPOnceAllAgents](concepts/MCPOnceAllAgents.md)
|
||||
- [MEDDPICC](concepts/MEDDPICC.md)
|
||||
@@ -1157,6 +1162,7 @@
|
||||
- [Pay-as-you-go](concepts/Pay-as-you-go.md)
|
||||
- [Peer-Verification](concepts/Peer-Verification.md)
|
||||
- [Penetration-Testing](concepts/Penetration-Testing.md)
|
||||
- [Performance-Contracts](concepts/Performance-Contracts.md)
|
||||
- [PerformanceMax](concepts/PerformanceMax.md)
|
||||
- [Personal-CRM](concepts/Personal-CRM.md)
|
||||
- [Personalization](concepts/Personalization.md)
|
||||
@@ -1244,6 +1250,7 @@
|
||||
- [Self-Referential-Computation](concepts/Self-Referential-Computation.md)
|
||||
- [Self-Sufficiency](concepts/Self-Sufficiency.md)
|
||||
- [Semantic-Deduplication](concepts/Semantic-Deduplication.md)
|
||||
- [Semantic-Index-Infrastructure](concepts/Semantic-Index-Infrastructure.md)
|
||||
- [Semantic-Search](concepts/Semantic-Search.md)
|
||||
- [Semantic-Versioning](concepts/Semantic-Versioning.md)
|
||||
- [Sequential-Thinking](concepts/Sequential-Thinking.md)
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
- Source page: wiki/sources/specialized-workflow-architect.md
|
||||
- Notes: index.md 中原有 "source missing" 条目,本次摄入后已更新为完整条目并修正日期。overview.md Specialized 部门新增 Workflow Architect 条目。Concept 页面创建前已做去重检查,Workflow-Engineering(已存在,定义侧重 AI 执行流程 vs 本文档侧重工作流规范格式)保留原页面,新增页面侧重建模规范维度。
|
||||
|
||||
## [2026-04-25] ingest | LSP/Index Engineer Agent Personality
|
||||
- Source file: Agent/agency-agents/specialized/lsp-index-engineer.md
|
||||
- Status: ✅ 成功摄入
|
||||
- Summary: LSP/Index Engineer——The Agency Specialized 部门的代码智能系统架构师 Agent,通过 graphd LSP 聚合器将 TypeScript/PHP/Go/Rust/Python 等多语言 LSP 客户端统一编排为语义图谱。核心交付物:多语言 LSP 并发编排 + 统一图谱模式(节点:文件/符号,边:contains/imports/calls/refs)+ nav.index.jsonl 语义索引 + WebSocket 实时增量推送 + 原子性图谱更新保证。性能北极星:/graph <100ms、/nav <60ms、WebSocket <50ms、100k+ 符号无性能降级。TypeScript 和 PHP 为默认生产就绪要求。
|
||||
- Concepts created: [[LSP-317-Specification]](LSP 3.17 协议规范)、[[Semantic-Index-Infrastructure]](语义索引基础设施)、[[Incremental-Graph-Update]](增量图谱更新)、[[Performance-Contracts]](性能契约)
|
||||
- Entities created: [[The-Agency]](The Agency 多智能体系统组织)、[[TypeScript-Language-Server]](TypeScript 语言服务器)、[[Intelephense]](PHP Intelephense LSP)、[[LSIF]](Language Server Index Format)
|
||||
- Source page: wiki/sources/lsp-index-engineer.md
|
||||
- Notes: index.md 中原有 "source missing" 条目,本次摄入后已更新为完整条目。overview.md Specialized 部门新增 LSP/Index Engineer 条目,并同步更新 Conflict Areas(#12 LSP 图谱确定性 vs Workflow 穷举概率性)。4 个 Concept 页面创建前已做去重检查,确认 LSP-317-Specification、Semantic-Index-Infrastructure、Incremental-Graph-Update、Performance-Contracts 均不存在。与 [[specialized-workflow-architect]] 存在张力(确定性约束 vs LLM 概率性上限),已在 Contradictions 中记录。4 个 Entity 页面中 The-Agency 已在 overview.md 中被多次引用,新增 Entity 页面属首次正式创建。与 [[multi-agent-system-reliability]] 共享"架构约束优于提示词约束"思想,已在 overview.md 中建立链接。
|
||||
|
||||
## [2026-04-25] ingest | Agentic Identity & Trust Architect(补充摄入)
|
||||
- Source file: Agent/agency-agents/specialized/agentic-identity-trust.md
|
||||
- Status: ✅ 补充摄入(source page 已存在,本次补充 Concept 页面)
|
||||
|
||||
@@ -697,6 +697,8 @@ Key concepts: [[Django ORM]], [[Django REST Framework]], [[Django Admin 定制]]
|
||||
|
||||
**[[specialized-model-qa]]**(Model QA Specialist):ML/统计模型端到端独立审计专家——The Agency Specialized 部门的模型质量保障专家,核心使命:**将模型视为"有罪推定",直到全面审计证明其可靠性**。独立于模型构建者运行,通过证据驱动的分析发现模型在文档、数据、特征、性能、校准、可解释性、公平性等各环节的问题,并量化业务影响。核心方法:10 大审计领域覆盖模型全生命周期(文档治理→数据重建→标签分析→分段评估→特征分析→模型复制→校准测试→性能监控→可解释性→业务影响),配套完整 Python 工具集(PSI 监控、Hosmer-Lemeshow 校准检验、SHAP 可解释性分析、PDP 偏依赖图、KS/AUC/Gini 判别指标)。核心原则:**独立性**(永远不审计自己参与构建的模型)、**可复现性**(每个分析必须产出可执行脚本)、**证据链完整**(每个发现必须包含观察→证据→影响评估→建议)。成功指标:审计发现 95%+ 被模型所有者确认为有效、零部署后失败。属 The Agency Specialized 部门的质量保障垂直方向,与 [[specialized-workflow-architect]](工作流设计中的 Reality Checker 验证)互补——后者验证系统行为符合规范,前者验证 ML/统计模型符合质量标准,共同构成 [[The Agency]] 的全栈质量保障体系。与 [[multi-agent-system-reliability]] 存在潜在张力:对抗辩论模式通过架构约束弥补 LLM 不可靠性(概率性),而 Model QA 要求确定性统计证据链。
|
||||
|
||||
**[[lsp-index-engineer]]**(LSP/Index Engineer):代码智能系统架构师 Agent——The Agency Specialized 部门的 LSP 客户端编排和语义图谱构建专家,通过 graphd LSP 聚合器将 TypeScript/PHP/Go/Rust/Python 等多语言 LSP 客户端统一编排为语义图谱,为沉浸式代码可视化提供基础设施。核心交付物:多语言 LSP 并发编排 + 统一图谱模式(节点:文件/符号,边:contains/imports/calls/refs)+ nav.index.jsonl 语义索引 + WebSocket 实时增量推送 + 原子性图谱更新保证。核心原则:**严格遵循 LSP 3.17 规范**(永远检查服务器能力而非假设)、**图谱一致性约束**(每个符号有且仅有一个定义节点,所有边引用有效节点 ID)。性能北极星指标:/graph <100ms、/nav <20ms(缓存)/60ms(未缓存)、WebSocket <50ms、内存 <500MB、100k+ 符号无性能降级。TypeScript 和 PHP 支持为**默认生产就绪要求**。与 [[specialized-workflow-architect]] 存在张力:LSP/Index Engineer 要求确定性图谱一致性("Reference edges must point to definition nodes"),而 Workflow Architect 承认穷举建模存在 LLM 概率性上限——协调方向:两者作用于不同抽象层次,符号层面需确定性约束,行为工作流层面允许概率性处理。与 [[multi-agent-system-reliability]] 共享对"架构约束优于提示词约束"的认同。
|
||||
|
||||
## Conflict Areas
|
||||
|
||||
1. **Kanban vs Event Sourcing**: Kanban emphasizes visual team collaboration; Event Sourcing emphasizes auto-tracking and context preservation. **[[Project State Management]]**(事件驱动看板替代方案)vs 传统 PM 工具。核心差异:手动拖拽 vs 自然语言输入;静态快照 vs 全历史保留;无上下文 vs 完整决策链。**[[Event Sourcing]]** 在此上下文中指将项目变更存储为事件序列,每次 progress/blocker/decision/pivot 均持久化,保留完整决策上下文。
|
||||
@@ -721,8 +723,10 @@ Key concepts: [[Django ORM]], [[Django REST Framework]], [[Django Admin 定制]]
|
||||
|
||||
11. **Healthcare Marketing Compliance vs 通用法律合规**:医疗营销合规 Agent 主张医疗领域具有高度专业化特征(《广告法》/药械注册/平台规则),通用法律合规工具无法覆盖;[[legal-compliance-checker]] 主张合规 Agent 应具备跨行业通用框架,无需细分至医疗领域。**协调方向**:通用合规 Agent 负责数据隐私/合同合规等横向能力,医疗营销合规 Agent 专注垂直领域规则差异(详见 [[healthcare-marketing-compliance]] Contradictions 部分)。
|
||||
|
||||
11. **数据库备份方案**:pg_dump 逻辑备份 vs rsync 文件级备份。pg_dump 是热备份标准(零停机、跨平台迁移能力强),但不能备份运行中数据库的物理文件目录;rsync 适合 Docker 卷备份但需确保数据库一致状态。[[MinIO + Zipline 图床安装]] 使用 pg_dump 逻辑备份 PostgreSQL + Hyper Backup 文件备份 MinIO 目录,两者互补。
|
||||
12. **LSP 图谱确定性 vs Workflow 穷举概率性**:LSP/Index Engineer 要求确定性图谱一致性("每个符号必须有且仅有一个定义节点","Reference edges must point to definition nodes"),强调 LSP 3.17 协议规范和原子性图谱更新;[[specialized-workflow-architect]] 承认穷举工作流建模存在 LLM 概率性上限,某些边界条件只能通过概率性处理。**协调方向**:两者作用于不同抽象层次——符号层面(静态代码分析)需确定性约束,行为工作流层面(系统边界交互)允许概率性处理,可共存(详见 [[lsp-index-engineer]] Contradictions 部分)。
|
||||
|
||||
12. **SuperCall 沙盒 Persona vs 通用语音 Agent**:[[event-guest-confirmation]] 中使用的 [[SuperCall]] 强调独立沙盒设计——AI persona 只持有预设的 persona name、goal、opening line,无法访问外部系统;[[phone-based-personal-assistant]] 侧重通用个人助手场景,需要访问更多上下文。**[[Sandboxed Persona]]** 适用于确认类单一任务(安全、无注入风险);通用语音 Agent 适用于需要跨系统协调的复杂助手场景。
|
||||
13. **数据库备份方案**:pg_dump 逻辑备份 vs rsync 文件级备份。pg_dump 是热备份标准(零停机、跨平台迁移能力强),但不能备份运行中数据库的物理文件目录;rsync 适合 Docker 卷备份但需确保数据库一致状态。[[MinIO + Zipline 图床安装]] 使用 pg_dump 逻辑备份 PostgreSQL + Hyper Backup 文件备份 MinIO 目录,两者互补。
|
||||
|
||||
13. **Agent 去电通知 vs Agent 来电接收**:[[phone-call-notifications]] 中 Agent 主动向用户拨打电话通知(Agent → User),通话由 Agent 触发,用户是被动接收方;[[phone-based-personal-assistant]] 中用户主动呼叫 Agent(User → Agent),Agent 接听并提供助理服务。两者方向相反但互补——前者用于紧急告警、定时简报、重要事件通知,后者用于随时咨询、查询、执行任务。共同构成完整语音双向通信能力。
|
||||
14. **SuperCall 沙盒 Persona vs 通用语音 Agent**:[[event-guest-confirmation]] 中使用的 [[SuperCall]] 强调独立沙盒设计——AI persona 只持有预设的 persona name、goal、opening line,无法访问外部系统;[[phone-based-personal-assistant]] 侧重通用个人助手场景,需要访问更多上下文。**[[Sandboxed Persona]]** 适用于确认类单一任务(安全、无注入风险);通用语音 Agent 适用于需要跨系统协调的复杂助手场景。
|
||||
|
||||
15. **Agent 去电通知 vs Agent 来电接收**:[[phone-call-notifications]] 中 Agent 主动向用户拨打电话通知(Agent → User),通话由 Agent 触发,用户是被动接收方;[[phone-based-personal-assistant]] 中用户主动呼叫 Agent(User → Agent),Agent 接听并提供助理服务。两者方向相反但互补——前者用于紧急告警、定时简报、重要事件通知,后者用于随时咨询、查询、执行任务。共同构成完整语音双向通信能力。
|
||||
|
||||
60
wiki/sources/lsp-index-engineer.md
Normal file
60
wiki/sources/lsp-index-engineer.md
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
title: "LSP/Index Engineer Agent Personality"
|
||||
type: source
|
||||
tags: []
|
||||
date: 2026-04-25
|
||||
---
|
||||
|
||||
## Source File
|
||||
- [[Agent/agency-agents/specialized/lsp-index-engineer.md]]
|
||||
|
||||
## Summary(用中文描述)
|
||||
- 核心主题:LSP/Index Engineer 是 The Agency Specialized 部门的代码智能系统架构师 Agent,通过编排 Language Server Protocol(LSP)客户端并构建统一语义图谱,实现跨多语言的代码智能查询能力。
|
||||
- 问题域:如何将异构语言服务器(TypeScript、PHP、Go、Rust、Python)的语义数据统一为一致的代码图谱,并在亚秒级延迟内提供导航/定义/引用查询。
|
||||
- 方法/机制:graphd LSP 聚合器 + 多语言 LSP 客户端编排 + nav.index.jsonl 语义索引 + WebSocket 实时增量更新 + SQLite/JSON 持久化缓存层。
|
||||
- 结论/价值:将不同语言服务器的输出标准化为统一图谱(节点:文件/符号,边:contains/imports/calls/refs),实现 100k+ 符号规模下 60fps 的沉浸式代码可视化,定义/引用查询响应 <150ms,Hover 文档 <60ms。
|
||||
|
||||
## Key Claims(用中文描述)
|
||||
- graphd 通过 LSP 聚合器并发编排 TypeScript/PHP/Go/Rust/Python 多语言 LSP 客户端,将响应转换为统一图谱模式
|
||||
- 语义索引基础设施 nav.index.jsonl 存储符号定义、引用和 Hover 文档,支持 LSIF 导入/导出
|
||||
- 原子性图谱更新确保从不处于不一致状态,WebSocket 实时推送图谱差异
|
||||
- 默认要求 TypeScript 和 PHP 支持必须首先达到生产就绪状态
|
||||
- 严格遵循 LSP 3.17 规范,正确处理各语言服务器的能力协商
|
||||
- 每个符号必须有且仅有一个定义节点,所有边必须引用有效节点 ID
|
||||
- `/graph` 端点在 <10k 节点数据集下 100ms 内响应,`/nav/:symId` 查找缓存 <20ms / 未缓存 <60ms
|
||||
- 系统处理 100k+ 符号时性能不降级,内存保持在 500MB 以下
|
||||
|
||||
## Key Quotes
|
||||
> "Build the graphd LSP Aggregator — Orchestrate multiple LSP clients (TypeScript, PHP, Go, Rust, Python) concurrently, Transform LSP responses into unified graph schema (nodes: files/symbols, edges: contains/imports/calls/refs)" — 核心交付物定义
|
||||
> "Strictly follow LSP 3.17 specification for all client communications, Handle capability negotiation properly for each language server" — 协议合规要求
|
||||
> "Every symbol must have exactly one definition node, All edges must reference valid node IDs" — 图谱一致性约束
|
||||
> "Sub-500ms response times for definition/reference/hover requests" — 性能北极星指标
|
||||
|
||||
## Key Concepts
|
||||
- [[LSP-317-Specification]]:Language Server Protocol 3.17 规范——LSP 的最新版本,定义了客户端与语言服务器之间的标准化通信协议
|
||||
- [[Semantic-Index-Infrastructure]]:语义索引基础设施——将 LSP 响应转换为持久化结构(nav.index.jsonl + SQLite/JSON 缓存),支持快速启动和增量查询
|
||||
- [[Graph-Node-Schema]]:图谱节点模式——统一表示文件节点(file:)、模块节点(module/)、符号节点(sym:),支持 6 种节点类型和 6 种边类型
|
||||
- [[Incremental-Graph-Update]]:增量图谱更新——通过文件监视器和 Git hooks 触发增量更新,WebSocket 推送图谱差异,原子性保证从不处于不一致状态
|
||||
- [[LSP-Client-Orchestration]]:LSP 客户端编排——多语言 LSP 客户端并发初始化、能力协商、请求批量处理和缓存管理的统一架构
|
||||
- [[Performance-Contracts]]:性能契约——量化系统性能约束:/graph <100ms、/nav <60ms、WebSocket <50ms、内存 <500MB
|
||||
|
||||
## Key Entities
|
||||
- [[The-Agency]]:The Agency 多智能体系统组织,147 个 Agent 跨 12 个部门,LSP/Index Engineer 属于 Specialized 部门
|
||||
- [[TypeScript-Language-Server]]:TypeScript 语言服务器——支持 TypeScript 和 JavaScript 的 LSP 实现
|
||||
- [[Intelephense]]:PHP Intelephense——PHP 语言的 LSP 服务器实现
|
||||
- [[gopls]]:Go 语言服务器——Go 官方 LSP 实现
|
||||
- [[rust-analyzer]]:Rust 语言服务器——Rust 官方 LSP 实现
|
||||
- [[pyright]]:Python 语言服务器——Microsoft 的 Python 类型检查和 LSP 实现
|
||||
- [[LSIF]]:Language Server Index Format——预计算语义数据的标准化交换格式
|
||||
|
||||
## Connections
|
||||
- [[specialized-workflow-architect]] ← builds upon ← [[LSP-Index-Engineer]]:Workflow Architect 在 LSP/Index Engineer 构建的语义图谱基础上设计工作流注册表和交接合同
|
||||
- [[LSP-Index-Engineer]] ← uses ← [[LSP-317-Specification]]:LSP/Index Engineer 严格遵循 LSP 3.17 规范进行客户端开发
|
||||
- [[LSP-Index-Engineer]] ← provides_input ← [[semantic-code-visualization]]:LSP/Index Engineer 构建的统一图谱为沉浸式代码可视化提供数据基础
|
||||
|
||||
## Contradictions
|
||||
- 与 [[specialized-workflow-architect]] 存在张力:
|
||||
- 冲突点:LSP/Index Engineer 要求"每个系统边界定义显式交接合同"(确定性要求),而 Workflow Architect 承认 LLM 概率性使得穷举建模存在上限
|
||||
- 当前观点(LSP/Index Engineer):图谱节点必须精确——"每个符号必须有且仅有一个定义节点","Reference edges must point to definition nodes"
|
||||
- 对方观点(Workflow Architect):穷举工作流存在概率性上限,某些边界条件只能通过概率性处理
|
||||
- 协调方向:LSP/Index Engineer 的确定性约束适用于代码符号层面(静态分析),Workflow Architect 的概率性适用于行为工作流层面,两者作用于不同抽象层次,可共存
|
||||
Reference in New Issue
Block a user