Skip to content

Comments

[WIP] Refactor massive addon structure for better maintainability#1

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/modularize-addon-structure
Draft

[WIP] Refactor massive addon structure for better maintainability#1
Copilot wants to merge 1 commit intomainfrom
copilot/modularize-addon-structure

Conversation

Copy link

Copilot AI commented Feb 17, 2026

Modularization Plan for Vision Assistant Pro Addon

Analysis

The main file __init__.py contains 3,778 lines with:

  • 13 classes (dialogs, engines, handlers, settings)
  • ~50+ top-level functions (prompts, utilities, media download, etc.)
  • Multiple constants and configuration data
  • All in a single monolithic file

Modularization Strategy

  • Analyze current structure and create modularization plan
  • Create new modular directory structure
  • Extract constants and configuration to constants.py
  • Extract OCR engines to ocr_engines.py
  • Extract translation functionality to translator.py
  • Extract Gemini API handler to gemini_handler.py
  • Extract utility functions to utils.py
  • Extract prompt management to prompt_manager.py
  • Extract update functionality to updater.py
  • Extract dialogs to separate files:
    • chat_dialog.py
    • settings_dialog.py
    • document_viewer_dialog.py
    • vision_qa_dialog.py
    • update_dialog.py
    • range_dialog.py
  • Extract VirtualDocument class to virtual_document.py
  • Update main __init__.py to import from modules
  • Test the modularized addon
  • Run linter and fix any issues
  • Verify all functionality works correctly

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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