Skip to content

generate_bot_message is one domain Task, but it currently does 5–6 separate jobs. #1152

@Pouyanpi

Description

@Pouyanpi

generate_bot_message ref

Violation of Single Responsibility: one 200 line method doing everything from lookup to templating to raw LLM calls to AST-style post processing.
Branch explosion: four or five nested if/elif blocks on config flags makes the control flow almost unreadable.
Hard to extend/test: want to change how passthrough works? we have to wade through static lookup and default generation code first. unittesting a single branch means mocking out five others.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions