Commit Graph

78 Commits

Author SHA1 Message Date
Marcello Fitton
8f7e0fb1f8 fix: scroll active sidebar items into view (#4965)
* Add centering of settings sidebar link when isActive

* abstract redundant logic into a reusable hook

* add jsdocs | refactor hook to consume behavior and block args

* remove unused import

* dev

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-02-06 19:23:14 -08:00
Timothy Carambat
2c513ae396 Web push notifications (#4942)
* WIP push notifications

* testing push

* cleanup for web-push bootstrapping
2026-02-02 10:56:58 -08:00
Timothy Carambat
54e0cde56f Manage Onboarding decision via DB flag (#4926)
* WIP add onboarding flag to db

* dev build

* fix onboarding telem call
2026-01-28 16:32:26 -08:00
Timothy Carambat
88459ce2d2 Thinking block persist toggle state (#4916)
* Thinking block persist toggle state

* dev build
2026-01-28 13:27:00 -08:00
Timothy Carambat
af998ee0a7 Docker model runner download from UI (#4884)
* Enable downloads of DMR models from UI

* add utils + dev build

* linting
2026-01-19 15:08:07 -08:00
Timothy Carambat
607b5faf74 Extract Model Table to component (#4871)
* Extract Model Table to component
Add provider icons to header rows and installed models
Light mode supported
Mapping for model name id hints to provider
Update DMR to filter chat models by ability since not available via hub API

* linting + dev

* fix incorrect import
2026-01-16 16:34:58 -08:00
Timothy Carambat
feb039ea70 Adjust fix path to use ESM import (#4867)
* Adjust fix path to use ESM import

* normalize fix-path imports and usage across the app

* extract path fix logic to utils for server and collector

* add helpers

* repin strip-ansi in collector

* fix log for localWhisper
lint
2026-01-15 16:13:21 -08:00
Timothy Carambat
ff7cb17e34 Improved DMR support (#4863)
* Improve DMR support
- Autodetect models installed
- Grab all models from hub.docker to show available
- UI to handle render,search, install, and management of models
- Support functionality for chat, stream, and agentic calls

* forgot files

* fix loader circle being too large
fix tooltip width command
adjust location of docker installer open for web platform

* adjust imports
2026-01-14 15:55:26 -08:00
Sean Hatfield
34a96ad30f Remove Workspace Creation Onboarding Page (#4823)
* remove create workspace step for onboarding

* remove unused image

* workspace creation into dedicated useEffect + use translated workspace name

* dev tag

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-01-13 16:03:39 -08:00
Sean Hatfield
5039045f0c VectorDB class migration (#4787)
* Migrate Astra to class (#4722)

migrate astra to class

* Migrate LanceDB to class (#4721)

migrate lancedb to class

* Migrate Pinecone to class (#4726)

migrate pinecone to class

* Migrate Zilliz to class (#4729)

migrate zilliz to class

* Migrate Weaviate to class (#4728)

migrate weaviate to class

* Migrate Qdrant to class (#4727)

migrate qdrant to class

* Migrate Milvus to class (#4725)

migrate milvus to class

* Migrate Chroma to class (#4723)

migrate chroma to class

* Migrate Chroma Cloud to class (#4724)

* migrate chroma to class

* migrate chroma cloud to class

* move limits to class field

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* Migrate PGVector to class (#4730)

* migrate pgvector to class

* patch pgvector test

* convert connectionString, tableName, and validateConnection to static methods

* move instance properties to class fields

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* Refactor Zilliz Cloud vector DB provider (#4749)

simplify zilliz implementation by using milvus as base class

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* VectorDatabase base class (#4738)

create generic VectorDatabase base class

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* Extend VectorDatabase base class to all providers (#4755)

extend VectorDatabase base class to all providers

* patch lancedb import

* breakout name and add generic logger

* dev tag build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-01-13 15:24:42 -08:00
Timothy Carambat
133b62f9f6 patch AWS credential issue in docker context (#4842)
path AWS credential issue in docker context
2026-01-08 17:06:49 -08:00
Timothy Carambat
092b1b45f8 Upgrade YT Scraper (#4820) 2026-01-02 15:41:22 -08:00
Timothy Carambat
b2f49b6036 patch ESM import issue (#4819) 2026-01-02 14:11:13 -08:00
Sean Hatfield
6c1f8a38ce Refactor localWhisper to use custom FFMPEGWrapper class (#4775)
* refactor localWhisper to use new custom FFMPEGWrapper class

* stub tests in github actions

* add back wavefile conversion to 16khz 32f to fix docker builds

* use afterEach for cleanup in ffmpeg tests

* remove unused FFMPEG_PATH env check

* use spawnSync for ffmpeg to capture and log output

* lint

* revert removal of try/catch around validateAudioFile for more helpful error msgs

* use readFileSync instead of createReadStream for less overhead

* change import to require for fix-path and stub import in tests

* refactor to singleton to preserve ffmpeg path
dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-18 11:41:45 -08:00
Marcello Fitton
6b54bc4c57 Add Eslint Config in /frontend (#4785)
* Add local ESLint configuration and disable rules to allow for errorless state

* Remove unnecessary ESLint disable comments in AuthContext and usePromptInputStorage for cleaner code.

* Update eslint-plugin-react-hooks

* Configure prettier to work with eslint

* Removed trailing commas from eslint config

* Prettier to source code

* add a v2 lint script

* put back eslint-disable comments

* fix eslinter and prettier application
always apply --fix since we --write prettier, otherwise it fails

* precaution dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-16 20:14:24 -08:00
Marcello Fitton
62b45a76dc Implement Global Error Boundary (#4765)
* Implement global error boundary

* add 404 page for generic path catching

* devbuild

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 15:08:12 -08:00
Marcello Fitton
c7b16c9aa8 Upgrade to Multer 2.0.0 (#4768)
* upgrade to multer 2.0.0

* bump dev

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 14:32:42 -08:00
Marcello Fitton
8aa78c2b75 Fix Stale User Session with Proper fetch Error Handling (#4770)
* add refresh user functionality

* prettier

* add eslint disable comment for exhaustive-deps warning in AuthContext to stop nagging about navigate func

* remove unused imports and fix typo

* handle unsafe parse of undefined for in-session user deleted

* Refactor refreshUser function to handle errors and return structured response. Update AuthProvider to manage user data based on success status.

* Remove console error logging from promise catch in System model for cleaner error handling.

* change status from 404 to 400 and valid to success

* Refactor error handling in AuthProvider's refreshUser logic to remove redundant catch block and streamline user session management on failure.

* prettier

* reorder clauses - return errors

* refactor
account for all user modes
dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 11:43:20 -08:00
Marcello Fitton
dbb79b6748 Migrate to bcryptjs (#4767)
* Replace bcrypt with bcryptjs across multiple files

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-11 15:19:04 -08:00
Timothy Carambat
baab837b58 Bump form-data version (#4761)
* Bump  packages

* dev tag

* dev tag rename
2025-12-10 19:29:46 -08:00
Timothy Carambat
692fa755ee Bump expressJS from 4.18.2 -> 4.21.2 (#4760)
Bump expressJS from 4.18.2 -> 4.21.2 to patch body-parser CVE-2024-45590 as general maintence task'
2025-12-10 18:54:18 -08:00
Timothy Carambat
3800a68402 Docker base image upgrade to Ubuntu 24 (#4754)
* test base image bump

* patch frontend compilation due to Vite QEMU exception

* migrate all runners to arm64 to avoid QEMU slowdown

* add back layer cleanup

* remove layer cache fix
2025-12-10 13:50:24 -08:00
Timothy Carambat
92752a2a15 Improve MCP functionality (#4709)
* Improve MCP functionality

* apply ANSI strip path

* attempt ARM build

* improve dockerfile IO build time and migrate to ARM build

* fix comment

* add ability to disable MCP cooldown feature

* update devbuild name

* move chromium arm build patch to CDN
2025-12-05 11:01:20 -08:00
Sean Hatfield
99942159f6 Migrate to react router createBrowserRouter (#4693)
* migrate to react router createBrowserRouter

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-02 15:26:55 -08:00
Timothy Carambat
155900eae7 dev build with new epub2 build target and remove patch work (#4694) 2025-11-26 17:36:34 -08:00
Marcello Fitton
5716ac5ed5 Custom Default System Prompt (#4487)
* Add Default System Prompt Management

- Introduced a new route for fetching and updating the default system prompt in the backend.
- Added a new Admin page for managing the default system prompt, including a form for editing and saving changes.
- Updated the SettingsSidebar to include a link to the new Default System Prompt page.
- Implemented fetching of available system prompt variables for use in the prompt editor.
- Enhanced the ChatSettings and ChatPromptSettings components to support the new default system prompt functionality.

This commit lays the groundwork for improved management of system prompts across workspaces.

* Remove validation for system prompt in ChatSettings component

* Add comment for system prompt in workspaces model

* linting, simplify logic for default assumption

* dev build

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-24 13:24:10 -08:00
Timothy Carambat
6b1b8bbc94 4595 refactor PWA (#4664)
* feat: add web app manifest and mobile PWA meta tags

* feat: serve dynamic manifest.json with custom branding for pwa

* feat: add ios status bar theming for pwa

* fix: prevent overscroll behavior for mobile

* fix: prevent ios safari auto-zoom on chat input

* fix: remove theme-color meta tags conflicting with ios status bar

* fix: add missing apple-mobile-web-app-capable meta tag for ios pwa

* fix: move catch-all route after manifest endpoint to prevent interception

* feat: add pwa detection helper and conditional styling for standalone mode

* PWA refactor

* undo changes to native CSS

* class fix

* proper response obj

* fix patch for import

* fix manifest errors

---------

Co-authored-by: Christian De Santis <christian.constantino98@gmail.com>
2025-11-19 16:08:09 -08:00
Marcello Fitton
fd9256b361 Disable Prisma CLI Telemetry in Entrypoint Shell Script (#4609)
* propogate anythingllm telemetry settings to prisma

* Disable Prisma CLI telemetry in Docker entrypoint script

* Delete incorrect disable block

* test build

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-19 15:11:53 -08:00
Timothy Carambat
0ee0a96506 Migrate gemini agents away from Untooled (#4505)
* Migrate gemini agents away from `Untooled`

* disable agents for gemma models as they are not supported for tool calling

* Dev build
resolve #4452 via function name prefix and then stripping within provider
2025-10-07 11:40:00 -07:00
Timothy Carambat
cf3fbcbf0f Improve URL handler for collector processes (#4504)
* Improve URL handler for collector processes

* dev build
2025-10-07 11:03:27 -07:00
Timothy Carambat
3613888483 Tooltips for workspace and threads (#4500)
* Tooltips for workspace and threads

* refactor tooltips

* add comp on desktop only

* dev
2025-10-06 16:19:14 -07:00
Timothy Carambat
d6f0d305ab Enable real-time agent tool call streaming for all providers (#4279)
* WIP agentic tool call streaming
- OpenAI
- Anthropic
- Azure OpenAI

* WIP rest of providers EXCLUDES Bedrock and GenericOpenAI

* patch untooled complete/streaming to use chatCallback provider from provider class and not assume OpenAI client struct
example: Ollama

* modify ollama to function with its own overrides
normalize completion/stream outputs across providers/untooled

* dev build

* fix message sanization for anthropic agent streaming

* wip fix anthropic agentic streaming sanitization

* patch gemini, webgenui, generic aibitat providers + disable providers unable to test

* refactor anthropic aibitat provider for empty message and tool call formatting

* Add frontend missing prop check
update Azure for streaming support
update Gemini to streamting support on gemini-* models
generic OpenAI disable streaming
verify localAI support
verify NVIDIA Nim support

* DPAIS, remove temp from call, support streaming'

* remove 0 temp to remove possibility of bad temp error/500s/400s

* Patch condition where model is non-streamable and no tools are present or called resulting in the provider `handleFunctionCallChat` being called - which returns a string.

This would then fail in Untooled.complete since response would be a string and not the expected `response.choices?.[0]?.message`

Modified this line to handle both conditions for stream/non-streaming and tool presence or lack thereof

* Allow generic Openai to be streamable since using untooled it should work fine
honor disabled streaming for provider where that concern may apply for regular chats

* rename function and more gemini-specific function to gemini provider

* add comments for readability
.complete on azure should be non-streaming as this is the sync response

* migrate CometAPI, but disable as we cannot test

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-10-01 10:17:18 -07:00
Timothy Carambat
95557ee16f Allow user to specify args for chromium process so they dont need SYS_ADMIN on container. (#4397)
* allow user to specify args for chromium process so they dont need SYS_ADMIN perms

* use arg flag content

* update console outputs
2025-09-17 16:31:08 -07:00
Timothy Carambat
0fb33736da Workspace Chat with documents overhaul (#4261)
* Create parse endpoint in collector (#4212)

* create parse endpoint in collector

* revert cleanup temp util call

* lint

* remove unused cleanupTempDocuments function

* revert slug change
minor change for destinations

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>

* Add parsed files table and parse server endpoints (#4222)

* add workspace_parsed_files table + parse endpoints/models

* remove dev api parse endpoint

* remove unneeded imports

* iterate over all files + remove unneeded update function + update telemetry debounce

* Upload UI/UX context window check + frontend alert (#4230)

* prompt user to embed if exceeds prompt window + handle embed + handle cancel

* add tokenCountEstimate to workspace_parsed_files + optimizations

* use util for path locations + use safeJsonParse

* add modal for user decision on overflow of context window

* lint

* dynamic fetching of provider/model combo + inject parsed documents

* remove unneeded comments

* popup ui for attaching/removing files + warning to embed + wip fetching states on update

* remove prop drilling, fetch files/limits directly in attach files popup

* rework ux of FE + BE optimizations

* fix ux of FE + BE optimizations

* Implement bidirectional sync for parsed file states
linting
small changes and comments

* move parse support to another endpoint file
simplify calls and loading of records

* button borders

* enable default users to upload parsed files but NOT embed

* delete cascade on user/workspace/thread deletion to remove parsedFileRecord

* enable bgworker with "always" jobs and optional document sync jobs
orphan document job: Will find any broken reference files to prevent overpollution of the storage folder. This will run 10s after boot and every 12hr after

* change run timeout for orphan job to 1m to allow settling before spawning a worker

* linting and cleanup pr

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* dev build

* fix tooltip hiding during embedding overflow files

* prevent crash log from ERRNO on parse files

* unused import

* update docs link

* Migrate parsed-files to GET endpoint
patch logic for grabbing models names from utils
better handling for undetermined context windows (null instead of Pos_INIFI)
UI placeholder for null context windows

* patch URL

---------

Co-authored-by: Sean Hatfield <seanhatfield5@gmail.com>
2025-08-11 09:26:19 -07:00
Timothy Carambat
c218a0dfe3 Mobile sync support (#4173)
* WIP on mobile connections
todo: register devices
todo: data sync or connection

* improve connection flow and registration
add streaming from service
TODO: user scoping

* dev build mobile support

* fix path

* handle relative URLs

* handle localhost access in product

* add device de-register

* sync styles

* move UI to be out of the normal path since beta only

* Add user scoping to mobile connection requests
Remigrate DB for user associations
Implement temp token registration to prevent unauthorized device registration requests
cleanup middlewares
2025-07-31 12:28:03 -07:00
Timothy Carambat
2c19dd09ed Native Embedder model selection (incl: Multilingual support) (#3835)
* WIP on embedder selection
TODO: apply splitting and query prefixes (if applicable)

* wip on upsert

* Support base model
support nomic-text-embed-v1
support multilingual-e5-small
Add prefixing for both embedding and query for RAG tasks
Add chunking prefix to all vector dbs to apply prefix when possible
Show dropdown and auto-pull on new selection

* norm translations

* move supported models to constants
handle null seelction or invalid selection on dropdown
update comments

* dev

* patch text splitter maximums for now

* normalize translations

* add tests for splitter functionality

* normalize

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-07-22 10:07:20 -07:00
Timothy Carambat
64d9fbc8f0 Show app version in system settings sidebar (#4044)
* Add version tagging
resolves #4038
closes #4034
closes #4028

* add hook

* add build

* patch
2025-06-24 13:56:12 -07:00
Timothy Carambat
2055c8accd Flag to disable login UI and endpoints for credentialed auth (#3984)
* Flag to disable login UI and endpoints for credentialed auth

* dev build

* fix translation key
2025-06-11 12:46:40 -07:00
Timothy Carambat
c0d66e6c19 Enable UI/UX for model swapping in chat window (#3969)
* Enable UI/UX for model swapping in chat window

* forgot component

* patch useGetProviders hook to set loading on change of provider

* dev build

* normalize translations

* patch how model default is provided

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-06-09 09:59:17 -07:00
Timothy Carambat
4eb951d40e Fix model map staleness behavior or fallback (#3971)
* Fix model map staleness behavior or fallback

* patch url

* fix log

* dev build
2025-06-06 17:39:48 -07:00
Sean Hatfield
ef0928993e Implement importing of agent flows from community hub (#3867)
* implement importing of agent flows from community hub

* auto enable flow on import

* remove unused blocks for docker
prevent importing or saving of agent flows that have unsupported blocks for version or platform

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-05 15:08:58 -07:00
Sean Hatfield
77f6262290 Direct output for agent flows (#3873)
* wip: create direct output switch on last block and send response to ui

* lint

* Return flow on direct output enabled
prevent new blocks below direct output block
Update executor/aibitat to handle skipping of handler outputs

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-05 14:46:44 -07:00
Timothy Carambat
4445f39bf8 Warn bad docker command (#3827)
* Add context window finder from litellm maintained list
apply to all cloud providers, have client cache for 3 days

* docker container bootup warning

* update invalid ENV warning

* rebased with current HEAD

* update newline printing
2025-05-14 11:01:10 -07:00
Timothy Carambat
e1b7f5820c PGvector vector database support (#3788)
* PGVector support for vector db storage

* forgot files

* comments

* dev build

* Add ENV connection and table schema validations for vector table
add .reset call to drop embedding table when changing the AnythingLLM embedder
update instrutions
Add preCheck error reporting in UpdateENV
add timeout to pg connection

* update setup

* update README

* update doc
2025-05-09 12:27:11 -07:00
Timothy Carambat
dd9c2b4af9 TTS auto-speak and STT auto-submit (#3696)
* auto STT submit control

* simplified STT auto and TTS autoplay

* add chatId to piper elements

* change defaults

* add chat customization page for enabling/disabling new features + options on account modal

* add translation placeholders

* show keybind command

* dev build

* Account modal ui prevent page reload + show Tooltip

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-04-28 13:57:03 -07:00
Timothy Carambat
21ffabfb15 Translate main page landing (#3699)
* Translate main page landing

* normalize all languages

* Add a few translations, zh,tw,ja,es,de

* fix issues where translation lang change would not effect constants until full reload instead of on update

* dev

* fix noWorkspaceError key in translation usage
2025-04-22 12:32:51 -07:00
Timothy Carambat
1601eb986c Enable bypass of ip limitations via ENV in collector processing (#3652)
* Enable bypass of ip limitations via ENV in collector startup
resolves #3625
connect #3626

* dev build

* bump dockerx build action

* enable runtime setting config of collector requests

* comments and linting for option passing

* unset

* unset

* update docs link

* linting and docs
2025-04-21 11:10:41 -07:00
Timothy Carambat
713f939ab3 Buildx bump to latest to solve GHA cache deprecation (#3653)
* bump buildx due to GHA cache deprecation

* try arm64 build with new buildx version

* verify new version working for buildx
2025-04-15 14:12:27 -07:00
Sean Hatfield
e76dc0f1ca New chat home page (#3555)
* wip getting started checklist page

* lint

* add new ui skeleton for new home page/checklist

* make legacy home page appearance setting

* dynamic checklist rendering/close checklist

* make home page functional + update cta buttons in ws settings

* lint

* remove unneeded routes

* wip fixing checklist items (create ws and embed doc broken) + news section updates

* lint

* FINALLY fix all functionality & remove hook to simplify logic

* lint

* hide/show options based on user role/mum enabled

* add hover states and redo checklist ui

* remove welcome checklist page

* add validation to task completion

* polish behavior of checklist/fix roles on checklist items

* lint

* light mode/use tailwind color classes

* remove tutorials link

* Modify how legacy page works

* small UI updates

* remove unused paths
cleanup explore features

* revert save button changes

* conditionally render legacy default chat page when in multiuser

* remove role checks in checklist

* remove role checks in quick links

* remove unused hook

* dark mode new home page checklist ui updates

* Add news logging to repo for record keeping
update new module to pull from CDN

* simplify landing markup

* light mode styles

* remove border in light mode from merge conflict

* Update ignores

* slide up dismiss

* prevent checklist popin

* confetti?

* fix url hash on navigate

* watch for event changes for updating checklist

* useMemo and callback memory optimization

* move handlers to constants via params fwd

* dev

* update github text

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-04-09 13:33:25 -07:00
Timothy Carambat
7a01298a8e ModelContextProtocol (MCP) Full Compatibility (#3547)
* WIP MCP full compatibility layer

* implement MCP agent function wrapping and invocation methods

* Add `uvx` to docker bin for MCP executions

* dev build

* prune removed data

* Wrap MCP servers to lazy load items to not block the UI
Mobile bug fixes

* arm64 test build

* reset dev builder

* remove unused prop
2025-03-31 16:15:19 -05:00