open-code-review/cmd/opencodereview
kite 63b0f02d27
feat: add tool_calls field to JSON output (#216)
* feat: add tool_calls field to JSON output for tool usage statistics

Track per-tool invocation counts in llmloop.Runner and expose them
through the ResultProvider interface so both review and scan modes
report tool call statistics in --format json output.

* fix: correct tool_calls counting and ensure stable JSON schema

Move recordToolCall after lookupTool nil check so only actually-executed
tool calls are counted. Always emit tool_calls field in JSON output for
a consistent schema, initializing by_tool to empty map when nil.

* fix: remove omitempty from tool_calls to ensure stable JSON schema

Drop omitempty from the tool_calls struct tag and initialize ToolCalls
in outputJSONNoFiles so the field is always present in JSON output
regardless of execution path.
2026-06-25 13:53:06 +08:00
..
config_cmd.go feat(vscode): add full-width BYOK provider config panel (#204) 2026-06-25 10:37:25 +08:00
config_cmd_test.go feat: add ability to delete custom providers from configuration (#189) 2026-06-23 21:21:23 +08:00
flags.go feat: add ocr scan for full-file code review (#93) 2026-06-24 22:07:25 +08:00
flags_test.go feat:add --model flag to override LLM model per review (#122) 2026-06-16 22:38:52 +08:00
git.go fix(security): block git ref option injection (#112) 2026-06-13 11:07:59 +08:00
llm_cmd.go feat(vscode): add full-width BYOK provider config panel (#204) 2026-06-25 10:37:25 +08:00
main.go feat: add ocr scan for full-file code review (#93) 2026-06-24 22:07:25 +08:00
output.go feat: add tool_calls field to JSON output (#216) 2026-06-25 13:53:06 +08:00
output_test.go fix: sanitize terminal control characters in text output to prevent escape-sequence injection (#143) 2026-06-16 14:48:56 +08:00
provider_cmd.go feat: add ability to delete custom providers from configuration (#189) 2026-06-23 21:21:23 +08:00
provider_tui.go feat: add ability to delete custom providers from configuration (#189) 2026-06-23 21:21:23 +08:00
provider_tui_test.go feat: add ability to delete custom providers from configuration (#189) 2026-06-23 21:21:23 +08:00
review_cmd.go feat: add ocr scan for full-file code review (#93) 2026-06-24 22:07:25 +08:00
review_cmd_test.go fix(cli): reject --to without --from in review flags (#151) 2026-06-16 20:26:22 +08:00
rules_cmd.go feat(rules): add ocr rules check command to preview effective rule for a file path 2026-05-26 22:11:39 +08:00
scan_cmd.go feat: add tool_calls field to JSON output (#216) 2026-06-25 13:53:06 +08:00
scan_cmd_test.go feat: add ocr scan for full-file code review (#93) 2026-06-24 22:07:25 +08:00
shared.go feat: add tool_calls field to JSON output (#216) 2026-06-25 13:53:06 +08:00
version.go feat(cli): display GitHub repository URL in version and help output 2026-06-02 22:50:36 +08:00
viewer_cmd.go feat: init 2026-05-20 22:03:52 +08:00