openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 653 B
JavaScript
//#region src/media/document-extraction-metadata.ts
function renderDocumentTruncationNotice(e, t) {
const n = [];
if (t !== void 0) n.push(`requested page selection limited to ${t} pages`);
if (e?.pages?.truncated) n.push(e.pages.selection === "automatic" ? `${e.pages.processed.length} of ${e.pages.total} pages processed` : `some requested pages omitted; ${e.pages.processed.length} pages processed`);
if (e?.textTruncated) n.push("text truncated");
if (e?.imagesTruncated) n.push("image rendering truncated");
return n.length > 0 ? `[Partial document: ${n.join("; ")}.]` : void 0;
}
//#endregion
export { renderDocumentTruncationNotice as t };