





















@@ -31,6 +31,7 @@ import type { ResolvedMemoryWikiConfig } from "./config.js";
3131import { appendMemoryWikiLog } from "./log.js";
3232import {
3333formatWikiLink,
34+isUnmanagedRawSourceSummary,
3435parseWikiMarkdown,
3536renderWikiMarkdown,
3637toWikiPageSummary,
@@ -42,6 +43,7 @@ import {
4243WIKI_RELATED_END_MARKER,
4344WIKI_RELATED_START_MARKER,
4445} from "./markdown.js";
46+import { readMemoryWikiSourceSyncState } from "./source-sync-state.js";
4547import { initializeMemoryWikiVault } from "./vault.js";
46484749const COMPILE_PAGE_GROUPS: Array<{ kind: WikiPageKind; dir: string; heading: string }> = [
@@ -64,6 +66,7 @@ type DashboardPageDefinition = {
6466buildBody: (params: {
6567config: ResolvedMemoryWikiConfig;
6668pages: WikiPageSummary[];
69+managedImportedSourcePagePaths: Set<string>;
6770now: Date;
6871sourceRelativeTo: string;
6972}) => string;
@@ -206,9 +209,16 @@ const DASHBOARD_PAGES: DashboardPageDefinition[] = [
206209id: "report.stale-pages",
207210title: "Stale Pages",
208211relativePath: "reports/stale-pages.md",
209-buildBody: ({ config, pages, now, sourceRelativeTo }) => {
212+buildBody: ({ config, managedImportedSourcePagePaths, pages, now, sourceRelativeTo }) => {
210213const matches = pages
211-.filter((page) => page.kind !== "report")
214+.filter(
215+(page) =>
216+page.kind !== "report" &&
217+!(
218+isUnmanagedRawSourceSummary(page) &&
219+!managedImportedSourcePagePaths.has(page.relativePath)
220+),
221+)
212222.flatMap((page) => {
213223const freshness = assessPageFreshness(page, now);
214224if (freshness.level === "fresh") {
@@ -911,6 +921,7 @@ async function writeDashboardPage(params: {
911921config: ResolvedMemoryWikiConfig;
912922rootDir: string;
913923definition: DashboardPageDefinition;
924+managedImportedSourcePagePaths: Set<string>;
914925pages: WikiPageSummary[];
915926now: Date;
916927}): Promise<boolean> {
@@ -936,6 +947,7 @@ async function writeDashboardPage(params: {
936947endMarker: `<!-- openclaw:wiki:${path.basename(params.definition.relativePath, ".md")}:end -->`,
937948body: params.definition.buildBody({
938949config: params.config,
950+managedImportedSourcePagePaths: params.managedImportedSourcePagePaths,
939951pages: params.pages,
940952now: params.now,
941953sourceRelativeTo: params.definition.relativePath,
@@ -986,6 +998,7 @@ async function writeDashboardPage(params: {
986998987999async function refreshDashboardPages(params: {
9881000config: ResolvedMemoryWikiConfig;
1001+managedImportedSourcePagePaths: Set<string>;
9891002rootDir: string;
9901003pages: WikiPageSummary[];
9911004}): Promise<string[]> {
@@ -1000,6 +1013,7 @@ async function refreshDashboardPages(params: {
10001013config: params.config,
10011014rootDir: params.rootDir,
10021015 definition,
1016+managedImportedSourcePagePaths: params.managedImportedSourcePagePaths,
10031017pages: params.pages,
10041018 now,
10051019})
@@ -1354,12 +1368,21 @@ export async function compileMemoryWikiVault(
13541368): Promise<CompileMemoryWikiResult> {
13551369await initializeMemoryWikiVault(config);
13561370const rootDir = config.vault.path;
1371+const sourceSyncState = await readMemoryWikiSourceSyncState(rootDir);
1372+const managedImportedSourcePagePaths = new Set(
1373+Object.values(sourceSyncState.entries).map((entry) => entry.pagePath.split(path.sep).join("/")),
1374+);
13571375let pages = await readPageSummaries(rootDir);
13581376const updatedFiles = await refreshPageRelatedBlocks({ config, pages });
13591377if (updatedFiles.length > 0) {
13601378pages = await readPageSummaries(rootDir);
13611379}
1362-const dashboardUpdatedFiles = await refreshDashboardPages({ config, rootDir, pages });
1380+const dashboardUpdatedFiles = await refreshDashboardPages({
1381+ config,
1382+ managedImportedSourcePagePaths,
1383+ rootDir,
1384+ pages,
1385+});
13631386updatedFiles.push(...dashboardUpdatedFiles);
13641387if (dashboardUpdatedFiles.length > 0) {
13651388pages = await readPageSummaries(rootDir);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。