Refactor Autocomplete code structure#156
Conversation
…ing. - Extracted domain objects (WordAtCursor, CursorAndLine, MessageDraft, CompletionResult, Suggestion, SuggestionList, FileReference) to `domain.py`. - Split strategy implementations into `slash_commands.py` and `file_search.py`. - Defined protocols in `protocols.py`. - Moved orchestration engines (CompositeAutocompleter, NullAutocompleter) to `engines.py`. - Created `__init__.py` to export the public API of the `autocomplete` package. - Updated consumers to import from the package root. - Introduced `FileReference` Value Object to encapsulate file marker format logic.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Refactored the
autocompletepackage to improve modularity and maintainability.Previously,
autocompletion.pycontained a mix of domain objects, protocols, strategies, and engines.This change splits the code into focused modules:
domain.py: Holds Value Objects and Data Transfer Objects.protocols.py: Defines Interfaces.slash_commands.py&file_search.py: Contain specific implementation strategies.engines.py: Contains composition logic.__init__.py: Serves as the package entry point.Also introduced
FileReferenceto centralize the logic for the[📦filename]marker.Verified with existing tests.
PR created automatically by Jules for task 12702161142593091071 started by @gregorriegler