feat(HAI-099): remove truncation from summarizeToolArgs

- Remove 80-char truncation from bash command summaries in summarizeToolArgs
- Remove length guard from fallback string-valued arg path
- Update agent-logger tests to expect full strings without truncation
- Add test case for long string-valued fallback args
- Update executor tests to match new non-truncating behavior
This commit is contained in:
Dustin Byrne
2026-03-26 19:33:56 -04:00
parent 5fc95d4e1f
commit 9bb25a15ea
3 changed files with 15 additions and 11 deletions

View File

@@ -10,10 +10,15 @@ describe("summarizeToolArgs", () => {
expect(summarizeToolArgs("bash", { command: "echo hello" })).toBe("echo hello");
});
it("truncates long bash commands at 80 chars", () => {
const longCmd = "a".repeat(100);
it("returns long bash commands in full without truncation", () => {
const longCmd = "a".repeat(200);
const result = summarizeToolArgs("Bash", { command: longCmd });
expect(result).toBe("a".repeat(80) + "…");
expect(result).toBe(longCmd);
});
it("returns long string-valued fallback args without truncation", () => {
const longVal = "x".repeat(200);
expect(summarizeToolArgs("unknown_tool", { description: longVal })).toBe(longVal);
});
it("returns file path for Read/Edit/Write", () => {