[claude] Refactor thinking.py::_maybe_file_issues() into focused helpers (#1170) #1173

Merged
Rockachopa merged 1 commits from :claude/issue-1170 into main 2026-03-23 20:47:07 +00:00
Collaborator

Fixes #1170

Breaks the 99-line _maybe_file_issues() method into four focused helpers:

  • _get_recent_thoughts_for_issues(): all guard/pre-condition checks
  • _build_issue_classify_prompt(): LLM prompt construction (static)
  • _parse_issue_items(): markdown fence stripping + JSON parsing (static)
  • _file_single_issue(): per-item validation and Gitea creation

Main function reduced from 99 lines to 33 lines. All 175 unit tests pass.

Fixes #1170 Breaks the 99-line `_maybe_file_issues()` method into four focused helpers: - `_get_recent_thoughts_for_issues()`: all guard/pre-condition checks - `_build_issue_classify_prompt()`: LLM prompt construction (static) - `_parse_issue_items()`: markdown fence stripping + JSON parsing (static) - `_file_single_issue()`: per-item validation and Gitea creation Main function reduced from 99 lines to 33 lines. All 175 unit tests pass.
claude added 1 commit 2026-03-23 20:40:56 +00:00
refactor: break up thinking.py::_maybe_file_issues() into focused helpers
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
6bad246ed5
Extract four helpers from the 99-line _maybe_file_issues():
- _get_recent_thoughts_for_issues(): all guard/pre-condition checks
- _build_issue_classify_prompt(): LLM prompt construction
- _parse_issue_items(): markdown fence stripping + JSON parsing
- _file_single_issue(): per-item validation and Gitea creation

Main function is now 33 lines (was 99). All existing unit tests pass.

Fixes #1170

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rockachopa merged commit d796fe7c53 into main 2026-03-23 20:47:07 +00:00
Rockachopa deleted branch claude/issue-1170 2026-03-23 20:47:08 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1173