





















@@ -7,13 +7,13 @@ import {
77} from "openclaw/plugin-sdk/text-runtime";
88import YAML from "yaml";
9910-export const WIKI_PAGE_KINDS = ["entity", "concept", "source", "synthesis", "report"] as const;
10+const WIKI_PAGE_KINDS = ["entity", "concept", "source", "synthesis", "report"] as const;
1111export const WIKI_RELATED_START_MARKER = "<!-- openclaw:wiki:related:start -->";
1212export const WIKI_RELATED_END_MARKER = "<!-- openclaw:wiki:related:end -->";
13131414export type WikiPageKind = (typeof WIKI_PAGE_KINDS)[number];
151516-export type ParsedWikiMarkdown = {
16+type ParsedWikiMarkdown = {
1717frontmatter: Record<string, unknown>;
1818body: string;
1919};
@@ -39,7 +39,7 @@ export type WikiClaim = {
3939updatedAt?: string;
4040};
414142-export type WikiPersonCard = {
42+type WikiPersonCard = {
4343canonicalId?: string;
4444handles: string[];
4545socials: string[];
@@ -180,7 +180,7 @@ export function renderWikiMarkdown(params: {
180180return `---\n${frontmatter}\n---\n\n${params.body.trimStart()}`;
181181}
182182183-export function extractTitleFromMarkdown(body: string): string | undefined {
183+function extractTitleFromMarkdown(body: string): string | undefined {
184184const match = body.match(/^#\s+(.+?)\s*$/m);
185185return normalizeOptionalString(match?.[1]);
186186}
@@ -365,7 +365,7 @@ function normalizeWikiRelationships(value: unknown): WikiRelationship[] {
365365});
366366}
367367368-export function extractWikiLinks(markdown: string): string[] {
368+function extractWikiLinks(markdown: string): string[] {
369369const searchable = markdown.replace(RELATED_BLOCK_PATTERN, "");
370370const links: string[] = [];
371371for (const match of searchable.matchAll(OBSIDIAN_LINK_PATTERN)) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。