feat(agent): rendered conversation logs with preferred tool syntax

- Updated compaction, branch summarization, and session dump formatting to pass preferred model tool syntax into conversation serialization.
- Enhanced shared serializers to render assistant tool calls and tool results through grammar envelopes when syntax is available, with the prior compact format as fallback.
- Aligned prompt, preview, and test fixtures to the new transcript tags: `[Think]`, `[Tool Call]`, and `[Tool Result]`.
This commit is contained in:
can1357
2026-06-15 12:32:47 +02:00
parent fc912904e1
commit 2a7cb56abd
11 changed files with 68 additions and 46 deletions
@@ -18,7 +18,7 @@ describe("serializeConversation", () => {
const result = serializeConversation(messages);
expect(result).toContain("[Tool result]:");
expect(result).toContain("[Tool Result]:");
expect(result).toContain("[... 3000 more characters truncated]");
expect(result).toContain("x".repeat(2000));
expect(result).not.toContain("x".repeat(3000));
@@ -39,7 +39,7 @@ describe("serializeConversation", () => {
const result = serializeConversation(messages);
expect(result).toBe(`[Tool result]: ${shortContent}`);
expect(result).toBe(`[Tool Result]: ${shortContent}`);
expect(result).not.toContain("truncated");
});