* 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
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.
* 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.
* 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.
* 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…
refactor: new API & universal load functions (pt. 2) (#1847)
* feat(API): refactor API with Elysia
* feat: initial elysia setup
* feat: replace conv/[id] load function with universal
* fix: delete v1 catchall
* wip
* fix: response type
* fix: add cors
* feat: more routes in tools & assistants
* refacto: use normal svelte fetch in `/assistant/[assistantId]`
* refacto: use normal svelte fetch in `conversation/[id]`
* feat: use universal load function for `tools/[toolId]`
* wip: removing more server load function stuff
* feat: more routes to universal load functions
* feat: more routes to universal
* refactor: move tools loading to API endpoint
* refactor(api): implement tools search API endpoint and move load function
* fix: types on tool search
* refactor: update assistant route and remove redundant page load function
* refactor(api): move assistants page load function to api call
* refactor(settings): remove waterfall loading
* refactor: main load function
* fix: types
* feat: improve fetchJSON to handle empty responses
* …
Revert "refactor: new API & universal load functions (#1743)"
* feat(API): refactor API with Elysia
* feat: initial elysia setup
* feat: replace conv/[id] load function with universal
* fix: delete v1 catchall
* wip
* fix: response type
* fix: add cors
* feat: more routes in tools & assistants
* refacto: use normal svelte fetch in `/assistant/[assistantId]`
* refacto: use normal svelte fetch in `conversation/[id]`
* feat: use universal load function for `tools/[toolId]`
* wip: removing more server load function stuff
* feat: more routes to universal load functions
* feat: more routes to universal
* refactor: move tools loading to API endpoint
* refactor(api): implement tools search API endpoint and move load function
* fix: types on tool search
* refactor: update assistant route and remove redundant page load function
* refactor(api): move assistants page load function to api call
* refactor(settings): remove waterfall loading
* refactor: main load function
* fix: types
* feat: improve fetchJSON to handle empty responses
* …
* feat(config): wip, make config controllable from DB, public side for now
* fix: build
* feat(config): add config manager env var toggle
* wip: make backend config use config manager
* fix: typechecks
* fix: circular import
* refactor: init hook sveltekit
* fix: disable config manager during tests
* refactor: use enum for semaphore, move delete from auto after 60s to separate `deleteAt` field
* feat: config manager checks for updates on requests
* fix: config script exit
* fix: remove top-level awaits
* fix: script await
* feat: filter config keys based on public environment variables for more security
* fix: change import to type for public environment variables
* Add healthcheck route
* Add prom client with basic metrics
* wip: serve metrics on a different port
* exclude server from tsconfig
* latest
* refacto(all): use class & singleton
* refacto(all): use class & singleton
* refacto(all): add request logs
* Make all the env vars dynamic (#1092)
* Add truncate to task model (#1090)
* retry text area height (#1091)
* Make all the env vars dynamic
* only check for db at runtime
* remove secret from build step
* improve dockerfile
* Wrap db in singleton
* add .env.local to dockerignore
* changes to dockerfile
* lint
* aborted generations
* move collections build check
* Use a single dockerfile
* lint
* fixes
* lint
* don't return db during building
* remove dev
---------
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
* refacto(all): update default metrics port
* fix recursion error
* add version check
* revert vite preview
* Move request logs to debug level and add an env var to filter by log level in d…
* Direct model page
* Remove auto redirect
* fix thumbnail
* css warning
* change url for models
* instantSet from settings
* Get rid of redirect
* thumbnail
* also link from /models
* use public app color
---------
Co-authored-by: Victor Mustar <victor.mustar@gmail.com>