enhance(cli, config): Support interactive tool mode switching #372
+293
−134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users can now interactively toggle between different run and result modes when prompted to execute a tool. This allows switching from "Ask" to "Edit" or "Unattended" modes on the fly, providing better control over the tool execution flow without restarting the session.
A new skip functionality has been added, allowing users to bypass tool execution entirely. When skipping, users can optionally provide reasoning through their configured editor, which is then communicated back to the assistant to maintain conversation context.
It is now also possible, after seeing the tool call arguments provided by the LLM, and having the run mode set to "ask", to allow the tool to run, but modify the response after, even if by default response mode is set to "Unattended". This allows for providing more context to the LLM after the tool call, essentially injecting a "user turn" into the conversation.
Additionally, local tools can now return a structured
Outcome::Errorto distinguish between transient and permanent failures. A transient failure is reported back to the LLM for correction, while a permanent failure stops the conversation and is reported back to the user.Finally, the CLI now respects the
InlineResults::Offconfiguration to suppress tool result rendering when desired.