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.
* 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.
* 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…
Disable the share button while generating (#1958)
- 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
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.
Add initValue to settings store and refactor model settings init
Introduced an initValue method to the settings store for initializing nested settings keys only if undefined. Refactored the settings page to use this method for initializing customPrompts, multimodalOverrides, and hidePromptExamples, improving consistency and preventing unnecessary overwrites.
Add background generation polling for conversation updates (#1882)
* Add background generation polling for conversations
Introduces a BackgroundGenerationPoller Svelte component and store to track and poll background conversation generations when users navigate away during loading. Updates conversation streaming server logic to persist messages if the client detaches, ensuring conversation state is saved. Integrates poller into layout and conversation page, improving reliability of background message generation and UI updates.
* Improve background generation polling and loading state
* Refactor backgroundGenerations store to use $state
* Update +server.ts
* Harden background generation polling
* Format updated polling flows
* refactor: remove tokenizer-related functionality and dependencies
- Removed tokenizer dependencies from package.json.
- Deleted TokensCounter component and its usages across the application.
- Updated model configurations to exclude tokenizer properties.
- Refactored model processing logic to support only OpenAI-compatible endpoints.
- Adjusted API responses to omit tokenizer information.
- Cleaned up related utility functions and imports.
* Remove web search functionality and related components
- Deleted endpoints for various web search APIs (serpApi, serpStack, serper, webLocal, youApi).
- Removed generateQuery function and its usage in search.
- Eliminated web search related types and interfaces from the codebase.
- Updated Assistant and Conversation types to remove references to web search and embedding models.
- Cleaned up related utility functions and message updates for web search.
- Adjusted API routes and components to reflect the removal of web search features.
- Updated…
* Initial work on function calling
* wip
* Add websearch as a tool
* lint
* smol
* Move tools to their own files
* directly answer check
* Add text2img tool
* group tool calls together
* show retry even if no message
* fix trailing urls
* Add image popup
* format
* wip
* clean-up
* better loading indicator
* text colors
* extra example to summarize
* switch default model
* Add fetchUrl tool
* wip
* Add latest gradio
* fix types
* version bump sharp
* Basic tools menu
* working menu
* fix menu positioning
* deps fix
* add deps
* cleanup
* more cleanup
* cleanup
* package cleanups
* moar cleanup
* ui update
* Update ChatMessage.svelte
* upgrade gradio dep
* lint
* refactor and pass results to cohere
* feat: code interpreter tool
* fix: add e2b dependency
* feat: working TGI endpoint with tool results
* feat: allow image model to expand to 90dvw
* fix: dont block on title gen
* bump sharp
* misc cleanup
* fix url fetcher, adjust tool typing
*…
* work on branching
* branching
* work on input field
* wip
* wip
* helper stuff
* pass tests
* add type guards and clean up type requirements
* fixed shared conv type
* more helpers stuff
* clean up code
* addChildren helper
* addSibling
* add test for addSibling & refacto addChildren tests
* backend work pt. 1
* backend done
* add children property to messages for easier frontend rendering
* fix message id type rail
* front-end work on simple linear conversation
* fix title generation
* convert conversations on post
* server side retry works with branching
* clean up buttons
* fix retry feature backend
* Send new messages in any subtree
* make edit previous prompts feature work
* fix padding
* revert unneeded changes
* bring back pending message
* fix front-end streaming
* fix initial message
* Revert "fix initial message"
This reverts commit 6257fe8789c52a20e7506aa453efda55c16e95bb.
* Fix bug subtree state refresh
* fix continue feature on shared co…
* First push on assistants
* push fixes
* fix add assistant
* Sign up works
* lint
* mobile layout fixes
* design fixes
* Merge branch 'main' into feature/assistants
* fix copy button
* add error feedback
* hide duplicate feature
* remove wrong comments
* add autoredirect if assistant is missing
* latest changes:
- add edit feature
- hash assistant avatar
- get rid of ugly line
- check for non existent avatar
- make a better looking upload icon
* Update src/routes/conversation/+server.ts
Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
* reused type more cleanly
* fix type in shared conversation
* fixed feature
* fix: share conv with an assistant
* delete assistant avatars in db when deleting avatar
* affordance on avatar upload
* improve assistant conv start on mobile
* settings modal fly in
* better mobile intro
* mobile padding
* link affordance
* Make assistants disabled by default, but enabled in huggingchat
* lint
* Fix bottom model name
…
* initial work on new settings page
* new settings - fully working
* tweak to settings layout
* Added model links
* lint
* redirect on bad model
* delete error page
* fix links & reset button
* add saving indicator
* Make new settings work on mobile
* small tweak mobile
* Fix preprompt so it gets read correctly from the model.preprompt (#595)
* 🔒️ Harden session ID generator (#599)
* bump svelte & related to latest (#600)
* Update dockerfile to node 20 (#601)
* Only refresh cookie on post (#606)
* Session management improvements: Multi sessions, renew on login/logout (#603)
* wip: update sessionId on every login
* comment out object.freeze
* only refresh cookies on post
* Add support for multiple sessions per user
* fix tests
* 🛂 Hash sessionId in DB
* 🐛 do not forget about event.locals.sessionId
* Update src/lib/server/auth.ts
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* Add `expiresAt` field
* remove index causing errors
* Fix bug where sessions w…
fix: new chat when old one is still streaming (#578)
Tomás Gómez+1: nsarrazin
Unverified signature
70b0659
* fix: new chat when old one is still streaming
* linting
* make sure loading is off if isAborted is true
To avoid loading indicator showing up when stopping generation early
* got rid of reactive statement
---------
Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
* wip: rename happens realtime
* Make title change happen when available
* remove debug log
* rm commented out code
* lint
* replace queue by single value
* remove .js
* reset initial pending message after writing
* basic poc for web search
* * Hide feature when serpapi_key is not defined
* handle error case where serpapi failed
* only use user queries for generating the query
* Update src/lib/buildPrompt.ts
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* Update src/routes/+layout.server.ts
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* refactored getQueryFromPrompt
* add jsdom to package.json
* begin work on fetching webpage content
* Update .env
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* prettier fix
* Add feature for scraping webpages
* refactored search functionality
- now gets triggered from a separate endpoint
- results are stored in db
- results can be displayed in their own endpoint
* Added a stream to send updates from backend on web-search endpoint
* made stream more reliable
* Add front-end to web search feature
* made sure the web results button appears on newly posted messages
* close modal when message is done generating
* removed log statements
*…
Login flow (#193)
Adrien Denat+2: Eliott C., victor
Unverified signature
40f346c
* replace EthicsModal by LoginModal and start binding auth logic
* start implementing login modal + give a try to @auth/sveltekit
using Github oauth as a test
* start custom auth implementation instead of auth.js for consistency with moon-landing
* fetch user data from provider
* add migration from anonymous to user + bind frontend
* add missing auth secret + only migrate conversations for pre-existing users
* remove email scope as it's not needed
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* no need to define .well-known path
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* use env var for hf hub website url
* move sessionId to signature on csrf token exchange
* remove ethic modal check and set default settings on new users
* anonymous users can read only + modal on write tries
* refresh session cookie when existing user signin again rather than use the old one
* allow users to keep using the app without loging-in if env var is not present
* typo
* handle deni…
✨ Retry messages (#121)
Eliott C+1: victor
Unverified signature
6e03ba9
Co-authored-by: Victor Mustar <victor.mustar@gmail.com>