Fix transcription returning dots for silence/unclear audio
Whisper model returns "..." (or similar dot patterns) when audio is
too short, silent, or unclear. Filter out responses that only contain
dots server-side to prevent them from being inserted into the draft
message or triggering auto-send on mobile.
Co-authored-by: Claude <noreply@anthropic.com>
Updated meta tags in +layout.svelte for improved SEO and social sharing, including more detailed Twitter and Open Graph tags. Added robots.txt to control crawler access and reference sitemap.
Updated the redirect in the conversation page loader to use the `base` path from `$app/paths` instead of a hardcoded root path. This ensures correct redirection when the app is deployed under a subpath.
* 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…
Moved tool and multimodal support icons out of a nested flex container for cleaner layout and removed duplicate code. This improves readability and maintainability of the model badges section.
* 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.
Removes the conversion of empty string values to undefined when updating billingOrganization in settings. This allows empty strings to be stored explicitly.
fix: update billing organization link to point to the correct overview page
* Add billing organization selection
Introduces support for selecting a billing organization for inference requests in HuggingChat. Adds a new billing section in application settings, updates user settings and API to store and validate the selected organization, and ensures requests are billed to the chosen organization by sending the X-HF-Bill-To header. Also updates environment and chart files to include the new OpenID scope required for billing.
* Update +page.svelte
* Remove billingOrganization from default settings
* Fix user settings creation and update test for findUser
The test for updateUser now passes a URL to findUser to match the updated function signature. Also, the updateUser function now inserts the full DEFAULT_SETTINGS object when creating default user settings, ensuring billingOrganization is included.
* 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>
Add strict security headers to fetch-url endpoint (#1993)
Introduces comprehensive security headers and forces 'text/plain' content type for all responses from the fetch-url API endpoint. This prevents execution of active content and mitigates risks if the endpoint is accessed directly.
Add CIMD support for automatic oauth app creation, and PKCE support (#1978)
Eliott C.
Unverified signature
c0ef209
* Add CIMD support
* update env file
* Add PKCE and fix CIMD
* add spec refs
Update conversation pagination and response format
Enhances error reporting by preferring the original HTTP transport error when both HTTP and SSE transports fail, ensuring the UI displays the primary failure reason. Updates ServerCard to better display long error messages.
* 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.
* redirect to the convo
* backend redirect to the convo
* fix: fetch url logs
* server side redirect
* require a query only for the get
* fix error type
* fix: fetch url logs
---------
Co-authored-by: rtrm <remy.trompier@gmail.com>
* 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
* Preserve and sanitize return path after login
Adds logic to capture, sanitize, and persist a 'next' return path through the OAuth login flow, ensuring users are redirected to their intended in-app location after authentication. Prevents open redirects by only allowing absolute in-app paths and updates both the auth and login callback logic to handle the new parameter.
* Update ChatMessage.svelte
Introduces a 'Refresh models' button for admins in the application settings page. The button triggers a model refresh, displays a loading state, and shows a summary message with refresh results upon completion.
Disable the share button while generating (#1958)
* 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…
Update inference providers section with settings link
Renamed the section to 'Inference Providers' and updated the description to include a link to manage provider settings on Hugging Face. This improves clarity and user guidance.
Replace history.replaceState with SvelteKit replaceState
Refactored usage of history.replaceState to use the SvelteKit-provided replaceState function in both +page.svelte files. This ensures better integration with SvelteKit's navigation and state management.