refactor: Split conversational.py into modular structure #64

Merged
shoko merged 2 commits from fix/issue-63 into main 2026-04-14 05:57:16 +02:00
Owner

Summary

  • Split conversational.py (2271 lines) into modular files to improve testability, debuggability, and reviewability
  • Created new module structure:
    • tools.py: TOOL_REGISTRY, get_tool_registry(), SKILL_EMOJIS
    • help.py: format_* functions for slash command help
    • client.py: MiniMaxClient, SYSTEM_PROMPT, TOOLS definitions
    • agent.py: ConversationalAgent class with all methods
    • __init__.py: Public exports from all modules
  • Updated bots.py import to use new module path
  • Deleted conversational.py

Acceptance Criteria (from issue #63)

  • tools.py exists with TOOL_REGISTRY and get_tool_registry()
  • help.py exists with all format_* functions
  • client.py exists with MiniMaxClient class
  • agent.py exists with ConversationalAgent class
  • init.py exports everything correctly
  • Old conversational.py deleted
  • All import sites updated
  • No circular imports

Testing

  • Verified Python syntax of all new files
  • Verified imports work correctly (no circular imports)

Closes #63

## Summary - Split `conversational.py` (2271 lines) into modular files to improve testability, debuggability, and reviewability - Created new module structure: - `tools.py`: TOOL_REGISTRY, get_tool_registry(), SKILL_EMOJIS - `help.py`: format_* functions for slash command help - `client.py`: MiniMaxClient, SYSTEM_PROMPT, TOOLS definitions - `agent.py`: ConversationalAgent class with all methods - `__init__.py`: Public exports from all modules - Updated bots.py import to use new module path - Deleted conversational.py ## Acceptance Criteria (from issue #63) - [x] tools.py exists with TOOL_REGISTRY and get_tool_registry() - [x] help.py exists with all format_* functions - [x] client.py exists with MiniMaxClient class - [x] agent.py exists with ConversationalAgent class - [x] __init__.py exports everything correctly - [x] Old conversational.py deleted - [x] All import sites updated - [x] No circular imports ## Testing - Verified Python syntax of all new files - Verified imports work correctly (no circular imports) Closes #63
shoko added 1 commit 2026-04-14 04:36:45 +02:00
Split conversational.py (2271 lines) into modular files:
- tools.py: TOOL_REGISTRY, get_tool_registry(), SKILL_EMOJIS
- help.py: format_* functions for slash command help
- client.py: MiniMaxClient, SYSTEM_PROMPT, TOOLS definitions
- agent.py: ConversationalAgent class with all methods
- __init__.py: Public exports from all modules

Updated bots.py import to use new module path.
Deleted conversational.py.
shoko added 1 commit 2026-04-14 05:34:44 +02:00
han approved these changes 2026-04-14 05:56:05 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit a9679bbb5d into main 2026-04-14 05:57:16 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#64