feat(knowledge): 项目名改 zncm + 去除元链接噪音 + 创建人显示人名

- project_name 默认 deerflow → zncm(config.yaml + 配置默认 + 模块内字面量)
- related_links() 返回空:笔记 Related 不再注入 index/_meta/taxonomy/hub 结构链接,
  只保留真实相关笔记的可点 [[标题]];无相关笔记且无来源时不再渲染 ## Related 段
- 移除随之多余的项目 hub 页脚手架(index.md/_meta/taxonomy.md 仍由 obsidian 脚手架保留,可解析)
- GET /notes/{id} 用 auth provider 把 created_by/updated_by(UUID) 解析为邮箱
  (created_by_name/updated_by_name),前端 footer 显示人名、解析不到才显示短 id
- 仅对新沉淀笔记生效,现有笔记不动

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
AdministratorandClaude Opus 4.8 committed 2026-06-08 21:50:56 +08:00
1 parent df3fac1032
commit e7ff07debd
11 files changed
+83 -61

No files matched your search

+2
View File
@@ -32,6 +32,8 @@ export interface KnowledgeNote {
confidence?: number;
created_by?: string | null;
updated_by?: string | null;
created_by_name?: string | null;
updated_by_name?: string | null;
created_at?: string | null;
updated_at?: string | null;
tags: string[];
+9 -1
View File
@@ -65,6 +65,13 @@ const STATUS_LABELS: Record<string, string> = {
archived: "已归档",
};
/** Human label for an audit actor: prefer the resolved name (email), else a short id. */
function actorLabel(name?: string | null, id?: string | null): string {
if (name && name.trim()) return name.trim();
if (id && id.trim()) return `${id.trim().slice(0, 8)}…`;
return "—";
}
function useDebounced<T>(value: T, delay = 350): T {
const [debounced, setDebounced] = useState(value);
useEffect(() => {
@@ -593,7 +600,8 @@ function NoteDetail({ noteId }: { noteId: string }) {
) : null}
<div className="text-muted-foreground mt-6 border-t pt-3 text-xs">
创建人 {note.created_by ?? "—"} · 更新人 {note.updated_by ?? "—"} · 更新于{" "}
创建人 {actorLabel(note.created_by_name, note.created_by)} · 更新人{" "}
{actorLabel(note.updated_by_name, note.updated_by)} · 更新于{" "}
{note.updated_at?.slice(0, 19).replace("T", " ")}
</div>
</>