Commit Graph

218 Commits

Author SHA1 Message Date
cogwheel0
bb57f91aeb refactor: Improve chat input UI with enhanced microphone icon handling
- Updated the background color logic in the chat input to use a more consistent alpha value based on brightness.
- Simplified the layout of the chat input by removing unnecessary alignment and shadow properties.
- Introduced a new inline microphone icon that activates voice input, improving user interaction.
- Enhanced the overall structure of the chat input widget for better readability and maintainability.
2025-10-18 15:35:07 +05:30
cogwheel0
f36ebfd630 feat: Enhance chat functionality with follow-up message handling
- Added logic to determine the visibility of follow-up messages based on the presence of user and assistant bubbles below the current message.
- Updated the AssistantMessageWidget to accept a new parameter `showFollowUps`, allowing for conditional rendering of follow-up messages.
- Improved the user experience by ensuring follow-up messages are displayed appropriately based on the chat context.
2025-10-18 15:03:06 +05:30
cogwheel0
f81237e374 refactor: Enhance UI components with updated border styles and theme adjustments
- Removed unnecessary border from UserMessageBubble for a cleaner appearance.
- Adjusted Divider and OutlineInputBorder styles in ChatsDrawer to improve visual consistency with updated alpha values.
- Updated color tokens in AppColorTokens and TweakcnThemes to streamline theme management and ensure better contrast handling.
- Introduced new Tweakcn theme variant 'Claude' for a warm, tactile palette, enhancing overall UI aesthetics.
2025-10-18 14:25:26 +05:30
cogwheel0
60883315a2 refactor: Migrate to Tweakcn themes and enhance UI consistency
- Replaced references to AppColorPalettes with TweakcnThemes across various files to standardize theme usage.
- Updated the AppTheme and AppColorTokens to utilize TweakcnThemeDefinition for improved theme management.
- Adjusted UI components in ChatPage, ChatsDrawer, AppCustomizationPage, and ProfilePage to align with the new theme structure, ensuring consistent styling and color application.
- Removed the deprecated color_palettes.dart file to streamline the theme architecture.
2025-10-18 13:58:15 +05:30
cogwheel0
6c81d68e59 feat: Add Text-to-Speech settings and customization options
- Introduced new preference keys for TTS settings: voice, speech rate, pitch, and volume.
- Updated SettingsService to handle TTS settings and persist them.
- Enhanced AppSettings to include TTS-related properties.
- Implemented TTS settings UI in AppCustomizationPage, allowing users to select voice and adjust speech parameters.
- Added localization support for TTS settings in multiple languages.
2025-10-17 14:40:44 +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
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
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
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
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
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
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
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