feat(server): use new content reader (#13007)

partial fix AI-280
This commit is contained in:
DarkSky
2025-07-04 08:22:44 +08:00
committed by GitHub
parent 8ed7dea823
commit 2b7a8dcd8a
6 changed files with 48 additions and 15 deletions

View File

@@ -16,8 +16,8 @@ export const buildContentGetter = (ac: AccessController, doc: DocReader) => {
.doc(docId)
.can('Doc.Read');
if (!canAccess) return undefined;
const content = await doc.getFullDocContent(options.workspace, docId);
return content?.summary.trim() || undefined;
const content = await doc.getDocMarkdown(options.workspace, docId, true);
return content?.markdown.trim() || undefined;
};
return getDocContent;
};

View File

@@ -47,7 +47,11 @@ export const buildDocContentGetter = (
return;
}
const content = await docReader.getDocMarkdown(options.workspace, docId);
const content = await docReader.getDocMarkdown(
options.workspace,
docId,
true
);
if (!content) {
return;
}