Commit Graph

291 Commits

Author SHA1 Message Date
cogwheel0
e73c5ee93a feat: add composer autofocus management for improved chat input experience
- Introduced ComposerAutofocusEnabled provider to manage the auto-focus state of the chat composer, allowing for better control over user interactions.
- Updated ModernChatInput to respect the autofocus setting, ensuring the keyboard behavior aligns with user intent and context.
- Enhanced ChatPage to suppress auto-focus when opening the slide drawer, improving user experience during navigation.
- Refactored SlideDrawer to include an onOpenStart callback for dismissing the keyboard, ensuring a smoother transition when the drawer is opened.
2025-10-10 15:22:54 +05:30
cogwheel0
fe1e03c198 refactor: implement SlideDrawer for enhanced chat page navigation
- Introduced SlideDrawer to replace the traditional drawer, providing a smoother and more interactive user experience.
- Updated ChatPage to utilize SlideDrawer, allowing for customizable drawer behavior and improved responsiveness.
- Refactored the app bar and navigation logic to accommodate the new slide drawer, enhancing overall layout and usability.
- Removed deprecated imports and streamlined the code for better maintainability.
2025-10-10 14:47:54 +05:30
cogwheel0
fa32630868 refactor: enhance ChatsDrawer with models mapping for improved conversation handling
- Updated _conversationsSliver and _buildTileFor methods to accept a modelsById parameter, allowing for efficient model retrieval during conversation tile building.
- Built a models map once per build for both conversation lists and search results, optimizing performance and reducing redundant data fetching.
- Refactored the archived section to improve layout and interaction, ensuring a more responsive user experience.
- Streamlined the handling of archived conversations with a dedicated header, enhancing visual clarity and usability.
2025-10-10 13:37:19 +05:30
cogwheel0
4e64b6f32a refactor: update ChatsDrawer to use slivers for improved performance and layout
- Replaced ListView with CustomScrollView and SliverList for better lazy loading of conversation tiles.
- Removed legacy helper methods and optimized the layout structure using SliverPadding and SliverToBoxAdapter.
- Enhanced the refreshable scrollable functionality to support slivers, improving overall performance and responsiveness.
- Streamlined the handling of pinned, folder, and archived conversations within the drawer.
2025-10-10 13:19:11 +05:30
cogwheel0
9fff4d49ea refactor: optimize ChatsDrawer for performance and smooth scrolling
- Added cacheExtent to the ListView in ChatsDrawer for improved scrolling smoothness.
- Updated activeConversationProvider selection to only rebuild tiles when their selected state changes, enhancing performance.
- Replaced Padding with RepaintBoundary to optimize rendering during drag operations.
- Changed clipBehavior to Clip.hardEdge for better performance in avatar rendering.
2025-10-10 13:12:26 +05:30
cogwheel0
a9030473b0 feat: enhance background streaming handler with microphone support
- Updated BackgroundStreamingHandler to include microphone permission handling for background execution.
- Modified startBackgroundExecution method to accept a requiresMicrophone parameter, allowing dynamic management of streams requiring microphone access.
- Adjusted service intent to pass microphone requirement status, improving service behavior based on app state.
- Enhanced VoiceCallService to utilize the new microphone support during voice call streaming, ensuring proper resource management.
2025-10-09 16:18:14 +05:30
cogwheel0
43c7e5200b refactor: remove offline indicator and streamline chat page logic
- Deleted the OfflineIndicator widget and its associated logic to simplify the codebase.
- Removed offline checks from the ChatPage, enhancing performance and reducing unnecessary rebuilds.
- Adjusted the ChatsDrawer to change icon size for better visual consistency.
- Cleaned up unused imports related to offline handling across multiple files.
2025-10-09 16:07:34 +05:30
cogwheel0
162a5e0781 feat: enhance connectivity management and status handling
- Integrated connectivity status monitoring into the RouterNotifier to manage navigation based on network availability.
- Refactored ConnectivityService to streamline connectivity checks and improve state management, ensuring a more reliable online/offline status.
- Updated the connection issue page to directly utilize the connectivity status provider, simplifying the connectivity state handling.
- Improved offline indicator behavior to provide clearer feedback on connectivity changes.
- Enhanced the persistent streaming service to react to connectivity status changes more effectively.
2025-10-09 15:05:34 +05:30
cogwheel0
c3acb3f6f9 chore: update splash and icon assets for improved branding
- Replaced splash screen images across various resolutions (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi) to enhance visual consistency.
- Updated the app icon to align with the new branding guidelines.
- Ensured that all asset paths are correctly referenced in the project structure.
2025-10-09 14:08:03 +05:30
cogwheel0
259fe3f9f0 feat: implement self-signed certificate support in API and UI
- Added support for self-signed TLS certificates in the ApiService, allowing configuration based on server settings.
- Introduced a toggle in the ServerConnectionPage to enable or disable trusting self-signed certificates.
- Updated localization files to include new strings for self-signed certificate settings in multiple languages.
- Enhanced the OptimizedStorageService to manage trusted servers based on user preferences for self-signed certificates.
- Improved error handling and logging throughout the affected services to ensure clarity and maintainability.
2025-10-09 01:49:56 +05:30
cogwheel0
fabb1df63a feat: enhance text-to-speech functionality with markdown support
- Integrated markdown conversion in TextToSpeechController to clean text before speech synthesis, ensuring only valid content is spoken.
- Updated VoiceCallService to utilize markdown conversion for responses, improving the clarity of spoken content.
- Enhanced VoiceCallPage to display cleaned text from markdown, providing a better user experience during voice interactions.
2025-10-09 00:20:36 +05:30
cogwheel0
96202c7453 refactor: streamline background streaming service and notification handling
- Updated BackgroundStreamingService to use a minimal notification for foreground service, enhancing clarity and compliance with Android requirements.
- Removed redundant notification updates and logging statements in VoiceCallService to improve code readability and maintainability.
- Adjusted notification channel settings for better background service management.
2025-10-09 00:10:08 +05:30
cogwheel0
e98f5cbf0f feat: integrate flutter_local_notifications for enhanced voice call notifications
- Added flutter_local_notifications dependency to manage notifications during voice calls.
- Implemented notification handling in VoiceCallService to update call status and manage user interactions.
- Enabled wake lock functionality to keep the screen on during calls and prevent audio interruptions.
- Updated AndroidManifest.xml to include necessary permissions for Bluetooth and foreground services.
- Enhanced notification actions to allow users to mute, unmute, or end calls directly from notifications.
2025-10-09 00:01:35 +05:30
cogwheel0
c99682d6a3 refactor: adjust drawer behavior and improve code readability in chat page
- Changed drawerDragStartBehavior from `DragStartBehavior.start` to `DragStartBehavior.down` for better user experience.
- Reduced drawerEdgeDragWidth from 75% to 50% of the screen width to enhance accessibility.
- Improved code formatting for better readability in the model selector sheet.
2025-10-08 22:37:51 +05:30
cogwheel0
ea79a193be feat: enhance voice call functionality and response handling
- Introduced a new boolean flag `_isSpeaking` in VoiceCallService to manage speaking state during voice interactions.
- Improved response handling by extracting incremental content from socket events and updating the accumulated response accordingly.
- Updated the chat page to include a voice call button, allowing users to initiate voice calls directly from the chat interface.
- Enhanced the modern chat input widget to support voice call functionality, providing a seamless user experience for initiating calls.
2025-10-08 19:09:57 +05:30
cogwheel0
7dd41ebf60 refactor: clean up logging and improve error handling in voice call service
- Removed unnecessary print statements from VoiceCallService to enhance code clarity and maintainability.
- Improved error handling by ensuring that exceptions are properly caught and handled without excessive logging.
- Updated the VoiceCallPage to streamline error dialog presentation, removing redundant console logs while maintaining user feedback.
- Enhanced the use of color values in UI components for better readability and consistency.
2025-10-08 13:38:56 +05:30
cogwheel0
4f6c10c857 feat: enhance text-to-speech and voice call services
- Added volume, speech rate, and pitch settings to the TextToSpeechService for improved audio control.
- Reset the accumulated response in VoiceCallService before sending messages to ensure accurate response handling.
- Enhanced the handling of socket events in VoiceCallService to manage streaming content and completion more effectively.
- Improved logging for better debugging and tracking of TTS and voice call states.
2025-10-08 13:35:24 +05:30
cogwheel0
b673921002 feat: add voice call functionality to chat page
- Introduced a new button in the chat page's app bar to initiate voice calls.
- Implemented the _handleVoiceCall method to navigate to the VoiceCallPage.
- Enhanced user experience by providing a direct way to start voice calls from the chat interface.
2025-10-08 13:04:28 +05:30
cogwheel0
a2e5f46d62 refactor: optimize regex patterns for image and markdown processing
- Introduced pre-compiled regex patterns across various components, including streaming_helper, markdown_stream_formatter, and assistant_message_widget, to enhance performance during image extraction and markdown formatting.
- Updated the AssistantMessageWidget to utilize these optimized patterns for TTS sanitization and image processing, reducing unnecessary regex evaluations.
- Improved overall efficiency in handling markdown content by leveraging pre-compiled patterns for common markdown syntax detection.
2025-10-06 00:09:52 +05:30
cogwheel0
3af46b379b refactor: optimize regex handling in markdown and tool calls parsing
- Improved performance by pre-compiling regex patterns in the ConduitMarkdownPreprocessor for better efficiency during streaming.
- Enhanced the ToolCallsParser to conditionally run cleanup regex only when necessary, ensuring cleaner and more efficient text processing.
- Updated the AssistantMessageWidget to perform quick checks before cleaning raw tags, reducing unnecessary operations and improving overall performance.
2025-10-05 23:51:48 +05:30
cogwheel0
9dd27bb4e5 refactor: streamline handling of <details> tags in markdown parsing
- Updated the assistant message widget to rely on the markdown parser for <details> tags, eliminating manual tag management for tool_calls and reasoning types.
- Enhanced the details builder to ensure proper handling of <details> elements during streaming, preventing character flashing.
- Cleaned up the code by removing redundant comments and consolidating logic for improved readability and maintainability.
2025-10-05 23:43:50 +05:30
cogwheel0
661a32866f refactor: enhance markdown parsing for <details> tags
- Implemented custom block syntax for <details> tags in the markdown parser to prevent rendering issues during streaming.
- Updated the assistant message widget to leverage the new <details> handling, eliminating the need for manual tag management.
- Added a details builder to ensure <details> elements are processed correctly without causing character flashing.
2025-10-05 23:36:14 +05:30
cogwheel0
c98e4bf959 refactor: improve styling and layout in authentication and connection issue pages
- Removed unused flutter_animate dependency to streamline the codebase.
- Adjusted container dimensions and padding in the connection issue page for better layout consistency.
- Updated spacing values and text styles to enhance readability and align with the overall theme.
- Refined border radius and background colors for improved aesthetics in various components.
- Enhanced the user interface by ensuring consistent styling across authentication and connection issue pages.
2025-10-05 00:59:32 +05:30
cogwheel0
f924d894dd refactor: update styling and spacing in file attachment and profile components
- Adjusted dimensions and padding in the file attachment widget for improved layout consistency and visual appeal.
- Updated text styles to enhance readability and align with the overall theme.
- Refined spacing values in the profile page to create a more cohesive design.
- Streamlined widget structures by modifying border radius and background colors for better aesthetics.
- Enhanced the user interface by ensuring consistent styling across various components.
2025-10-05 00:33:42 +05:30
cogwheel0
8cb55edab6 refactor: update spacing and styling in authentication and server connection pages
- Adjusted spacing values in the authentication and server connection pages for improved layout consistency.
- Modified container dimensions and padding to enhance visual appeal and maintain a cohesive design.
- Updated text styles to ensure better readability and alignment with the overall theme.
- Streamlined widget structures by removing unnecessary animations, focusing on performance and clarity.
- Enhanced the user interface by refining the design of buttons and form fields for a more polished experience.
2025-10-05 00:29:27 +05:30
cogwheel0
8629e1e039 refactor: enhance localization support in chat and voice input features
- Integrated localization for various dialog messages and UI elements in the chat and voice input components.
- Updated the confirmation dialog to utilize localized strings for delete messages, improving user experience across different languages.
- Enhanced voice input sheet to reflect localized text for status updates, action buttons, and prompts, ensuring consistency in user interactions.
- Improved the file attachment widget to display the attachment label in a localized manner, enhancing accessibility for users in different regions.
- Streamlined localization management by centralizing string retrieval, promoting maintainability and clarity in the codebase.
2025-10-05 00:05:58 +05:30
cogwheel0
072453d588 refactor: remove omitProviderInModelName functionality and related localization
- Removed the omitProviderInModelName key from PreferenceKeys and its associated logic throughout the codebase.
- Updated SettingsService and AppSettings to eliminate references to the omitted provider functionality.
- Cleaned up related localization strings in multiple languages to reflect the removal of this feature.
- Enhanced code clarity and maintainability by streamlining settings management.
2025-10-04 23:43:35 +05:30
cogwheel0
e04b43949b refactor: migrate to flutter_math_fork and markdown_widget for enhanced markdown capabilities
- Replaced flutter_markdown_plus with flutter_math_fork to improve mathematical rendering within markdown content.
- Integrated markdown_widget for better markdown processing and rendering, enhancing overall user experience.
- Updated the markdown configuration to utilize the new packages, ensuring maintainability and adaptability of markdown features.
- Refactored the streaming markdown widget to accommodate the new markdown processing logic, improving code clarity and performance.
2025-10-04 13:37:47 +05:30
cogwheel0
141ee80097 refactor: migrate to flutter_markdown_plus for enhanced markdown support
- Replaced the gpt_markdown package with flutter_markdown_plus to improve markdown rendering capabilities.
- Updated the markdown configuration to utilize the new package, enhancing the overall maintainability and adaptability of markdown features.
- Adjusted the streaming markdown widget to integrate with the new markdown body implementation, ensuring a cohesive user experience.
- Removed deprecated builders and streamlined the code for better clarity and performance.
2025-10-03 14:53:50 +05:30
cogwheel0
f8098670f9 refactor: improve chat message handling and remote task monitoring
- Removed the InactivityWatchdog implementation to streamline typing indicator management.
- Introduced a Timer-based remote task monitoring system to check task status periodically.
- Enhanced the logic for managing streaming assistant states and task synchronization.
- Improved overall code clarity and maintainability by consolidating task monitoring logic.
2025-10-03 01:02:29 +05:30
cogwheel0
349806f313 refactor: adjust border radius in chat drawer components
- Changed the border radius in _ConversationDragFeedback and _ConversationTile from a circular value to zero for a more squared appearance.
- This update enhances the visual consistency of the chat drawer components across the application.
2025-10-03 00:27:22 +05:30
cogwheel0
1ea85d5ed1 refactor: enhance theme and error handling across the application
- Updated error handling in EnhancedErrorService to utilize context for color tokens, improving theme consistency.
- Refactored various components to use context-aware shadow and color properties, enhancing visual coherence.
- Replaced hardcoded color values with dynamic tokens in multiple widgets, ensuring better adaptability to theme changes.
- Improved overall code maintainability by centralizing theme-related logic and reducing direct dependencies on static theme values.
2025-10-03 00:12:25 +05:30
cogwheel0
ad3834b43e refactor: enhance chat page greeting display and input focus management
- Introduced caching for greeting names to improve user experience during chat interactions.
- Updated greeting display logic to ensure proper visibility based on user state.
- Added a pending focus mechanism in the chat input to manage focus requests more effectively.
- Refactored layout and animation handling for a smoother greeting presentation.
- Improved overall responsiveness and state management in the chat page.
2025-10-02 22:38:28 +05:30
cogwheel0
5138491cfa refactor: optimize app initialization and startup flow
- Delayed heavy provider initialization to improve initial UI responsiveness.
- Introduced a queuing mechanism for provider initialization with staggered delays.
- Updated app startup flow to ensure proper handling of mounted state during asynchronous operations.
- Enhanced socket service management and background model loading to improve app performance and reliability.
2025-10-02 21:33:58 +05:30
cogwheel0
4b5d987a19 Revert "refactor: optimize renderer"
This reverts commit 0081d56703.
2025-10-02 15:21:44 +05:30
cogwheel0
42fa109086 refactor: profile page 2025-10-02 15:17:37 +05:30
cogwheel0
089eb48bd7 feat: add donation info 2025-10-02 15:14:34 +05:30
cogwheel0
0081d56703 refactor: optimize renderer 2025-10-02 14:41:17 +05:30
cogwheel0
0f6d1ba464 refactor: improve chat page scrolling behavior and reset logic
- Introduced a new boolean flag `_pendingConversationScrollReset` to manage scrolling behavior when switching conversations.
- Added a method `_resetScrollToTop` to handle scrolling to the top of the chat when necessary, enhancing user experience.
- Updated the logic in the chat page to ensure proper scrolling behavior based on conversation state, improving usability during conversation transitions.
- Refactored the chat input widget to simplify the layout and enhance responsiveness, ensuring better integration with the overall chat interface.
2025-10-02 12:34:12 +05:30
cogwheel0
ba239c47f0 refactor: improve chat input styling and responsiveness
- Enhanced the chat input UI with dynamic background and border colors based on theme brightness and active state.
- Introduced animated containers for smoother transitions in button and input styles, improving user experience.
- Updated the button's shadow and border properties to align with the current theme, ensuring better visual consistency.
- Refactored the layout to utilize a more responsive design, enhancing usability across different devices.
2025-10-02 12:22:07 +05:30
cogwheel0
2538181f8a refactor: enhance chat input UI with compact composer and improved styling
- Introduced a compact composer mode for the chat input, optimizing space when no quick pills are available.
- Refactored the input shell decoration and layout to improve visual consistency and responsiveness.
- Enhanced the text field and button styling, ensuring better integration with the current theme and improved user experience.
- Streamlined the build method by encapsulating the composer text field logic into a separate method for better readability and maintainability.
2025-10-02 12:12:29 +05:30
cogwheel0
a85655d639 refactor: enhance error handling and theming in EnhancedErrorService
- Updated the EnhancedErrorService to utilize the dynamic theme context for improved color handling in SnackBars and AlertDialogs.
- Replaced hardcoded color values with theme-based colors to ensure better accessibility and visual consistency across the application.
- Added context parameter to various components to facilitate theme integration, enhancing the overall user experience.
- Improved the readability of error messages by applying appropriate text colors based on the current theme.
2025-10-02 11:39:17 +05:30
cogwheel0
1fa8412e0a feat: implement dynamic theme palette selection
- Introduced a new feature allowing users to select from multiple accent color palettes for buttons, cards, and chat bubbles.
- Added `AppThemePalette` provider to manage the current theme palette and persist user selections.
- Updated the `AppTheme` class to utilize the selected palette for light and dark themes, enhancing visual customization.
- Enhanced the `AppCustomizationPage` to include a palette selector, improving user experience and personalization options.
- Updated localization files to support new palette selection UI elements in multiple languages.
2025-10-02 01:58:12 +05:30
cogwheel0
63713622d1 fix: chat input icons 2025-10-02 00:54:35 +05:30
cogwheel0
ff02af1e89 refactor: centralize conversation cache management
- Introduced a new method `refreshConversationsCache` to streamline the invalidation of the conversations provider and optionally the folders provider.
- Updated various components to utilize the new cache management method, enhancing code clarity and reducing redundancy.
- This refactor improves the efficiency of conversation and folder synchronization across the application.
2025-10-02 00:30:14 +05:30
cogwheel0
73ccb14b20 refactor: enhance conversation fetching and folder management
- Improved the logic for fetching conversations within folders by introducing a new condition to determine when to fetch folder conversations.
- Added detailed logging for successful and failed fetch attempts to aid in debugging and monitoring.
- Implemented a method to resolve folder conversations, ensuring that conversations are displayed in the correct order and that placeholders are used when necessary.
- Updated the ChatsDrawer to utilize the new conversation resolution logic, enhancing the user experience by ensuring all relevant conversations are displayed.
- This refactor streamlines conversation management and improves the overall efficiency of the chat interface.
2025-10-02 00:06:00 +05:30
cogwheel0
ebe6cec17c feat: enhance routing and connectivity handling
- Added a new route for connection issues, allowing users to navigate to a dedicated page when the server is unreachable.
- Updated the RouterNotifier to manage navigation based on server connectivity status and authentication state.
- Improved the handling of offline scenarios by integrating connectivity checks into the routing logic.
- Enhanced localization support for connection issue messages in multiple languages.
- Refactored the OfflineIndicator widget to streamline the display of connectivity status without unnecessary complexity.
2025-10-01 23:26:12 +05:30
cogwheel0
d899ca5f70 refactor: update streaming helper to use conversation delta listener
- Replaced direct stream handling for chat and channel events in `attachUnifiedChunkedStreaming` with a new `RegisterConversationDeltaListener` parameter for improved encapsulation and flexibility.
- Removed the previous chat and channel event stream parameters, streamlining the function signature and enhancing code clarity.
- Updated the `regenerateMessage` and `_sendMessageInternal` methods to utilize the new listener registration, improving the management of conversation delta events.
- Enhanced error handling for delta listeners, ensuring robust logging of errors during event processing.
2025-10-01 19:46:21 +05:30
cogwheel0
f15a8eda79 refactor: streamline conversation delta stream handling
- Replaced direct stream access in the `regenerateMessage` and `_sendMessageInternal` methods with a new helper function `_conversationDeltaStream` for better encapsulation and reusability.
- Improved the management of chat and channel event streams by utilizing the new helper function, enhancing code clarity and maintainability.
- Removed the previous `conversationDeltaEventsProvider` as it is no longer necessary with the new implementation, simplifying the provider structure.
2025-10-01 19:20:46 +05:30
cogwheel0
8a8ba76298 refactor: update providers to use keepAlive for enhanced state management
- Changed multiple provider annotations to `@Riverpod(keepAlive: true)` to improve state retention and management across the application.
- This update aligns with recent enhancements in state management practices, ensuring better performance and user experience throughout the app.
2025-10-01 18:32:16 +05:30