llm: make Tool.Run return ToolOut
This is preliminary work towards
allowing tools to add additional information.
No functional changes (at least, that's the intent).
diff --git a/claudetool/codereview/codereview_test.go b/claudetool/codereview/codereview_test.go
index f9d240e..4bba851 100644
--- a/claudetool/codereview/codereview_test.go
+++ b/claudetool/codereview/codereview_test.go
@@ -234,10 +234,11 @@
// runDifferentialTest runs the code review tool on the repository and returns the result.
func runDifferentialTest(reviewer *CodeReviewer) (string, error) {
ctx := context.Background()
- result, err := reviewer.Run(ctx, nil)
- if err != nil {
- return "", fmt.Errorf("error running code review: %w", err)
+ toolOut := reviewer.Run(ctx, nil)
+ if toolOut.Error != nil {
+ return "", fmt.Errorf("error running code review: %w", toolOut.Error)
}
+ result := toolOut.LLMContent
// Normalize paths in the result
resultStr := ""