refactor: clean up structural dispatch patterns#354
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several refactorings and cleanups across the codebase, including simplifying enum value lookups using direct instantiation, utilizing modern string methods like removeprefix and removesuffix, leveraging typing.get_args and typing.get_origin in the documentation generator, and extracting common Notion parsing logic. It also introduces a centralized ensure_prompt_message helper to instantiate role-specific prompt messages. The review feedback highlights two key areas for improvement: first, copying parameter.input_schema in strategy.py to prevent unintended side-effects from mutating a shared dictionary; second, adding defensive type checking in ensure_prompt_message to gracefully handle non-mapping inputs instead of raising an AttributeError.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Validation
Closes #329