Extended the search_content and content_replace methods in FileOperations to handle both directory and file paths. Previously, these methods only worked with directories. Now, when a file path is provided, the operation is performed directly on that file. Added validation to check if the path is a file or directory and handle each case appropriately. Also updated the docstrings to reflect this change.
Added extensive test coverage for the new functionality in test_file_operations.py, including:
- Searching content in a single file
- Handling file pattern mismatches
- Replacing content in a single file
- Dry run functionality for file paths
- Directory-based operations with multiple files and subdirectories
- File pattern filtering in both search and replace operations
The changes maintain backward compatibility while adding more flexibility to the file operations API.
Added `reportUnusedFunction = false` to the pyproject.toml file to disable reporting of unused functions during type checking. This change aligns with the existing configuration that suppresses other specific type checking warnings.
- Modified permissions system to allow access to .git folders by default
- Updated tests to reflect the new permission behavior
- Updated version to 0.1.12
- Updated CHANGELOG.md
Updated the docstrings to specify that the `path` parameter refers to an absolute path rather than a relative path. This change improves clarity for developers using the FileOperations class, ensuring they understand the expected input format for file and directory operations. The updates affect multiple methods including file writing, editing, searching, and directory traversal functionalities.
Updated the README.md file to reflect the correct system prompt file path from `doc/system_prompt.md` to `doc/system_prompt`. Also clarified the instructions by specifying to copy the contents into the project instructions instead of the Claude Desktop system prompt, and emphasized using the absolute path for the project directory. These changes aim to provide more accurate and clear guidance for users setting up the system prompt.
The docstring for the `think` method in `ThinkingTool` contained a redundant sentence that repeated the method's purpose. This commit removes the duplicate sentence to improve clarity and conciseness in the documentation.
- Standardize import statements by removing unnecessary parentheses and line breaks
- Adjust function signatures and docstrings for better readability
- Fix indentation and spacing in test files to follow consistent patterns
- Reformat multi-line statements and expressions for clarity
- Remove trailing whitespace and ensure consistent line endings
Removed unused imports across multiple files including `os`, `json`, `time`, `pathlib.Path`, `pytest`, and `unittest.mock.patch`.
Cleaned up redundant variable assignments in `CommandExecutor` and removed unnecessary f-strings in log messages.
This improves code readability and reduces unnecessary dependencies.
This commit standardizes the formatting of the pyproject.toml file by:
- Removing unnecessary line breaks in arrays and dictionaries
- Aligning indentation consistently
- Simplifying the structure of arrays and dependencies
- Adding a new [tool.basedpyright] section with configuration options
The changes are purely cosmetic and do not affect the functionality or dependencies of the project.
Changed the `command` arguments in the README.md file from `run` to `--from` and added the `claudecode` argument to align with the latest CLI usage. This ensures the documentation accurately reflects the current command structure for running the `mcp-agent` tool.