chore: multiline traversal support (#51)

Co-authored-by: Shubham Naik <shub@memgpt.ai>
This commit is contained in:
Shubham Naik
2025-11-01 10:00:04 -07:00
committed by GitHub
parent 4118d018fe
commit 14e67fa156
7 changed files with 139 additions and 42 deletions

View File

@@ -70,7 +70,7 @@ describe("truncation utilities", () => {
});
test("truncates long lines when maxCharsPerLine specified", () => {
const text = "short\n" + "a".repeat(1000) + "\nshort";
const text = `short\n${"a".repeat(1000)}\nshort`;
const result = truncateByLines(text, 10, 500, "Test");
expect(result.wasTruncated).toBe(true);