Skip to content

feat: Enable adding new AI model#1668

Open
Manar-Elhabbal7 wants to merge 3 commits into
foss42:mainfrom
Manar-Elhabbal7:feat/add-model
Open

feat: Enable adding new AI model#1668
Manar-Elhabbal7 wants to merge 3 commits into
foss42:mainfrom
Manar-Elhabbal7:feat/add-model

Conversation

@Manar-Elhabbal7

Copy link
Copy Markdown
Contributor

PR Description

I've implemented the logic to add new model

Key Changes

Implemented the Add Model feature by returning a proper Model object from dialog_add_ai_model.dart and removing the related TODO comments .

  1. Enhanced AIModelSelectorDialog by adding an add button for adding new models

  2. Refactored the dialog to use local state management instead of FutureBuilder enabling instant UI updates when models are added

I also enhanced the Code Quality & Performance:

  1. Added const keywords to static widgets for improved performance.
  2. Implemented mounted checks after async calls to prevent rashes.

Files Edited

  1. lib/screens/common_widgets/ai/dialog_add_ai_model.dart
  2. lib/screens/common_widgets/ai/ai_model_selector_dialog.dart
  3. lib/screens/common_widgets/ai/ai.dart

demo video

add-newModel.webm

Related Issues

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

We encourage you to add relevant test cases._

  • Yes
  • No, I tested it manually

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@Manar-Elhabbal7 Manar-Elhabbal7 changed the title Enable adding new AI model #1667 Enable adding new AI model Apr 20, 2026
@Manar-Elhabbal7 Manar-Elhabbal7 changed the title Enable adding new AI model feat: Enable adding new AI model Apr 21, 2026
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.

feat : Enable adding new AI model

1 participant