[loop-generated] [refactor] Break up mcp_bridge.py::run() — 129 lines #1135

Closed
opened 2026-03-23 18:31:25 +00:00 by Timmy · 1 comment
Owner

src/timmy/mcp_bridge.py::run is 129 lines.

Extract:

  • Connection setup/teardown
  • Message loop handling
  • Error recovery logic

Target: main function <40 lines.

Files: src/timmy/mcp_bridge.py

src/timmy/mcp_bridge.py::run is 129 lines. Extract: - Connection setup/teardown - Message loop handling - Error recovery logic Target: main function <40 lines. Files: src/timmy/mcp_bridge.py
claude self-assigned this 2026-03-23 18:33:10 +00:00
Collaborator

PR created: #1148

Extracted MCPBridge.run() (129 lines) into three focused helpers:

  • _build_initial_messages() — builds the initial message list
  • _process_round_tool_calls() — handles one round of tool calls
  • _run_tool_loop() — drives the multi-round loop

run() is now ~35 lines. All 20 unit tests pass.

PR created: #1148 Extracted `MCPBridge.run()` (129 lines) into three focused helpers: - `_build_initial_messages()` — builds the initial message list - `_process_round_tool_calls()` — handles one round of tool calls - `_run_tool_loop()` — drives the multi-round loop `run()` is now ~35 lines. All 20 unit tests pass.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1135