all: delete commit-message-style tool
It added significant latency.
All the caching options were unappealing.
Instead, let users specify in dear_llm.md if they care,
and default to simple, concise messages.
At some point (soon?), we will likely
make it easier in the UI to edit commit messages.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: sbcd1f38735d091aek
diff --git a/loop/agent.go b/loop/agent.go
index cf35eb4..9e55491 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -1378,7 +1378,7 @@
convo.Tools = []*llm.Tool{
bashTool.Tool(), claudetool.Keyword, claudetool.Patch(a.patchCallback),
- claudetool.Think, claudetool.TodoRead, claudetool.TodoWrite, a.commitMessageStyleTool(), makeDoneTool(a.codereview),
+ claudetool.Think, claudetool.TodoRead, claudetool.TodoWrite, makeDoneTool(a.codereview),
a.codereview.Tool(), claudetool.AboutSketch,
}
convo.Tools = append(convo.Tools, browserTools...)
@@ -1547,23 +1547,6 @@
}
}
-func (a *Agent) commitMessageStyleTool() *llm.Tool {
- description := `Provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.`
- preCommit := &llm.Tool{
- Name: "commit-message-style",
- Description: description,
- InputSchema: llm.EmptySchema(),
- Run: func(ctx context.Context, input json.RawMessage) llm.ToolOut {
- styleHint, err := claudetool.CommitMessageStyleHint(ctx, a.repoRoot)
- if err != nil {
- slog.DebugContext(ctx, "failed to get commit message style hint", "err", err)
- }
- return llm.ToolOut{LLMContent: llm.TextContent(styleHint)}
- },
- }
- return preCommit
-}
-
// patchCallback is the agent's patch tool callback.
// It warms the codereview cache in the background.
func (a *Agent) patchCallback(input claudetool.PatchInput, output llm.ToolOut) llm.ToolOut {