Commit Graph

37 Commits

Author SHA1 Message Date
cogwheel0
e9de32fbec refactor(chat): Replace StatusHistoryTimeline with StreamingStatusWidget 2025-12-07 23:19:22 +05:30
cogwheel0
6e4ee2acd3 feat(widget): Add citation badge for source references 2025-12-07 22:35:16 +05:30
cogwheel0
ccde2e4a46 refactor(markdown): Replace markdown library with gpt_markdown and update styling 2025-12-07 22:01:18 +05:30
cogwheel0
fe0701b7b3 feat(markdown): add horizontal scroll for long math expressions 2025-12-07 15:05:28 +05:30
cogwheel0
7d4333b28d feat(l10n): Add translations for notes feature 2025-12-06 20:17:29 +05:30
cogwheel0
3829a12b45 feat(markdown): Improve table rendering with scrollable and intrinsic width support 2025-12-06 20:13:39 +05:30
cogwheel0
0615346167 feat(markdown): Add support for rendering ChartJS blocks in markdown 2025-12-06 10:56:57 +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
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
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
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
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
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
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
81a83b146d refactor: enhance markdown rendering capabilities
- Introduced new builders for ordered and unordered lists, improving the rendering of list elements in markdown.
- Added a table builder to support structured data presentation within markdown content.
- Enhanced checkbox and radio button themes for better visual consistency and user interaction.
- Updated the streaming markdown widget to utilize the new list and table builders, ensuring a cohesive markdown experience.
- Improved overall maintainability and adaptability of the markdown configuration by centralizing theme-related logic.
2025-10-03 13:37:57 +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
64aef97913 feat: mermaid parsing 2025-10-02 20:21:21 +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
7a880b507c refactor: rendered 2025-10-02 13:52:28 +05:30
cogwheel0
7debb7a055 chore: update markdown dependency and refactor streaming handling
- Added `markdown` dependency version `^7.2.1` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect the direct dependency change.
- Refactored `streaming_helper.dart` to utilize `StreamingResponseController` for better stream management.
- Enhanced `ChatMessagesNotifier` to handle message streams with improved formatting and error handling.
- Updated `StreamingMarkdownWidget` to streamline markdown rendering and support new configurations.
2025-09-30 20:49:02 +05:30
cogwheel0
d3b64716b9 chore: update markdown dependency and configuration
- Replaced `gpt_markdown` with `flutter_markdown_plus` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect the new dependency version.
- Modified `markdown_config.dart` to generalize styling configuration.
- Updated `streaming_markdown_widget.dart` to utilize `MarkdownBody` for rendering markdown content.
2025-09-30 19:53:19 +05:30
cogwheel0
12a6a07043 chore: update dependencies and remove unused files
- Replaced `flutter_highlight` with `gpt_markdown` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect new dependencies and removed obsolete ones.
- Deleted outdated Riverpod migration documentation files to streamline the project.
- Added new configurations for GptMarkdown styling in `markdown_config.dart` and updated the streaming markdown widget implementation.
2025-09-30 16:02:34 +05:30
cogwheel0
5f013b1b73 refactor: formatting 2025-09-24 12:00:49 +05:30
cogwheel0
3c082ffc9e refactor: action buttons and scroll to bottom ui/ux 2025-09-02 20:43:57 +05:30
cogwheel0
e265d35579 chore: remove google_fonts dependency and update typography to use system fonts 2025-08-28 10:12:59 +05:30
cogwheel0
a852ce7848 feat: localisation with en, de, fr and it 2025-08-23 20:09:43 +05:30
cogwheel0
4dc9ce1762 refactor: debug logs 2025-08-20 22:15:26 +05:30
cogwheel0
9a5c5a573f fix: fixed more widgets 2025-08-20 18:39:30 +05:30
cogwheel0
424aa7bffd feat: migrate markdown parser 2025-08-20 17:01:46 +05:30