feat(claude/tool_call): add tool call logging and improve format handling#163
feat(claude/tool_call): add tool call logging and improve format handling#163
Conversation
|
✅ Preview binaries are ready! To test with modules: |
johnstcn
left a comment
There was a problem hiding this comment.
I tested it and it appears to work, although I wasn't able to reproduce the issue. It doesn't look like the test changes do either. I can't say for sure if this will actually resolve the issue, although the changes mostly look OK to me.
lib/msgfmt/msgfmt_test.go
Outdated
| expected, err := testdataDir.ReadFile(path.Join(dir, string(agentType), c.Name(), "expected.txt")) | ||
| assert.NoError(t, err) | ||
| assert.Equal(t, string(expected), FormatAgentMessage(agentType, string(msg), string(userInput))) | ||
| output, _ := FormatToolCall(agentType, FormatAgentMessage(agentType, string(msg), string(userInput))) |
There was a problem hiding this comment.
Should also asserted the matched tool calls here.
| ● coder - coder_report_task (MCP)(summary: "Snake game created | ||
| successfully at snake-game.html", | ||
| link: "file:///home/coder/snake-ga | ||
| me.html", state: "working") | ||
| ⎿ { | ||
| "message": "Thanks for reporting!" | ||
| } | ||
|
|
There was a problem hiding this comment.
On its own, adding this does not cause any test failures on main. We should have a sample input that reproduces the issue so that we can have confidence in the fix.
There was a problem hiding this comment.
This was adde to verify the case where the message starts with a tool call
Closes: #162