@devries-cameron20 / t3code Mirror · read-only / commits / 3d7b74a7ea
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 08:30 UTC

fix(server): omit ODF comments from extracted document text (#38313)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Ibrahim Elkamali committed Nov 17, 2026 at 22:28 UTC 3d7b74a7ea3949185650eaf145852c2064c87a56
2 files changed +14 -1
apps/server/src/provider/documentTextWorker.ts
+4 -1
@@ -105,7 +105,10 @@ function xml(source: string, extension: string): XmlNode {
105 const node = stack.pop()!;
106 const parent = stack.at(-1)!;
107 if (odf && (node.name === "p" || node.name === "h")) collapseOdfWhitespace(node);
108 - if (extension === ".docx" && node.name === "del") {
108 + if (
109 + (extension === ".docx" && node.name === "del") ||
110 + (odf && node.name === "annotation" && parent.name !== "semantics")
111 + ) {
112 parent.children.pop();
113 return;
114 }
apps/server/src/provider/userInputAttachments.test.ts
+10
@@ -763,6 +763,16 @@ describe("question answer paths", () => {
763 expected: ["Fee $700"],
764 absent: ["Reviewer", "$500"],
765 },
766 + {
767 + ext: "odt",
768 + bounded: true,
769 + parts: {
770 + "content.xml":
771 + '<document><text><p>Fee <office:annotation><dc:creator>Reviewer</dc:creator><dc:date>2026-01-01T00:00:00</dc:date><initials>JR</initials><p>Check</p></office:annotation>$700</p><table><table-row><table-cell office:value-type="float" office:value="150"><office:annotation><p>was 120</p></office:annotation></table-cell></table-row></table><p>Formula <math:math><math:semantics><math:mrow>x+y</math:mrow><math:annotation encoding="application/x-tex">x+y</math:annotation></math:semantics></math:math></p></text></document>',
772 + },
773 + expected: ["Fee $700\n150\nFormula x+yx+y"],
774 + absent: ["Reviewer", "2026-01-01", "JR", "Check", "was 120"],
775 + },
776 {
777 ext: "docx",
778 bounded: true,