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:
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user