Commit Graph

710 Commits

Author SHA1 Message Date
cogwheel0
7fb199b2e4 feat: implement service failure handling in background streaming
- Added a method to send failure notifications to Flutter when the background service fails to enter the foreground.
- Implemented a broadcast receiver to handle service failure notifications and notify Flutter about the failure.
- Enhanced the persistent streaming service to attempt recovery for failed streams.
- Introduced heartbeat monitoring for SSE streams to detect stale connections and trigger recovery actions.
2025-10-28 13:59:17 +05:30
cogwheel0
81eb38dc52 chore: remove metadata files for multiple languages 2025-10-26 23:43:27 +05:30
cogwheel0
b3dea14e7c chore: bump version to 2.1.12 2025-10-26 23:22:46 +05:30
cogwheel0
dded22f1ec feat: enhance error boundary widget with improved error handling and UI updates
- Added a method to ignore specific errors related to RenderFlex overflow.
- Refactored the error display layout to use a centered scrollable view.
- Improved visual presentation with a gradient background for the error icon and updated button styles for retry functionality.
2025-10-26 23:16:34 +05:30
cogwheel
c37151bba5 Merge pull request #110 from cogwheel0/feat-sse-stream-parser-and-function-calling-preference
feat-sse-stream-parser-and-function-calling-preference
2025-10-26 23:15:06 +05:30
cogwheel0
5ab3b9c4e0 feat(api): pass userSettings respect function_calling preference in 2025-10-26 23:00:01 +05:30
cogwheel0
ae48fcc035 feat(sse): add SSEStreamParser to parse Dio SSE streams and extract 2025-10-26 22:33:53 +05:30
cogwheel0
551e844c03 fix: change service declaration to non-late initialization in TextToSpeechController 2025-10-26 19:15:40 +05:30
cogwheel0
3c8a93d956 chore: update iOS release notes path and use variable for release notes 2025-10-25 19:56:40 +05:30
cogwheel0
38535cccb1 chore: bump version to 2.1.11 2025-10-25 15:14:48 +05:30
cogwheel0
054597f9ae chore: revert version to 2.1.10+35 and update build_runner command in GitHub Actions workflow 2025-10-25 15:14:41 +05:30
cogwheel0
0d0f4325a7 chore: bump version to 2.1.11 2025-10-25 15:05:57 +05:30
cogwheel0
116db92ac4 chore: downgrade version to 2.1.10+35 2025-10-25 15:05:43 +05:30
cogwheel0
e37fae23ef chore: update GitHub Actions workflow for Android and iOS builds
- Added permissions for write access to contents in both Android and iOS jobs.
- Updated artifact name for Android release from 'Releases' to 'Android-Release'.
- Configured Gradle caching to be read-write.
- Specified exact IPA artifact name for iOS release and added options to omit body and name during updates.
2025-10-25 15:03:09 +05:30
cogwheel0
0957e14f8b chore: bump version to 2.1.11 2025-10-25 14:52:17 +05:30
cogwheel
c88fe5fd0d Merge pull request #107 from cogwheel0/c-branch-1
feat(android): enable edge-to-edge and set SDK to 36
2025-10-25 14:47:42 +05:30
cogwheel0
f463102105 feat(android): enable edge-to-edge and set SDK to 36 2025-10-25 14:46:55 +05:30
cogwheel
b786687eb1 Merge pull request #105 from cogwheel0/feat/android-edge-to-edge-dark-themes
feat(android): enable edge-to-edge and add dark launch/normal themes for Android 15+
2025-10-25 14:32:08 +05:30
cogwheel
4129882cf7 Merge pull request #106 from cogwheel0/feat/i18n-socket-websocket-errors
feat(i18n/socket): add WebSocket error messages and show connect errors
2025-10-25 14:31:49 +05:30
cogwheel0
608c573bdb feat(android): enable edge-to-edge and add dark launch/normal themes for Android 15+ 2025-10-25 14:30:58 +05:30
cogwheel0
2b44e38a2e feat(i18n/socket): add WebSocket error messages and show connect errors 2025-10-25 14:24:49 +05:30
cogwheel
6aaeb65d43 Merge pull request #104 from cogwheel0/simplify-fastlane-config-and-release-workflows
chore: simplify fastlane config and release workflows
2025-10-24 13:38:24 +05:30
cogwheel0
cb6a01a09e chore: simplify fastlane config and release workflows 2025-10-24 13:37:24 +05:30
cogwheel0
1fe4a2db26 chore: bump version to 2.1.10 2025-10-24 12:29:00 +05:30
cogwheel
1d43b014fc Merge pull request #103 from cogwheel0/fix-background-foreground-service-lifecycle
fix(background): improve foreground service lifecycle and keep-alive handling
2025-10-24 12:25:58 +05:30
cogwheel0
af2d70ba31 fix(background): improve foreground service lifecycle and keep-alive handling 2025-10-24 12:23:56 +05:30
cogwheel0
c5f4168d47 chore: update Fastfile for AAB path and release notes for version 2.1.9 2025-10-24 11:52:05 +05:30
cogwheel0
e98f0e05b2 chore: bump version to 2.1.9 2025-10-24 01:18:48 +05:30
cogwheel
f5d79aab0d Merge pull request #100 from cogwheel0/feat-tts-sync-with-app-settings
feat(tts): initialize and sync TTS with app settings for calls
2025-10-24 00:59:26 +05:30
cogwheel0
a2d786109c feat(tts): initialize and sync TTS with app settings for calls 2025-10-24 00:58:46 +05:30
cogwheel
277b92379f Merge pull request #99 from cogwheel0/feat-strip-reasoning-copy
feat-strip-reasoning-copy
2025-10-24 00:53:02 +05:30
cogwheel0
15299ecd82 feat(chat): dismiss after send to recover screen space 2025-10-24 00:39:43 +05:30
cogwheel0
9c2cf347a7 feat(chat): inline action panel with context menu edit flow 2025-10-24 00:31:29 +05:30
cogwheel0
c1eae6608d feat: pass button BuildContext to conversation menu to position it 2025-10-23 23:38:32 +05:30
cogwheel0
625631c096 feat: add scr color tokens and use them for drawers
Introduce scrimMedium and scrimStrong color tokens to the shared
theme color tokens and propagate them through constructors, copyWith,
and lerp so scrim values interpolate and can be overridden.

Define scrim tokens as black with different alpha values per theme
mode (lighter alpha in light mode stronger in dark mode) to create
a consistent darkening effect for overlays.

Refactor ChatPage to use the new scrim tokens for drawer scrims and
format a RegExp call for readability. This replaces previous use of
overlay tokens for platform-specific scrims to provide clearer
semantics and better visual control for modal/drawer backdrops.
2025-10-23 23:27:11 +05:30
cogwheel0
5d898aaca0 refactor: improve composer layout and constrain height
the modern chat input composer layout to better handle vertical
space and alignment. Change the row crossAxisAlignment from
center to end so controls align to the input bottom. Wrap the animated
container with a ConstrainedBox that limits the composer max height to
25% of the screen, preventing excessive growth on tall displays.

Reorder and clean up the AnimatedContainer/decoration block, extracting
the composer radius constant and preserving styling (background color,
border color/width). Move the text field and inline mic into the same
row structure under the constrained container and retain the isActive
flag and padding. These changes prevent layout overflow, ensure a
consistent border radius, and improve visual alignment of controls.
2025-10-23 23:19:41 +05:30
cogwheel0
be62358270 feat(chat): strip reasoning when copying
Remove internal reasoning from copied message text to avoidleaking implementation details or developer-only when a
user content from the chat- In chat_pagecopyMessage, cleaning steps to:
  - <details type="ing">...</details blocks
  - <think>think> and <ing>...</reason> tags
 - trim leftover whitespace before writing to the clipboard
- In assistant_message_widget._buildSegmentedContent, remove an
  unused hasMediaAbove calculation and a conditional spacer that added
  extra top padding before reasoning tiles. This simplifies rendering
  logic and avoids relying on removed spacing behavior.
2025-10-23 22:37:06 +05:30
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