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:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user