mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
94e2c92805
Refactor CLI tool commands to eliminate code duplication and improve testability by extracting shared utilities. Changes: - Create tool_utils.py with resolve_project() and run_async_tool() - Refactor all 6 CLI tool commands to use new helpers - Add project parameter to recent_activity for consistency - Fix search_notes search_type logic bug (was overwriting itself) - Add comprehensive unit tests for tool_utils - Add cloud mode routing and auth tests Benefits: - 32% code reduction (342 → 234 lines in tool.py) - Consistent error handling across all commands - Better testability with extracted utilities - Cloud mode functionality validated Fixes #346 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>