Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
Fixes #9701 |
|
Does this solve the problem of LLMs struggling to distinguish between spaces and tabs when editing files? |
The search string doesn't require indent but the tool response encourages it. The selected code is also echoed back so the model is less likely to make an error with the code in recent context. |
|
Yes. The implementation must:
LLMs are unreliable for this and this is a cause of constant failures. |
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
What does this PR do?
Opened this PR as a draft because it's just something I think was worth prototyping.
The search/replace mechanism that has become the defacto workflow for edits has a couple problems:
This pull request adds two new tools: select-text and replace-selection.
The flow is:
This is roughly 2x fast for half the price with Claude, for example.
The downside is that model training data now extensively uses the existing edit tool style calls, so that flow is baked into their weights. However, as mentioned, failures are fast and inexpensive comparatively with this new tool call flow.
The change needed a way for tools to access the conversation history, as the new tools are stateful.
How did you verify your code works?
Tests and usage.