-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refactor: Extract tool use logic from Cline.ts to dedicated handler c… #2070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lasses This refactoring improves code organization by: - Creating a ToolUseHandler abstract base class - Implementing a ToolUseHandlerFactory for handler instantiation - Moving each tool's logic to its own handler class - Reducing complexity in the Cline class - Improving maintainability and testability - Making it easier to add new tools in the future Part of the larger effort to break down the monolithic Cline class into smaller, more focused components following SOLID principles.
|
|
Please fix issue #2086 before merging. |
I would still like to stick with squash merges in general, but think that more/smaller PRs are more aligned with that approach. I'll try to break down these changes into a PR per tool. |
* Add tests for TerminalProcess.ts * Add missing Sinon mocking * Test fixes * More fixes * Use sinon sandbox * Add more tests, including real integration ones * Revert lock changes --------- Co-authored-by: Saoud Rizwan <[email protected]>
|
Hey @mosleyit, |
…lasses
This refactoring improves code organization by:
Part of the larger effort to break down the monolithic Cline class into smaller, more focused components following SOLID principles.
Context
Moving tool handlers out of cline.ts
Implementation
Moved tools to src/core/tool-handlers/tools/
Screenshots
N/A
How to Test
Added additional unit tests as well as prompted Claude to test all tools and maintain and markdown with user feedback to confirm that each tool worked if it could not verify itself. Additionally I have not been able to test MCP as I do not user them.
Get in Touch
@mosleyit also on discord channel