Skip to content

Major Code Duplication Across AI Plugins #26

@sfloess

Description

@sfloess

Description:

There is significant code duplication between the 9 AI provider plugins (Claude, Gemini, Mistral, etc.). Many classes like completion providers, actions, UI components, and chat panels are nearly identical copies with only provider-specific changes.

Impact:

  • High maintenance burden
  • Risk of inconsistent fixes
  • Harder to add new providers

Recommendation:
Extract shared base classes into ai/core or a new ai/common module:

  • BaseAIClient
  • BaseCompletionProvider
  • BaseChatTopComponent
  • BaseOptionsPanelController

This would dramatically reduce LOC and improve consistency.

See my full code review for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-solve-in-progressIssue is being worked on by code-solve automationgood first issueGood for newcomersrefactoringCode refactoring needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions