Commit Graph

365 Commits

Author SHA1 Message Date
cogwheel0
4003941482 feat: implement background task management for improved streaming continuity
- Integrated BackgroundTasks framework in iOS to manage background processing for audio streams.
- Added methods to register, schedule, and handle background tasks, allowing streams to continue for extended periods.
- Enhanced the BackgroundStreamingHandler to support background task notifications and keep-alive signals.
- Updated Info.plist to permit background task identifiers, ensuring compliance with iOS requirements.
- Improved the PersistentStreamingService to handle background task extensions and keep-alive signals effectively, enhancing overall streaming reliability.
2025-10-11 13:53:30 +05:30
cogwheel0
1333b10cd8 feat: enhance model and tools integration with auto-selection functionality
- Added a new `toolIds` field to the `Model` class to support tool identification.
- Implemented `modelToolsAutoSelectionProvider` to automatically apply model-specific tools when the selected model changes.
- Enhanced the logic to filter and set valid tool IDs based on available tools, improving user experience by ensuring relevant tools are automatically selected.
- Updated the default model auto-selection provider to initialize the new tools auto-selection feature, ensuring seamless integration within the app's lifecycle.
2025-10-11 13:27:39 +05:30
cogwheel0
7a8bd54dba refactor: remove self-signed certificate manager and streamline certificate handling
- Deleted the SelfSignedCertificateManager and its associated files to simplify the certificate management process.
- Updated ApiService and ConnectivityService to include self-signed certificate configuration directly, enhancing clarity and maintainability.
- Adjusted comments to reflect the new approach to handling self-signed certificates, ensuring better understanding of security considerations.
- Improved the application startup sequence by deferring unnecessary initializations, contributing to a more efficient first paint performance.
2025-10-11 13:16:31 +05:30
cogwheel0
968c02940f refactor: optimize application startup sequence and migration handling
- Removed the immediate initialization of SelfSignedCertificateManager to improve the app's first paint performance.
- Introduced lazy initialization of the certificate manager after the first frame, enhancing startup efficiency.
- Implemented a fast path for migration checks in PersistenceMigrator to skip unnecessary operations if already completed in the current session, improving overall performance during app startup.
- Updated comments for clarity on the changes made to the startup sequence and migration process.
2025-10-11 12:44:35 +05:30
cogwheel0
8ac71c5718 fix: improve server connection handling during authentication
- Updated AuthStateManager to clear the active server ID upon logout, ensuring a proper return to the server connection page.
- Enhanced RouterNotifier to allow users to stay on the server connection page if authenticated, improving navigation flow.
- Modified AuthenticationPage to navigate back to the server connection page instead of popping the navigation stack, enhancing user experience during server setup.
2025-10-10 22:08:23 +05:30
cogwheel0
c26ba02a88 feat: add support for additional languages in localization
- Expanded the localization support by adding new languages: Chinese (zh), Russian (ru), Dutch (nl), and Spanish (es).
- Updated the localization files and the AppLocalizations class to include the new languages, ensuring a broader reach for international users.
- Enhanced the isSupported method to recognize the newly added languages, improving the app's adaptability to diverse user preferences.
2025-10-10 21:38:19 +05:30
cogwheel0
dea53593ba refactor: replace SlideDrawer with ResponsiveDrawerLayout for improved responsiveness
- Updated ChatPage and ChatsDrawer to utilize ResponsiveDrawerLayout instead of SlideDrawer, enhancing the drawer's adaptability across devices.
- Removed the SlideDrawer implementation, streamlining the codebase and improving maintainability.
- Adjusted drawer opening and closing logic to align with the new layout structure, ensuring a smoother user experience on both mobile and tablet devices.
2025-10-10 21:21:13 +05:30
cogwheel0
4eb1191748 feat: enhance background streaming functionality with improved wake lock management
- Updated the wake lock duration in BackgroundStreamingHandler to 3 hours, ensuring the service remains active for longer periods.
- Modified the keepAlive method to support both iOS and Android, allowing for better background task management across platforms.
- Implemented a periodic keep-alive timer in VoiceCallService to refresh the wake lock every 5 minutes, enhancing service reliability during voice calls.
- Added debug logging for successful keep-alive invocations, improving traceability of background operations.
2025-10-10 19:59:17 +05:30
cogwheel0
86892d21c8 fix: adjust content scale and blur settings in chat page for improved visual clarity
- Set contentScaleDelta and contentBlurSigma to 0.0 in the chat page, ensuring a clearer visual presentation without unintended scaling or blurring effects.
- This change enhances the user experience by providing a more focused and readable chat interface.
2025-10-10 19:01:16 +05:30
cogwheel0
fcb89e56c7 refactor: replace ListView with CustomScrollView and SliverList in chat page for improved performance
- Updated the loading messages list to use CustomScrollView and SliverList, enhancing the layout and performance during message loading.
- Refactored the actual messages display to utilize OptimizedSliverList, allowing for better lazy loading and smoother scrolling.
- Adjusted padding and cache extent settings to optimize the user experience while navigating through messages.
- Streamlined the message rendering logic to improve maintainability and responsiveness of the chat interface.
2025-10-10 18:49:35 +05:30
cogwheel0
570fa26011 feat: enhance markdown image handling with customizable builder
- Introduced an `imageBuilderOverride` parameter in the `ConduitMarkdown` class to allow customization of how markdown images are rendered.
- Updated the `StreamingMarkdownWidget` to accept the new `imageBuilderOverride` parameter, enabling enhanced image handling in streaming contexts.
- Implemented an `imageBuilderOverride` in the `_AssistantMessageWidgetState` to utilize `EnhancedImageAttachment`, providing caching, authentication headers, and fullscreen viewing for markdown images.
- Refactored the `_ImageBuilder` class to support the new image building logic, improving flexibility and maintainability of image rendering in markdown content.
2025-10-10 16:12:31 +05:30
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
778116e258 refactor: optimize socket service event handling and token management
- Updated SocketServiceManager to read the authTokenProvider3 without watching it, preventing unnecessary rebuilds on token changes.
- Enhanced SocketService to manage event listeners more effectively by adding and removing event handlers for 'events' and 'events:channel', improving overall socket management.
2025-10-09 20:51:29 +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
c073d71363 feat: enhance background streaming service with foreground handling
- Improved BackgroundStreamingService to manage foreground service notifications more effectively, ensuring compliance with Android requirements.
- Implemented dynamic foreground service type resolution based on microphone permission, enhancing service behavior based on app state.
- Added checks for app foreground status in connectivity management, improving responsiveness to network changes.
- Refactored notification handling to streamline service lifecycle management and improve code maintainability.
2025-10-09 15:47:27 +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
052a68e3b6 chore: update dependencies and enhance connectivity service
- Added `connectivity_plus` dependency to manage network connectivity status.
- Updated `pubspec.yaml` to include the new dependency version.
- Enhanced `ConnectivityService` to utilize `connectivity_plus` for improved connectivity monitoring and handling.
- Refactored connectivity checks and state management for better performance and reliability.
2025-10-09 00:45:00 +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
c08bfa773d refactor: remove redundant socket handler bindings in SocketService
- Eliminated unnecessary calls to _bindCoreSocketHandlers() in the SocketService class, streamlining the socket event subscription process.
- Improved code clarity and maintainability by reducing redundant method invocations during socket event handling.
2025-10-06 00:15:51 +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
a8ae2644f5 refactor: improve background streaming service and error handling
- Updated BackgroundStreamingService to start in the foreground immediately to prevent timeout issues, with a placeholder notification.
- Enhanced error handling in BackgroundStreamingHandler to catch exceptions when starting the foreground service, ensuring active streams are cleared if the service fails to start.
- Refactored saveStreamStatesForRecovery method to improve logging and clarity in stream state management.
- Added checks to close suspended stream controllers when transitioning to the foreground, enhancing resource management.
2025-10-05 23:16:44 +05:30
cogwheel0
5d37235851 refactor: enhance connectivity service with disposal checks
- Added checks in the ConnectivityService to prevent operations on a closed stream controller, ensuring stability and preventing potential errors.
- Updated the timer creation and stream addition logic to only execute if the service is not disposed, improving resource management.
- Enhanced the dispose method to safely close the connectivity controller, maintaining clean resource handling.
2025-10-05 12:36:56 +05:30
cogwheel0
305d3ffee6 refactor: update connectivity service to use base URI for server health checks
- Refactored the ConnectivityService to replace health URI references with base URI for improved clarity and consistency.
- Updated methods to probe server health and resolve URIs, ensuring a more streamlined approach to connectivity checks.
- Enhanced the provider setup to create a Dio instance with custom headers from the active server configuration, improving flexibility in server communication.
2025-10-05 02:50:50 +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
f4e4e86c38 refactor: remove flutter_highlight dependency and enhance code block styling
- Removed flutter_highlight as a dependency to streamline the codebase.
- Updated CodeBlockHeader to improve styling based on the current theme, enhancing visual consistency.
- Adjusted code block background and text colors to match GitHub/Atom themes for better readability.
- Refactored markdown processing logic to eliminate reliance on deprecated highlight features, improving maintainability.
2025-10-04 23:31:42 +05:30
cogwheel0
a4319a1d9e refactor: update markdown dependencies and enhance rendering capabilities
- Added flutter_markdown_plus as a new dependency for improved markdown rendering.
- Removed deprecated markdown_widget and related LaTeX handling, streamlining the codebase.
- Updated the ConduitMarkdown class to utilize the new markdown processing logic, enhancing maintainability.
- Improved the StreamingMarkdownWidget to leverage the updated markdown rendering methods, ensuring a cohesive user experience.
- Enhanced support for LaTeX and Mermaid diagrams within markdown content, providing better visual representation.
2025-10-04 23:05:03 +05:30
cogwheel0
758ed411b0 refactor: enhance markdown processing and code structure
- Updated the ConduitMarkdown class to streamline markdown rendering, improving maintainability and clarity.
- Refactored the markdown configuration to utilize new methods for building markdown blocks and handling LaTeX syntax.
- Improved the StreamingMarkdownWidget to leverage the updated markdown processing logic, ensuring a cohesive user experience.
- Enhanced the handling of Mermaid diagrams and LaTeX rendering, providing better support for complex markdown content.
2025-10-04 16:04:49 +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
399b44bc74 refactor: integrate Mermaid diagram support in markdown rendering
- Added functionality to render Mermaid diagrams within markdown content, enhancing visual representation of diagrams.
- Implemented a new method to build Mermaid blocks, handling both supported and unsupported platforms gracefully.
- Updated the streaming markdown widget to parse and display Mermaid code blocks, ensuring a cohesive user experience.
- Improved overall maintainability of the markdown configuration by centralizing Mermaid-related logic and enhancing code clarity.
2025-10-03 16:29:21 +05:30