feat(coverage): 覆盖图节点用 lucide 图标 + 精简 label + 抽屉展示关联意图/事实

- 节点图标 emoji → 平台一致的 lucide 图标(白色 SVG data URI,iconSrc)
- 图内 label:服务显示 端口·标题·状态码(不再完整 URL),端点只显示 path
- 点节点抽屉新增「关联意图/关联事实/关联发现」:按 exploration_anchors
  反查本任务锚定该资产的节点
  - db AssetRefs(assetID);server GET /api/tasks/{id}/asset-refs?asset_id=X
  - types/api taskAssetRefs;抽屉按 node.asset_id 拉取渲染

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Autumn-27andClaude Opus 4.8 committed 2026-08-09 00:28:19 -04:00
1 parent 9c1591ad8e
commit e35c766e6a
5 files changed
+218 -14

No files matched your search

+4 -1
View File
@@ -11,7 +11,7 @@ import type {
PromptVersion, MCPServer, MCPTool, SkillItem, TokenUsage, TokenTotal, DailyTokenBucket,
Tool, Conversation, AgentTrigger,
InterceptRule, InterceptPending, InterceptApprovalRow,
TaskAssetView, SSProject, SSTask, ConvTokenSummary, CoverageGraphData,
TaskAssetView, SSProject, SSTask, ConvTokenSummary, CoverageGraphData, CoverageAssetRefs,
CommandRecord, LLMRecordItem, LLMRecordDetail,
} from "@/lib/types";
@@ -127,6 +127,9 @@ export const api = {
// 资产覆盖图:范围内全部资产 + 连接用的根域名/公司节点,含 tested/in_scope。
taskCoverageGraph: (id: string) =>
get<CoverageGraphData>(`/tasks/${id}/coverage-graph`),
// 某资产在本任务里关联的意图 / 事实 / 发现(覆盖图节点抽屉用)。
taskAssetRefs: (id: string, assetId: number) =>
get<CoverageAssetRefs>(`/tasks/${id}/asset-refs?asset_id=${assetId}`),
// ---- assets ----
// Server-side paginated: pass limit/offset, get back the page + full match total.
+13
View File
@@ -165,6 +165,19 @@ export interface CoverageGraphData {
edges: CoverageGraphEdge[];
}
// 某资产在本任务探索图里关联到的意图/事实/发现(覆盖图节点抽屉用)。
export interface CoverageAssetRef {
id: number;
kind: string;
state: string;
summary: string;
}
export interface CoverageAssetRefs {
intents: CoverageAssetRef[];
facts: CoverageAssetRef[];
findings: CoverageAssetRef[];
}
// 公司资产范围规则的一条(归属唯一真值来源)。
export interface ScopeRow {
id: number;