Skip to content

Conversation

@appflowy
Copy link
Contributor

@appflowy appflowy commented Mar 30, 2025

Reverts #7643

Summary by Sourcery

Chores:

  • Reverted changes to the local AI settings page implementation, removing recent modifications to the UI and state management

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 30, 2025

Reviewer's Guide by Sourcery

This pull request reverts the changes introduced in the 'chore: improve local ai settings page' commit. It restores the previous implementation of the local AI settings page, including UI elements, functionality, and related bloc logic.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Reverts the changes made in the previous commit related to the local AI settings page.
  • Reverts the structure and UI of the local AI settings page.
  • Removes the local AI plugin bloc and related files.
  • Reintroduces the toggle functionality for enabling/disabling local AI.
  • Reverts the changes in ollama settings and plugin status indicator.
  • Removes the new files related to plugin state management and local AI initialization.
  • Removes the changes in the translation file.
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/local_ai_setting.dart
frontend/appflowy_flutter/lib/workspace/application/settings/ai/local_ai_bloc.dart
frontend/rust-lib/flowy-ai/src/local_ai/resource.rs
frontend/rust-lib/flowy-ai/src/entities.rs
frontend/rust-lib/flowy-ai/src/local_ai/controller.rs
frontend/appflowy_flutter/lib/workspace/application/settings/ai/ollama_setting_bloc.dart
frontend/appflowy_flutter/lib/workspace/application/settings/ai/local_ai_on_boarding_bloc.dart
frontend/resources/translations/en.json
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/plugin_state.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/ollma_setting.dart
frontend/appflowy_flutter/lib/workspace/application/settings/ai/plugin_state_bloc.dart
frontend/appflowy_flutter/lib/workspace/application/settings/ai/local_ai_setting_panel_bloc.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/init_local_ai.dart
frontend/appflowy_flutter/lib/workspace/application/settings/ai/download_offline_ai_app_bloc.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/local_ai_setting_panel.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/ollama_setting.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/plugin_status_indicator.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@appflowy appflowy merged commit 9c25769 into main Mar 30, 2025
8 checks passed
@appflowy appflowy deleted the revert-7643-chore/improve-local-ai-setting-page branch March 30, 2025 01:54
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @appflowy - I've reviewed your changes - here's some feedback:

Overall Comments:

  • This PR reverts a previous change, so ensure that any issues or concerns that led to the original change are addressed or considered in this reversion.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

final result = await AIEventGetLocalAIDownloadLink().send();
await result.fold(
(app) async {
await launchUrl(Uri.parse(app.link));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider handling launchUrl failures.

Currently the error branch for launchUrl failure is empty. Adding error logging or a fallback mechanism there might help diagnose issues if the link fails to open.

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