Commit Graph

391 Commits

Author SHA1 Message Date
cogwheel0
3faac9f16b refactor: improve typing indicator in assistant message widget
- Replaced the previous gradient-based typing indicator with a more dynamic three-dot animation.
- Simplified the animation logic for the typing indicator, enhancing visual feedback and responsiveness.
- Adjusted the layout to ensure proper spacing and prevent clipping during animations.
- Cleaned up the code for better readability and maintainability.
2025-10-01 01:50:36 +05:30
cogwheel0
5a4021aaa9 refactor: enhance chat page auto-scrolling behavior
- Introduced new state variables to manage auto-scrolling functionality.
- Implemented a method to calculate the distance from the bottom of the chat.
- Improved the logic for auto-scrolling to the bottom when new messages arrive or when the user is near the bottom.
- Refactored the scroll-to-bottom logic to enhance performance and user experience.
- Ensured that the auto-scroll behavior is only triggered when appropriate, preventing unnecessary scrolls.
2025-10-01 01:38:47 +05:30
cogwheel0
21cff39c1c Revert "refactor: remove unused code"
This reverts commit 03bb03446b.
2025-10-01 00:47:29 +05:30
cogwheel0
03bb03446b refactor: remove unused code 2025-10-01 00:35:56 +05:30
cogwheel0
fc4430e8df refactor: improve typing indicator logic in assistant message widget
- Simplified the logic for showing the typing indicator by introducing a new method `_shouldShowTypingIndicator`.
- Enhanced the `_isAssistantResponseEmpty` method to check for various conditions that determine if the assistant's response is empty.
- Refactored the `_buildTypingIndicator` method to streamline the UI rendering and improve visual feedback with a gradient background.
- Removed unnecessary comments and cleaned up the code for better readability and maintainability.
2025-09-30 23:56:35 +05:30
cogwheel0
37ebe46e15 refactor: optimize providers with keepAlive for improved state management
- Updated multiple providers to use `@Riverpod(keepAlive: true)` for better state retention throughout the app lifecycle.
- Enhanced `SocketConnectionStream` and `ConversationDeltaStream` with comments clarifying the purpose of public getters.
- Improved error handling in the `_ChatPageState` by ensuring proper checks for mounted state before using context.
- Added comments to clarify the rationale behind keepAlive usage in various providers, ensuring better maintainability and understanding of the codebase.
2025-09-30 23:18:06 +05:30
cogwheel0
46bd057089 refactor: enhance chat message handling and scrolling behavior
- Added `sendMessageWithContainer` function to facilitate message sending with a ProviderContainer.
- Updated `_ChatPageState` to improve scroll behavior, ensuring smoother auto-scrolling when near the bottom of the chat.
- Refactored scroll logic to simplify conditions for showing and hiding the scroll-to-bottom button.
- Adjusted the `OptimizedList` widget to correctly handle item indexing based on the reverse property, enhancing list performance and usability.
2025-09-30 21:17:11 +05:30
cogwheel0
7debb7a055 chore: update markdown dependency and refactor streaming handling
- Added `markdown` dependency version `^7.2.1` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect the direct dependency change.
- Refactored `streaming_helper.dart` to utilize `StreamingResponseController` for better stream management.
- Enhanced `ChatMessagesNotifier` to handle message streams with improved formatting and error handling.
- Updated `StreamingMarkdownWidget` to streamline markdown rendering and support new configurations.
2025-09-30 20:49:02 +05:30
cogwheel0
ff6d33abdf refactor: enhance model loading and error handling in providers
- Improved handling of asynchronous states in the model loading process.
- Added debug logging for better traceability of model loading failures.
- Ensured proper checks for mounted state to prevent updates after disposal.
- Cleaned up code formatting for better readability.
- Updated the `defaultModel` provider to include more detailed logging and error handling.
2025-09-30 15:20:08 +05:30
cogwheel0
375c961412 fix: add comment for ChatMessagesNotifier class
Resolves analyzer errors from previous commit.
2025-09-30 15:04:20 +05:30
cogwheel0
c4b1d10801 docs: revert chatMessagesProvider migration attempt
ChatMessagesNotifier is extremely complex (2400+ lines) and requires
a dedicated, careful migration session with comprehensive testing.

Current status: 38/39 providers migrated (97%)
Remaining: chatMessagesProvider only

All other Phase 5 providers successfully migrated!
2025-09-30 15:04:04 +05:30
cogwheel0
8543f9255e refactor: migrate voiceInputAvailableProvider
Phase 5.1 Complete (1/5)
- voiceInputAvailableProvider → voiceInputAvailable
- Simple FutureProvider migration
- 2 usages updated automatically
2025-09-30 14:58:53 +05:30
cogwheel0
3352aa2d6a refactor!: migrate Phase 4 name-changing providers (1-2/2)
BREAKING CHANGE: Provider names changed for clarity

- themeModeProvider → appThemeModeProvider
- localeProvider → appLocaleProvider

Migrated to @riverpod code generation.
Updated all usages (4-5 occurrences each).
All tests passing.

Phase 4 Complete!
2025-09-30 14:54:24 +05:30
cogwheel0
dd96ddccb6 refactor: migrate Phase 2 FutureProvider functions (5-15/15)
Migrated 11 more providers to @riverpod functions:
Core providers:
- userSettingsProvider → userSettings
- conversationSuggestionsProvider → conversationSuggestions
- userPermissionsProvider → userPermissions
- foldersProvider → folders
- userFilesProvider → userFiles
- knowledgeBasesProvider → knowledgeBases
- availableVoicesProvider → availableVoices
- imageModelsProvider → imageModels

Feature providers:
- promptsListProvider → promptsList
- toolsListProvider → toolsList

Bonus notifiers also migrated:
- activePromptCommandProvider → ActivePromptCommand
- selectedToolIdsProvider → SelectedToolIds

Phase 2 Complete! All 15 FutureProvider functions migrated.
All provider names unchanged, no breaking changes.
Analyzer passing, only pre-existing keepAlive warnings.
2025-09-30 14:39:22 +05:30
cogwheel0
a63739db6b refactor: migrate Phase 1 providers (2-7/10) to @riverpod
Migrated providers:
- selectedModelProvider → SelectedModel
- isManualModelSelectionProvider → IsManualModelSelection
- reviewerModeProvider → ReviewerMode
- isLoadingConversationProvider → IsLoadingConversation
- prefilledInputTextProvider → PrefilledInputText
- inputFocusTriggerProvider → InputFocusTrigger
- composerHasFocusProvider → ComposerHasFocus
- batchModeProvider → BatchMode
- reducedMotionProvider → ReducedMotion

All provider names unchanged, no breaking changes.
Build runner successful, analyzer passing.
Only 1 WARNING (keepAlive usage) and 2 INFO items remaining.
2025-09-30 14:31:56 +05:30
cogwheel0
f18d378c3c docs: add comprehensive Riverpod 3.0 migration documentation and Priority 1 implementation
Priority 1 (COMPLETE):
- Add riverpod_lint and custom_lint packages
- Update analysis_options.yaml with custom_lint plugin
- Update AGENTS.md with Riverpod 3.0 best practices
- Fix unsafe ref usage in modern_chat_input.dart
- All tests passing, zero breaking changes

Priority 2 (PLANNED):
- Complete migration plan for 39 providers (RIVERPOD_PRIORITY2_PLAN.md)
- Quick reference guide (RIVERPOD_PRIORITY2_QUICKREF.md)
- Progress tracker (RIVERPOD_PRIORITY2_TRACKER.md)
- Master documentation index (RIVERPOD_MIGRATION_INDEX.md)
- Analysis and summary documents

Documentation includes:
- Step-by-step migration examples
- 6-phase implementation plan (23-33 hours)
- Testing strategies and rollback procedures
- Risk assessment and mitigation
- Timeline and resource estimates
2025-09-30 14:27:50 +05:30
cogwheel0
3dfa5c6ec8 refactor: sockets to use riverpod 2025-09-29 00:22:12 +05:30
cogwheel0
0ba48030c8 refactor: riverpod 3 2025-09-28 23:18:24 +05:30
cogwheel0
ba1176a181 fix: login 2025-09-28 20:41:35 +05:30
cogwheel0
cb86ad8cd2 refactor: redesign status history 2025-09-28 15:58:46 +05:30
cogwheel0
0ff48eeb38 fix: sources count 2025-09-28 15:15:35 +05:30
cogwheel0
b8856679da feat: show sources 2025-09-28 14:59:29 +05:30
cogwheel0
ae20035900 fix: number of sites count 2025-09-28 14:25:35 +05:30
cogwheel0
ea8eda6784 refactor: remove debuglogs 2025-09-27 16:57:42 +05:30
cogwheel0
9411c81424 fix: followups not arriving issue 2025-09-27 16:50:16 +05:30
cogwheel0
0d5fcabea8 fix: streaming issues 2025-09-27 16:34:37 +05:30
cogwheel0
0c2bd5b4f9 refactor: login and streaming issues 2025-09-26 20:57:54 +05:30
cogwheel0
3c959c83bf refactor: use background only flows 2025-09-26 13:59:28 +05:30
cogwheel0
5f03610f35 fix: streaming 2025-09-26 01:38:00 +05:30
cogwheel0
748f2a43a8 refactor: followups design 2025-09-26 00:10:43 +05:30
cogwheel0
3124bccfeb refactor: more logs 2025-09-25 23:22:48 +05:30
cogwheel0
9210b2155a refactor: all logging 2025-09-25 22:36:42 +05:30
cogwheel0
db0261ffed refactor: titles 2025-09-25 21:15:47 +05:30
cogwheel0
0943621731 refactor: animations 2025-09-25 19:40:34 +05:30
cogwheel0
bfa5ff6363 feat: followups 2025-09-25 18:25:39 +05:30
cogwheel0
637274133f refactor: removing legacy socket code 2025-09-25 12:28:02 +05:30
cogwheel0
5f013b1b73 refactor: formatting 2025-09-24 12:00:49 +05:30
cogwheel0
b8c024d0b0 refactor: improvements 2025-09-24 10:52:15 +05:30
cogwheel0
f6a1b6123b refactor: app startup improvements 2025-09-23 13:43:01 +05:30
cogwheel0
8da8a78001 refactor: perf improvements 2025-09-23 11:00:25 +05:30
cogwheel0
41216ea432 refactor: optimize codebase 2025-09-23 00:58:58 +05:30
cogwheel0
7ab1ec3acf fix: image and files previews on the web 2025-09-22 23:17:23 +05:30
cogwheel0
66a28958ed refactor: migrate to go_router navigation 2025-09-22 14:36:43 +05:30
cogwheel0
462bf4cde2 refactor: migrate to riverpod 3 2025-09-21 22:31:44 +05:30
cogwheel0
37e5633c5c fix: tts 2025-09-21 20:18:21 +05:30
cogwheel0
c05644f731 feat: text to speech 2025-09-20 23:58:18 +05:30
cogwheel0
33fbc31672 feat: prompts from workspace 2025-09-20 23:22:57 +05:30
cogwheel0
3db5a8b760 refactor: settings pages 2025-09-20 23:02:59 +05:30
cogwheel0
8d89fd79b1 feat: model and user avatars 2025-09-20 22:03:55 +05:30
cogwheel0
b1b3e813a4 feat: conditional show of mic/send 2025-09-20 19:54:00 +05:30