Commit Graph

423 Commits

Author SHA1 Message Date
cogwheel
e8f230ac4e Merge pull request #98 from cogwheel0/feat/chat-archive-assistant-variants
feat(chat): regenerate variants and support
2025-10-23 22:30:17 +05:30
cogwheel0
1cb8926e21 feat(chat): regenerate variants and support
Hide archived assistant variants in the linear chat view and track
previous assistant as versions so regenerated responses do not
duplicate or lose history. When regenerating, mark the previous assistant
message with an archivedVariant flag for the UI and keep it in server
history. Add a ChatMessageVersion model and a versions field to
ChatMessage to store prior generated variants. Implement
archiveLastAssistantAsVersion in chat providers to snapshot the last
assistant message into versions and reset the message for a fresh
streamed generation. Finalize flow updates to attach an adjacent archived
assistant as a version when needed so the UI can present a switcher
between current and past variants. These changes prevent duplicate
messages, preserve previous responses, and enable variant switching.
2025-10-23 22:29:28 +05:30
cogwheel
1a38cf02e5 Merge pull request #97 from cogwheel0/feat/authenticated-image-cache-manager
feat(ui): support authenticated image loading with cache manager
2025-10-23 17:39:05 +05:30
cogwheel0
0df4b4f050 feat(ui): support authenticated image loading with cache manager
Add Riverpod-aware image header and cache manager support for network
images used in avatar and markdown widgets. Convert AvatarImage to a
ConsumerWidget and read a self-signed cache manager and HTTP headers
from Riverpod so CachedNetworkImage can send auth/custom headers and use
the provided cache manager. In Markdown image builder, obtain headers
and cache manager from a ProviderContainer (via ProviderScope.containerOf)
to enable the same authenticated loading in non-consumer contexts.

Introduce image_header_utils.dart to centralize building Authorization
and custom headers from auth/api providers, with helpers for Ref,
WidgetRef, and ProviderContainer. Add dependency adjustments in
pubspec.lock for flutter_cache_manager and http marked as direct main.

These changes ensure protected images (self-signed or auth-required)
load correctly across the app and reuse the configured cache manager.
2025-10-23 17:36:31 +05:30
cogwheel
060d9721af Merge pull request #96 from cogwheel0/server-side-tts
server-side-tts
2025-10-23 17:08:34 +05:30
cogwheel0
56246507de feat(tts): add karaoke-style TTS progress bar to assistant UI
Add rendering and support for a karaoke-style text-to-speechprogress bar in assistant messages so users can see the currently
spoken sentence and highlighted word during playback.

- Append TTS karaoke bar to AssistantMessageWidget when the message is
  the active TTS target and playback is speaking/paused/loading.
- Implement _buildKaraokeBar to render the active sentence with a
  highlighted word span, using ConduitCard and theme styles.
- Import conduit_components for shared UI primitives.
- Extend TextToSpeechState with sentence data:
  sentences, sentenceOffsets, activeSentenceIndex, and per-word
  progress (wordStartInSentence, wordEndInSentence).
- Add provider callbacks wiring: onSentenceIndex and
  onDeviceWordProgress handlers (hooked into TTS backend).
- Prepare sentence splitting and word-progress plumbing in the TTS
  provider (prepares data used to drive the karaoke display).

This change improves UX by visually indicating the spoken sentence
and current word during TTS playback, aiding comprehension and
accessibility.
2025-10-23 17:05:35 +05:30
cogwheel0
8ec411d6aa feat(tts): server chunked playback queue on server pathRefactor server-backedTS path to perform sentence chunking and
queued playback via a dedicated _startServerChunkedPlayback method
instead of generating a single monolithic audio blob.

This change simplifies the server flow, avoids constructing an entire
audio buffer in memory, and enables smoother playback and error
recovery. On errors, the code still falls back to device TTS.
2025-10-23 16:46:24 +05:30
cogwheel0
561e7dd616 feat(tts): server-backed TTS engine selection
Introduce server TTS support and engine selection while keeping
device TTS as the default.

- Add new persistence keys for storing TTS engine and selected
  server voice (ttsEngine, ttsServerVoiceId, ttsServerVoiceName).
- Extend TextToSpeechService to support two engines:
  TtsEngine.device (FlutterTts) and TtsEngine.server (remote audio).
- Wire in an AudioPlayer and optional ApiService to fetch raw
  audio bytes from the server and play them, with event hooks
  mapped to existing lifecycle callbacks.
- Implement fallback to device TTS on server errors or empty
  responses, and ensure player lifecycle (pause/stop/dispose)
  is handled when using server engine.
- Allow engine and preferred voice to be configured before
  initialization and updated at runtime via updateSettings.

This enables selecting a server-side voice and using a remote
TTS provider while preserving compatibility with the existing
device TTS implementation.
2025-10-23 16:31:15 +05:30
cogwheel0
2337568baf refactor: Update README for asset paths and build command
- Changed asset paths for Google Play and App Store badges to point to the correct directory.
- Updated the demo GIF path to reflect the new location in the screenshots folder.
- Modified the build command in the setup instructions to use 'dart run' instead of 'flutter pub run' for better compatibility.
- Removed outdated demo GIF and store badge images that are no longer needed.
2025-10-21 13:23:08 +05:30
cogwheel0
fba10ef43a chore: bump version to 2.1.8 2025-10-21 00:54:39 +05:30
cogwheel0
d00cbe36cf refactor: Replace hardcoded monospace font with AppTypography constant
- Updated multiple instances of the 'monospace' font family to use AppTypography.monospaceFontFamily for consistency across the application.
- This change enhances maintainability and ensures a unified typography approach throughout the app.
2025-10-21 00:09:12 +05:30
cogwheel0
a0a0d43116 refactor: Update MainActivity for edge-to-edge display support
- Implemented modern edge-to-edge display handling for Android 15+ in MainActivity.kt.
- Removed deprecated SystemUiMode.edgeToEdge configuration from main.dart, as edge-to-edge is now managed natively.
- Ensured backward compatibility by maintaining the previous edge-to-edge display settings for lower Android versions.
2025-10-20 23:56:40 +05:30
cogwheel0
e05a560966 refactor: Enhance markdown processing for text-to-speech conversion
- Introduced new regex patterns to remove thinking and reasoning blocks from markdown input.
- Added functionality to strip emojis from the text, improving clarity for TTS.
- Implemented HTML entity decoding to ensure proper text representation.
- Replaced the existing sanitization method with a more comprehensive markdown-to-text conversion approach, enhancing performance and maintainability.
2025-10-20 23:53:07 +05:30
cogwheel0
6ea7b3231c refactor: Improve background streaming service management
- Added action handling for stopping the background streaming service, allowing for a clean shutdown when requested.
- Enhanced the stopStreaming method to ensure proper foreground service termination based on Android version compatibility.
- Updated keepAlive method to conditionally start the foreground service based on the Android version, improving service management and reliability.
- Implemented error handling for service start and stop operations to enhance robustness and provide clearer feedback on failures.
2025-10-20 23:47:04 +05:30
cogwheel0
358d0baa2a chore: Remove edge-to-edge configuration from Android styles and dependencies
- Eliminated edge-to-edge support configurations from styles.xml files for various Android API levels.
- Removed unnecessary AndroidX dependencies related to edge-to-edge support from build.gradle.kts.
- Updated release notes to reflect the version bump to 2.1.7.
2025-10-20 23:41:56 +05:30
cogwheel0
321c91c0bc chore: bump version to 2.1.7 2025-10-19 23:42:24 +05:30
cogwheel0
810b44975d refactor: Enhance chat input interaction with state-based overlay colors
- Implemented state-based overlay color changes for the chat input's InkWell widget to improve user feedback during interactions.
- Adjusted the color of the chat input icon to align with the primary button text color, enhancing visual consistency and usability.
2025-10-19 23:07:36 +05:30
cogwheel0
27bfde8f95 refactor: Enhance onboarding process in chat and app startup providers
- Integrated autofocus management for the composer in both chat and onboarding contexts to improve user experience.
- Added error handling for focus management to ensure smooth onboarding transitions.
- Updated modal bottom sheet handling to restore autofocus state after onboarding completion, enhancing usability across the app.
2025-10-19 21:10:10 +05:30
cogwheel0
42efbe8fc5 refactor: Update quick actions description and enhance AppCustomizationPage layout
- Revised the quick actions description in multiple languages to clarify their purpose as "Quickpills in chat."
- Adjusted the layout of AppCustomizationPage by reintroducing the quick pills section for improved user interaction.
- Modified spacing between UI elements for better visual consistency and usability.
- Streamlined the component structure to enhance maintainability and readability.
2025-10-19 16:06:20 +05:30
cogwheel0
89f897e8ad refactor: Revamp AppCustomizationPage layout and component structure
- Reorganized the layout of AppCustomizationPage to enhance readability and maintainability.
- Introduced an expandable card widget for collapsible settings sections, improving user interaction.
- Updated theme and language selection sections for better clarity and usability.
- Refactored theme and language handling methods to streamline the code and improve performance.
- Enhanced the overall UI consistency by adjusting spacing and component arrangements.
2025-10-19 15:23:31 +05:30
cogwheel0
553c213a47 refactor: Update placeholder color in chat input for improved visibility
- Changed the placeholder color in the modern chat input to use the input text color with adjusted alpha for better contrast and visibility in both light and dark themes.
- This enhancement aims to improve user experience by ensuring the placeholder text is more legible across different brightness settings.
2025-10-19 15:08:15 +05:30
cogwheel0
f476d6edc3 chore: Update splash and launcher images for improved branding
- Replaced multiple splash and launcher images across various resolutions to enhance the app's visual identity.
- Adjusted the splash screen background color in styles.xml for a more cohesive appearance.
- Updated icon assets for iOS to ensure consistency with the new branding guidelines.
2025-10-19 15:06:01 +05:30
cogwheel0
52753b92f7 refactor: Enhance image attachment handling in chat
- Introduced asynchronous decoding for base64 image data to improve performance and responsiveness.
- Added caching for decoded image bytes to optimize loading times and reduce redundant processing.
- Updated error handling to provide clearer feedback when image loading fails, enhancing user experience.
- Refactored loading logic to streamline the process of checking cached images and managing loading states.
- Improved the handling of data URLs and relative URLs for better image attachment management.
2025-10-19 14:18:26 +05:30
cogwheel0
2f8fd97022 refactor: Enhance file attachment handling and UI components
- Updated the file attachment service to utilize a new LocalAttachment class, improving the management of file metadata such as display names.
- Refactored methods for picking and uploading files to accommodate the new LocalAttachment structure, ensuring consistent handling of file attributes.
- Improved the chat page to validate and manage file attachments more effectively, enhancing user experience during file uploads.
- Added functionality for image previews in the file attachment widget, allowing users to see selected images before sending.
- Introduced a remove button for attachments, improving usability by enabling users to easily discard unwanted files.
2025-10-19 13:50:54 +05:30
cogwheel0
1104661238 refactor: Update message hint text for improved user guidance
- Changed the placeholder text in the message input field across multiple languages to "Ask Conduit" for better clarity and user engagement.
- Updated localization files for German, English, Spanish, French, Italian, Dutch, Russian, and Chinese to reflect the new hint text.
2025-10-18 19:08:21 +05:30
cogwheel0
d0a8a9ea05 refactor: Update spacing in AppCustomizationPage for improved layout
- Increased the spacing between UI elements in AppCustomizationPage from `Spacing.xs` to `Spacing.md` for better visual separation and improved user experience.
- Adjusted the layout of the speech rate, pitch, and volume sliders to enhance overall UI consistency.
2025-10-18 18:56:28 +05:30
cogwheel0
7676e5c67e refactor: Adjust chat bubble and message bubble padding for improved UI consistency
- Reduced the chat bubble padding from 16.0 to 12.0 for a more compact design.
- Updated the message bubble border radius from 18.0 to 12.0 to enhance visual harmony across components.
2025-10-18 15:46:30 +05:30
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
23071bb7b1 refactor: Simplify platform-specific icon handling in AppCustomizationPage and ProfilePage
- Replaced direct platform checks with a utility method `UiUtils.platformIcon` for better readability and maintainability.
- Updated localization strings for app customization to enhance clarity and consistency across multiple languages.
- Adjusted icon colors in the UI to ensure proper theming and visual consistency.
2025-10-17 15:09:37 +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
c6acfa68e1 chore: update Fastlane configuration for Android and iOS
- Added functionality to write changelog links for Android releases in Fastfile.
- Updated iOS Fastfile to generate release notes with the new version link.
- Modified Info.plist to include encryption declaration.
2025-10-17 01:27:23 +05:30
cogwheel0
54f5a3e7da chore: update Fastlane configuration for iOS
- Removed Apple ID from Appfile for security reasons.
- Added precheck option in Deliverfile to disable pre-submit checks.
- Enhanced Fastfile with a new release lane for App Store Connect API key integration.
2025-10-17 00:40:33 +05:30
cogwheel0
bc06988622 chore: bump version to 2.1.6 2025-10-16 23:51:34 +05:30
cogwheel0
a2ae48f85f chore: update Fastlane configuration and clean up API service
- Updated the Deliverfile to submit for review and skip metadata and screenshots.
- Removed outdated build lane from Fastfile.
- Refactored API service to eliminate fallback to latest assistant message, addressing duplication issues in multi-turn conversations.
2025-10-16 23:51:18 +05:30
cogwheel0
3455431786 chore: bump version to 2.1.5 2025-10-16 23:06:55 +05:30
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