Commit Graph

435 Commits

Author SHA1 Message Date
cogwheel0
4c3217c283 chore: update README and remove localization documentation
- Updated image paths in README to reflect new locations.
- Removed outdated localization guidelines and related documentation files.
- Deleted unused metadata files for app descriptions and screenshots.
2025-10-16 23:06:20 +05:30
cogwheel0
893d8445f2 chore: bump version to 2.1.4 2025-10-16 11:45:55 +05:30
cogwheel0
146cbfb492 refactor: Trigger haptic feedback on tap down for immediate response 2025-10-16 11:34:42 +05:30
cogwheel0
762155500b feat: Improve offline detection logic
This commit refactors the connectivity service to be more robust and less prone to UI flicker.

Key changes:
- Any successful API response now briefly suppresses the offline warning. This prevents the UI from flashing an offline message between regular connectivity checks.
- The threshold for showing the offline warning is increased from 2 to 3 consecutive failed health checks.
- The timeout for health checks is increased to better handle slow networks.
- The offline warning is now suppressed if there are active data streams to avoid interrupting the user.
- A custom JSON converter is added for conversation metadata to handle potential type mismatches from local storage.
2025-10-16 11:34:28 +05:30
cogwheel0
14af2a100a build: Bump Android Gradle Plugin to 8.9.1
fix(chat): Improve Markdown formatter state management

- Explicitly clear the streaming formatter when switching conversations to prevent state leakage.
- Implement defensive checks to ensure the formatter is always associated with the correct message, resetting it if a mismatch is detected.
- Refine the formatter seeding logic to only use existing content in resume scenarios, preventing content duplication.
- Add detailed logging to the chat provider for better debugging of streaming and formatter behavior.
2025-10-16 11:34:13 +05:30
cogwheel0
c07ac6b427 refactor: Improve model tools auto-selection logic
This commit refactors the `modelToolsAutoSelectionProvider` to more robustly handle the automatic selection of tools when the model changes or the list of available tools is updated.

Key changes include:
- Triggering the auto-selection logic not only when the selected model changes, but also when the `toolsListProvider` finishes loading. This ensures tools are correctly applied even if they load after the model is selected.
- Restructuring the logic to handle asynchronous tool loading more gracefully, preventing race conditions.
- Using `Future.microtask` to schedule the tool application, ensuring state updates are handled correctly within the provider lifecycle.
- Clearing selected tools if the new model has no associated tools or if previously selected tools become invalid.
2025-10-13 15:25:20 +05:30
cogwheel0
ea14ea6f09 feat: Add Spanish, Dutch, Russian, and Chinese languages
Adds support for Spanish, Dutch, Russian, and Chinese to the language selection menu. This includes adding the necessary translation strings and updating the app customization page to display these new language options.
2025-10-12 20:59:05 +05:30
cogwheel0
f8c823dea4 chore: bump version to 2.1.3 2025-10-11 16:17:55 +05:30
cogwheel0
7d4aca1944 fix: add tls override for websockets incase of self signed certs 2025-10-11 16:17:35 +05:30
cogwheel0
e166a05af1 chore: bump version to 2.1.2 2025-10-11 14:55:40 +05:30
cogwheel0
499291e594 refactor: enhance search field styling in ChatsDrawer
- Wrapped the TextField in a Material widget to improve styling and ensure proper background handling.
- Added TextDecoration.none to various text styles to remove underlines, enhancing visual consistency.
- Updated the search field's input decoration for better alignment with the app's theme and design standards.
2025-10-11 14:55:13 +05:30
cogwheel0
c1059e90d5 chore: bump version to 2.1.1 2025-10-11 13:54:32 +05:30
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
3d45154182 chore: bump version to 2.1.0 2025-10-11 13:31:38 +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
87f8e069eb feat: add iOS build workflow to GitHub Actions for streamlined release process
- Introduced a new job in the GitHub Actions workflow to build the iOS app, including steps for checking out the repository, setting up Flutter, installing dependencies, and generating Freezed classes.
- Implemented versioning logic to derive the release tag and build number dynamically based on the event type (manual or tag push).
- Added steps for setting up Xcode, installing CocoaPods, building the iOS app without signing, creating an IPA from the app bundle, and uploading artifacts.
- Enhanced release updates with the ability to handle both tag pushes and manual rebuilds, ensuring a more efficient release process.
2025-10-10 21:09:58 +05:30
cogwheel0
8b26484ec5 refactor: improve background streaming handler by optimizing active stream management
- Removed unnecessary clearing of active streams in the Android implementation, allowing for more efficient management of stream IDs.
- Updated iOS implementation to use formUnion and formIntersection for better handling of active and microphone streams, enhancing performance and clarity in stream management.
- Ensured that microphone activation only occurs when there are active microphone streams, improving resource utilization.
2025-10-10 20:56:28 +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
b3e1184d8d feat: improve background streaming handler with microphone management
- Enhanced BackgroundStreamingHandler to manage microphone streams effectively during background execution.
- Introduced VoiceBackgroundAudioManager for better audio session handling, ensuring proper activation and deactivation based on microphone usage.
- Updated startBackgroundExecution method to handle microphone requirements dynamically, improving resource management.
- Ensured microphone streams are cleared appropriately when stopping background execution, enhancing overall stability.
2025-10-09 16:37:58 +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
10658d076a docs: update README with custom headers and endpoint allowlist details
- Clarified the usage of custom headers during login, linking to the new Endpoint Allowlist section for reverse proxy whitelisting.
- Added a new section on Endpoint Allowlist for custom authentication, detailing necessary path prefixes for SSO and reverse proxy configurations.
- Included specific paths that need to be whitelisted for successful login and streaming flows.
2025-10-09 00:58:13 +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
7e478a5d55 feat: add background modes for audio processing in iOS
- Updated Info.plist to include background modes for audio and processing, enabling the app to continue audio playback and processing tasks while in the background.
2025-10-08 22:34:14 +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