Files
dify/knowledge-fs/apps/admin/lib/graph-row-keys.ts
Jyong 4ee43b8afc chore: migrate knowledge-fs source tree
Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
2026-07-20 04:54:20 -04:00

22 lines
643 B
TypeScript

import type { AdminGraphEntity, AdminGraphRelation } from "./api-client";
export function adminRowKey(scope: string, id: string, index: number): string {
return [scope, id, index].join(":");
}
export function graphEntityRowKey(entity: AdminGraphEntity, index: number): string {
return ["entity", entity.id, entity.depth, entity.canonicalKey, entity.type, index].join(":");
}
export function graphRelationRowKey(relation: AdminGraphRelation, index: number): string {
return [
"relation",
relation.id,
relation.depth,
relation.subjectEntityId,
relation.type,
relation.objectEntityId,
index,
].join(":");
}