Skip to content

Refactor: add helper methods to reduce code duplication#6

Merged
bsamek merged 2 commits intomainfrom
claude/refactoring-analysis-jbXKv
Jan 8, 2026
Merged

Refactor: add helper methods to reduce code duplication#6
bsamek merged 2 commits intomainfrom
claude/refactoring-analysis-jbXKv

Conversation

@bsamek
Copy link
Copy Markdown
Owner

@bsamek bsamek commented Jan 8, 2026

  • Add get_model_log() to centralize widget lookup and avoid
    scattered string-based ID queries throughout the codebase
  • Add for_each_model_log() to eliminate repeated model iteration
    patterns (was duplicated 5+ times)
  • Update submit_prompt(), cmd_new(), and stream_to_model() to use
    the new helpers

This reduces coupling to the ID generation logic and makes the
code more maintainable. All 33 tests pass.

claude added 2 commits January 7, 2026 23:05
- Add get_model_log() to centralize widget lookup and avoid
  scattered string-based ID queries throughout the codebase
- Add for_each_model_log() to eliminate repeated model iteration
  patterns (was duplicated 5+ times)
- Update submit_prompt(), cmd_new(), and stream_to_model() to use
  the new helpers

This reduces coupling to the ID generation logic and makes the
code more maintainable. All 33 tests pass.
@claude
Copy link
Copy Markdown

claude bot commented Jan 8, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@bsamek bsamek merged commit e0e4449 into main Jan 8, 2026
1 check passed
@bsamek bsamek deleted the claude/refactoring-analysis-jbXKv branch January 8, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants