Repository navigation
feat: Add Tools mode with !! prefix for direct tool execution - #90
Merged
Merged
Conversation
Implements the Tools mode feature requested in issue #88: ## Core Features - **!! prefix detection**: Added detection for `!!` vs `!` prefixes in input handling - **Tools mode UI**: Added "TOOLS MODE" indicator with usage examples - **Tool command handler**: Added `handleToolCommand` in chat_handler.go - **Tool call parsing**: Added `parseToolCall` and `parseArguments` methods - **Direct tool execution**: Tools execute directly using existing ToolService - **Autocompletion**: Extended autocomplete to suggest available tools with `!!` prefix - **Help integration**: Added `!!` shortcut to help bar ## Available Tools for Direct Execution - `!!Read(file_path="/path/to/file")` - `!!Write(file_path="/path", content="text")` - `!!WebSearch(query="search term")` - `!!Bash(command="ls -la")` - `!!Tree()` - `!!Grep(pattern="search", path=".")` ## Implementation Details - **UI Layer**: Modified input_view.go to detect `!!` vs `!` prefixes - **Handler Layer**: Added tool command parsing and execution methods - **Autocomplete**: Extended to load and filter tool suggestions dynamically - **Error Handling**: Proper validation and user-friendly error messages - **Tool Response Formatting**: Structured display of tool execution results ## Testing & Quality - **Unit Tests**: Added comprehensive tests for tool parsing and autocomplete - **Integration Tests**: Verified with existing test suite - **Quality Checks**: Passed linting, formatting, and static analysis - **Documentation**: Updated CLAUDE.md with Tools mode usage ## Usage Examples ``` !!WebSearch(query="golang best practices") !!Read(file_path="README.md") !!Tree() !!Bash(command="git status") ``` The feature maintains the existing `!` bash mode while adding the new `!!` tools mode with autocompletion support. Closes #88 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…view Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…results Signed-off-by: Eden Reich <[email protected]>
Contributor
Author
|
Much easier to test tools now... |
Contributor
|
🎉 This PR is included in version 0.32.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements the Tools mode feature requested in issue #88.
Summary
Test plan
Closes #88
🤖 Generated with Claude Code