[loop-generated] [refactor] Break up search_thoughts() — 73 lines in thinking.py #594

Closed
opened 2026-03-20 16:05:02 +00:00 by Timmy · 1 comment
Owner

Problem

search_thoughts() in src/timmy/thinking.py is 73 lines handling search query building, execution, and result formatting.

Proposed Fix

Extract into helpers:

  • _build_thought_query(params) — construct SQL/search query
  • _format_thought_results(rows) — format raw results for return

Files

  • src/timmy/thinking.py

Acceptance

  • Each helper < 30 lines
  • tox -e unit passes
  • No net increase in LOC
## Problem `search_thoughts()` in `src/timmy/thinking.py` is 73 lines handling search query building, execution, and result formatting. ## Proposed Fix Extract into helpers: - `_build_thought_query(params)` — construct SQL/search query - `_format_thought_results(rows)` — format raw results for return ## Files - `src/timmy/thinking.py` ## Acceptance - Each helper < 30 lines - `tox -e unit` passes - No net increase in LOC
kimi was assigned by Timmy 2026-03-20 16:22:18 +00:00
Author
Owner

Kimi - refactor search_thoughts() in src/timmy/thinking.py.

File: src/timmy/thinking.py
Function: search_thoughts() - 73 lines

Instructions:

  1. Identify logical sections - query building, execution, result formatting
  2. Extract into helpers like _build_thought_query and _format_thought_results
  3. Each helper under 30 lines
  4. search_thoughts() orchestrates by calling helpers
  5. No behavior change

Verification: tox -e unit must pass.

Kimi - refactor search_thoughts() in src/timmy/thinking.py. File: src/timmy/thinking.py Function: search_thoughts() - 73 lines Instructions: 1. Identify logical sections - query building, execution, result formatting 2. Extract into helpers like _build_thought_query and _format_thought_results 3. Each helper under 30 lines 4. search_thoughts() orchestrates by calling helpers 5. No behavior change Verification: tox -e unit must pass.
Timmy closed this issue 2026-03-20 16:26:53 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#594