chore: multiline traversal support (#51)
Co-authored-by: Shubham Naik <shub@memgpt.ai>
This commit is contained in:
@@ -266,7 +266,7 @@ describe("tool truncation integration tests", () => {
|
||||
const message = startResult.content[0]?.text || "";
|
||||
const bashIdMatch = message.match(/with ID: (.+)/);
|
||||
expect(bashIdMatch).toBeTruthy();
|
||||
const bashId = bashIdMatch![1];
|
||||
const bashId = bashIdMatch?.[1];
|
||||
|
||||
// Wait a bit for output to accumulate
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user