* Add voice transcription feature to chat
Introduces voice recording and transcription in the chat window using Whisper models. Adds new components for voice recording and audio waveform visualization, updates feature flags and environment variables, and implements a server API endpoint for audio transcription.
* Fix frequencyData reactivity in VoiceRecorder
Replaces in-place mutation of frequencyData with assignment of a new Uint8Array to ensure Svelte reactivity in the voice visualization.
* Improve AudioWaveform visualization and responsiveness
Refactors AudioWaveform.svelte to use a timeline-based amplitude visualization with dynamic pill count based on container width, smoother animation, and responsive resizing. Updates VoiceRecorder.svelte to remove fixed pillCount and adjust maxHeight for better appearance. These changes provide a more accurate and visually appealing waveform display.
* Improve audio waveform and voice recorder UI
Reduced pill width and gap in AudioWavef…
* Optimize message update handling and rendering
Refactors ChatMessage.svelte to interleave tool and stream updates for more accurate message rendering, consolidates consecutive stream tokens, and updates ToolUpdate.svelte styles for improved spacing. Also optimizes update handling in both the client and server to merge consecutive stream updates, reducing unnecessary array growth and improving performance.
* Improve message updates reactivity and storage efficiency
In the Svelte page, message update merging now creates new objects and arrays to ensure UI reactivity when streaming tokens are merged. On the server, ephemeral stream tokens and keep-alive updates are filtered out before persisting messages to the database, reducing payload size and improving rehydration performance.
* Improve chat message block handling and update persistence
Refactors ChatMessage.svelte to better handle interleaved tool and stream updates, ensuring correct text chunking and fallback behavior. Update…
* Adjust button and menu item sizes for better UI consistency
Updated various button and dropdown menu item classes in ChatInput.svelte and ChatWindow.svelte to use larger default sizes (size-8, h-9) with responsive adjustments for small screens (sm:size-7, sm:h-8). This improves visual consistency and touch target accessibility across the chat interface.
* Replace custom SVG icons with Lucide icons
Swapped out CarbonAdd and custom SVG icons for Lucide's IconPlus and IconArrowUp in ChatInput and ChatWindow components to standardize icon usage and improve maintainability.
* Update model list styles for responsiveness
Replaced fixed height/width classes with responsive 'size' utility classes for images and icons. Adjusted text size for model names on small screens to improve mobile usability.
* Add swipe gesture support to MobileNav
Introduces swipe gesture detection for opening and closing the mobile navigation drawer. Swiping right from the left edge opens the nav, and swiping l…
Replaces CarbonTools and related Carbon icons with Lucide equivalents throughout the UI, updating imports and usage in Svelte components. Updates Hugging Face organization avatar URLs to the new /api/avatars/{org} endpoint in both frontend and backend code. Adds new models to dev and prod YAML configs, and improves the models page layout and filtering. Also updates dependencies to include @iconify-json/lucide and the latest @sinclair/typebox.
Improve snapScrollToBottom action for user intent
Refactored snapScrollToBottom to better detect user scroll intent, handle force re-attachment, and optimize performance during streaming. Updated ChatWindow.svelte to use a combined scroll dependency and force re-attach when a user sends a new message, ensuring reliable auto-scroll behavior.
* fix: improve auto-scroll behavior for chat messages
- Replace scroll position comparison with wheel/touch event detection
to properly detect user scroll intent (fixes false detachment when
content above viewport changes size)
- Add IntersectionObserver on sentinel element for reliable bottom detection
- Increase threshold from 10px to 50px to prevent edge-case issues
- Include tool update count in scroll signal so tool calls and thinking
blocks properly trigger scroll updates
- Add passive event listeners for better scroll performance
* fix: add scrollbar drag detection and race condition handling
- Detect scrollbar drags by comparing scroll positions when not from
wheel/touch events
- Add 100ms grace period after programmatic scrolls to prevent false
detachment from content resize race conditions
- Update prevScrollTop on all scroll events to maintain accurate tracking
* Improve snapScrollToBottom scroll handling and re-attachment
Enhances the scroll logic to better h…
Add mcpServersLoaded store to track server load state
Introduces a new writable store, mcpServersLoaded, to indicate when MCP servers have finished loading. Updates ChatWindow.svelte to only show router examples after servers are loaded, improving UI consistency and preventing premature rendering.
* Preserve original content-type in fetch-url API
The API now returns the content-type from the fetched response instead of always using text/plain. This allows clients to receive the correct content type for the requested resource.
* Improve MIME type handling for URL file fetches
Adds a utility for safer MIME type inference and selection, using file extensions and forwarded headers. Updates file fetch logic in UrlFetchModal and loadAttachmentsFromUrls to use the new helper, improving filename extraction and MIME type accuracy. The API endpoint now always returns 'text/plain' for safety, exposing the original content type in a custom header.
* Update src/lib/components/chat/UrlFetchModal.svelte
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* Update src/lib/utils/loadAttachmentsFromUrls.ts
Co-authored-by: Eliott C. <coyotte508@gmail.com>
---------
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* mcp: tool results now properly rendered
- Text content: <pre> + monospace (terminal-style)
- Image content: base64 decoded as <img>
Conforms to MCP spec 2025-06-18
* fix: wrap long lines in tool result text output
* mcp: smaller monospace font for tool results
* Add image reference support for MCP tool calls
Introduces image reference resolution and attachment for MCP tool arguments, allowing tools to accept lightweight image reference strings (e.g. 'latest', 'image_1') and receive resolved image payloads. Updates tool invocation and flow logic to use these references, and improves tool prompt instructions for image input handling.
* Enable multiple file uploads in ChatInput
* Refactor multimodal model selection logic
* Remove 'latest' image reference support
Eliminates handling of the 'latest' image reference in image resolver logic and updates related comments and prompts to only support 'image_1', 'image_2', etc. This simplifies image reference usage and clarifies instructions for tool input parameters.
* Refactor imageRefs to fileRefs for tool payloads
* Update ServerCard.svelte
feat(mcp): add Model Context Protocol integration with tool support
Improve MCP tools caching and server selection logic
Replaces single-entry MCP tools cache with a multi-keyed cache based on server configuration, improving cache accuracy for different server sets. Refactors server selection logic in runMcpFlow to better handle custom server lists and selected server names. Removes MCP flow from generate.ts, streamlining text generation logic.
* Add OAuth authentication for MCP servers
Introduces browser-based OAuth flow for MCP servers, including new auth helpers, localStorage management, and UI actions for authentication and sign-out. Server cards now support authentication, and enabled servers include persisted auth headers for API requests. Adds callback handler and route for OAuth completion.
* Add server authentication status and UI indicators
Introduces an 'authRequired' property to MCPServer and health check responses to indicate when authenti…
Adds a gradient highlight for the router (Omni) model tile in the models page, updates its description in both backend and UI, and refines active model border styling for better theme support. Also tweaks the chat input dropdown hover style for consistency.
* Replace file upload button with bits-ui DropdownMenu
Replaces the previous file upload button and tooltip with a DropdownMenu from bits-ui, providing a more modern UI for file/image uploads in ChatInput.svelte. Adds new dependencies to package.json for bits-ui and related packages.
* Add URL file fetch modal to chat input
Introduces UrlFetchModal.svelte for fetching files from HTTPS URLs and adds it to ChatInput.svelte. Updates file upload dropdown to support uploading text files from device or URL, and refines mime type handling in ChatWindow.svelte to always allow common text-like files and images for multimodal models.
* Copy shared files when creating conversation from share
Adds logic to duplicate files from a shared conversation to a new conversation when created from a share. Files are renamed and metadata is updated to associate them with the new conversation.
* Centralize MIME type allowlists and update usage
Introduces src/lib/constants/mime.ts to centralize text and…
* Add custom scrollbar class to Modal component
Applied the 'scrollbar-custom' class to the Modal's main container to enable custom scrollbar styling. This improves the appearance and consistency of scrollbars within modals.
* Add support for loading attachments from URLs
Implements the ability to load file attachments via URL parameters using a new utility (loadAttachmentsFromUrls) and a server-side proxy endpoint (/api/fetch-url) to securely fetch remote files. Updates chat and model pages to handle 'attachments' query parameters, injects file content into user messages, and improves multimodal message preparation. Also includes minor UI adjustments for file display and refactors Plausible analytics script initialization.
* Block redirects in fetch-url API endpoint
* Add model refresh API and refactor model loading
Introduces a POST /models/refresh endpoint for admins to trigger a model refresh and receive a summary of changes. Refactors model loading logic in models.ts to support dynamic refresh, exposes refreshModels and lastModelRefreshSummary, and adds a test script (test-refresh.mjs) to verify refresh functionality. Minor code cleanup and improved override handling included.
* Delete test-refresh.mjs
Strip <think> blocks from copied chat message content
Updated clipboard copy functionality to remove <think> blocks from chat message content using a case-insensitive regex. This ensures that only the main message text is copied, regardless of autodetection.
* Upgrade dep
* link to provider's page on the Hub
* add rounding
* Update ChatMessage.svelte
* Update provider type to InferenceProvider
Replaces the provider type from string to InferenceProvider in endpoint and message update types for improved type safety and consistency with @huggingface/inference.
* Remove model author avatar from chat message link
Eliminated the model author avatar image from the chat message model link and adjusted the link's padding for consistency. Also fixed the Hugging Face organization link to use curly braces for variable interpolation.
* Switch provider logos to dynamic avatars from Hugging Face
Replaces static SVG provider logos with dynamic avatars fetched from Hugging Face organization API. Removes all local SVG assets for provider logos and updates the settings page to use the new avatar URLs, improving maintainability and ensuring up-to-date branding.
* Remove unused variable and fix type in settings page
Deleted an unused 'modelAuthor' c…
* Add custom scrollbar class to Modal component
Applied the 'scrollbar-custom' class to the Modal's main container to enable custom scrollbar styling. This improves the appearance and consistency of scrollbars within modals.
* Add support for loading attachments from URLs
Implements the ability to load file attachments via URL parameters using a new utility (loadAttachmentsFromUrls) and a server-side proxy endpoint (/api/fetch-url) to securely fetch remote files. Updates chat and model pages to handle 'attachments' query parameters, injects file content into user messages, and improves multimodal message preparation. Also includes minor UI adjustments for file display and refactors Plausible analytics script initialization.
Revert "Show router metadata only when messageInfoWidth is set"
Added a check for messageInfoWidth before rendering router metadata in ChatMessage. This prevents display issues when the message width is not yet available.
* Add support for 'prompt' URL param and draft binding
Introduces a utility to sanitize URL parameters and updates chat window logic to use a 'draft' state instead of 'message'. Both main and model-specific chat pages now support pre-filling the chat input from a 'prompt' URL parameter, and clear the parameter after use. This improves UX for deep-linking and sharing prompts.
* Sanitize URL parameters in model page
Added usage of sanitizeUrlParam for 'q' and 'prompt' URL parameters in the model page to prevent unsafe input. Wrapped parameter handling in a try-catch block to improve error handling and log failures.
Moved textarea height adjustment from event handlers to a reactive effect in ChatInput.svelte for better reliability and maintainability. Also removed redundant event listeners and input handler. Minor import change in +page.svelte.
Replaces direct focus state assignment with handleFocus and handleBlur functions. Adds a blur timeout to better support virtual keyboards, ensuring the focus state is managed correctly in different environments.
Show warning only when not loading and no messages
Updated the condition to display the warning message so it only appears when there are no messages and the chat is not loading. This prevents the warning from showing during loading states.
- Remove unused goto import in NavMenu.svelte
- Remove unused imports and worker variable in MarkdownRenderer.svelte
- Replace any types with string | boolean in settings.ts
- Preserve _countSingleDollarSigns with eslint-disable comment
Add provider info to router metadata in chat messages
Extends router metadata to include a 'provider' field throughout the backend and frontend, allowing display of provider information alongside route and model in chat messages. Updates types, message update handling, and UI rendering to support and show provider details when available.
Replaces all 2-space indentation with tabs in parseIncompleteMarkdown.ts for consistency with project style. Also applies minor whitespace and formatting adjustments in MarkdownRenderer.svelte and settings.ts for code style uniformity.
Updates the key for the last block when loading is true to ensure proper reactivity and rendering during streaming. This helps prevent rendering issues when new content is streamed in.
Refactors focus logic into a dedicated async function with animation frame waits for smoother focusing. Ensures textarea is focused after navigation and on mount, improving user experience and reliability.
Introduces block-level parsing and rendering for markdown content by adding `parseBlocks.ts` and updating `marked.ts` to support block tokens with stable IDs. Refactors `MarkdownRenderer.svelte` to process and render markdown in independent blocks using the new `MarkdownBlock.svelte` component, improving memoization and streaming efficiency. This change also ensures better handling of complex markdown features such as footnotes and math blocks.
Switch to isomorphic-dompurify and update jsdom usage
Replaces the custom dompurify utility with isomorphic-dompurify for improved SSR compatibility. Updates MarkdownRenderer and CodeBlock components to use the new sanitizer. Removes the now-unnecessary dompurify.ts utility. Updates related dependencies in package.json and aligns jsdom and related packages to compatible versions.