Commit Graph

829 Commits

Author SHA1 Message Date
Sean Hatfield
c0c3ee6cfd
Refactor frontend legacy JSON.parse with safeJsonParse (#4759)
* replace all frontend legacy JSON.parse with safeJsonParse

* default collapsed sidebar menu on failed parse

* remove extra check on conditional render

* undo singular json parse

* add guard clause and return null for `userFromStorage`

* patch domainList

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-11 16:11:38 -08:00
Timothy Carambat
25a72f7175 Revert commit 8e0186f9ac - broken auth 2025-12-11 14:22:16 -08:00
Marcello Fitton
a7da757c84
Migrate Azure OpenAI Integration To v1 API | Enable Streaming for Reasoning Models in Azure OpenAI Basic Inference Provider (#4744)
* Refactor Azure OpenAI integration to use OpenAI SDK and the v1 API | Enable streaming for Azure Open AI basic inference provider

* Add info tooltip to inform user about 'Model Type' form field

* Add 'model_type_tooltip' key to multiple language translations

* Validate AZURE_OPENAI_ENDPOINT in provider construction

* remove unused import, update error handler, rescope URL utils

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-10 18:56:55 -08:00
Marcello Fitton
8e0186f9ac
Fix stale user permissions in UI by refreshing user data on app load (#4751)
* 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

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-10 12:40:34 -08:00
Sean Hatfield
f8c6bbdd97
Refactor WorkspaceFileRow component (#4740)
* remove event listeners + useState on WorkspaceFileRow

* reduce complexity for render

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-09 16:57:58 -08:00
Timothy Carambat
ae2e3509f0 fix small typo on onboarding workspace page
fix .hash nav for mobile connection
2025-12-02 15:33:23 -08:00
Colin Perry
00e18887a8
fixed empty scroll track in citations dropdown (#4685)
* fixed empty scroll track

* use overflow-x-none instead of overflow-x-auto for citation list

* keep behaviour of x scroll, but hide scrollbar since it can be overflowing for no reason

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-02 15:29:16 -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
Marcello Fitton
8ffb7eb6e9
Store Chat Prompt Input Value in Local Storage (#4680)
* Add logic to save prompt input state to local storage and use as initial state on mount

* Synchronize prompt input state with parent component on mount

* lint

* Clear USER_PROMPT_INPUT_VALUE local storage value in all instances of auth clearing

* Remove USER_PROMPT_INPUT_VALUE local storage `removeItem` logic from excessive sources

* Refactor logic to cache prompt input value state by thread | abstract into a custom hook | rename localStorage key variables for clarity.

* Remove console log statement from usePromptInputStorage hook to clean up code.

* Update comments in usePromptInputStorage hook for clarity on localStorage handling

* Implement debounced localStorage updates in usePromptInputStorage hook to improve performance and prevent writing on every keystroke.

* Refactor localStorage handling in usePromptInputStorage hook to utilize safeJsonParse | Remove uneeeded comments

* Remove useEffect cleanup comment

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-02 13:45:26 -08:00
bynome
df493d5413
docs(i18n): Complete French translations (#4697)
* docs(i18n): Complete French translations

Complete all missing French translations for AnythingLLM UI

* linting

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-02 13:41:00 -08:00
Leo Wang
d7487e217d
docs(zh-TW): correct traditional Chinese translations in home section (#4702) 2025-12-02 08:51:38 -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
Neha Prasad
3ecf218eea
feat: Add SSL certificate bypass support for self-hosted Confluence instances (#4219)
* Added bypassSSL parameter to constructor and implemented SSL bypass logic in fetchConfluenceData method

* Updated generateChunkSource function to include bypassSSL in the encrypted payload

* Updated the request body to include bypassSSL in the JSON payload sent to the backend

* Updated form submission to include bypassSSL parameter from the checkbox

* Added bypass_ssl: "Bypass SSL Certificate Validation" translation

* passed these parameters to fetchconfluencepage function for proper resync functionality

* allow ignore of SSL cert for Confluence

* add translations

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-25 14:32:10 -08:00
方程
90e474abcb
Support Gitee AI(LLM Provider) (#3361)
* Support Gitee AI(LLM Provider)

* refactor(server): 重构 GiteeAI 模型窗口限制功能,暂时将窗口限制硬编码,计划使用外部 API 数据和缓存

* updates for Gitee AI

* use legacy lookup since gitee does not enable getting token context windows

* add more missing records

* reorder imports

---------

Co-authored-by: 方程 <fangcheng@oschina.cn>
Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-25 14:19:32 -08:00
Sean Hatfield
66e44f65b4
Add batch embedding support for Ollama embedding provider (#4553)
* add batch embedding support for ollama embedding provider

* lint

* simplify ollama embedder input
2025-11-25 13:03:47 -08:00
timothycarambat
6a72ac2240 add placeholder manifest.json when unknown or in development 2025-11-25 11:23:23 -08:00
Colin Perry
157e3e4b38
Feat/add openrouter embedding models (#4682)
* implemented openrouter embedding model support

* ran yarn lint

* data handling entry

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-25 11:16:16 -08:00
Colin Perry
3ffa321410
fixed typos in General Settings: settings/embedding-preferences (#4683)
fixed typos
2025-11-25 10:00:00 -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
timothycarambat
1e2d4ff51a fix overflow on tooltip causing bad placement
resolves #4647
2025-11-20 17:50:19 -08:00
Sean Hatfield
c913a2d68c
Prompt caching for Anthropic LLM and Agent providers (#4488)
* prompt caching for anthropic llm and agent providers

* add UI for control of ENV
simplify implementation

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 17:17:03 -08:00
Sean Hatfield
49c29fb968
Z.ai LLM & agent provider (#4573)
* wip zai llm provider

* cleanup + add zai agent provider

* lint

* change how caching works for failed models

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 15:57:03 -08:00
Chetan Sarva
c169193fc4
feature: Support for AWS Bedrock API Keys (#4651)
* feat: add AWS Bedrock API Key option to settings panel

* feat: Bedrock API key auth method

* fix: hide IAM note when using bedrock api key

* move to camcelCase identifier for bedrock api key use
linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-20 15:38:45 -08:00
Alex Barron
2eb5384e27
Add SerpApi web search (#4623)
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 15:12:15 -08:00
Sean Hatfield
05df4ac72b
Paperless ngx data connector (#4121)
* paperless ngx data connector

* wip resync paperless ngx

* fix generateChunkSource for resyncing paperless ngx

* lint

* Refactor Paperless-NGX connector
Fix issue with date rendering in tooltip + extended width
Move tooltip details to be column for more space

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 11:27:38 -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
Timothy Carambat
e892c9b9b8
add svelte rendering to markdown renderer (#4663)
* add `svelte` rendering to markdown renderer
resolves #4586
closes #4588

* linting
2025-11-19 14:09:24 -08:00
Timothy Carambat
22c619586b
Failover invalid vector db identifier to lanceDB (#4661)
resolves #4640
closes #4626
2025-11-19 13:36:19 -08:00
Sean Hatfield
151f97da9a
Patch agent thoughts UI bug (#4549)
patch agent ui bug where text would show up in agent thoughts

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-15 15:55:54 -07:00
Marcello Fitton
8c97240fed
Refactor DefaultChatContainer To Display A Simple Welcome Message (#4542)
* Refactor DefaultChat component to display a simple welcome message instead of mock chat interface onboarding text

* Add last visited workspace functionality

- Implemented localStorage management for the last visited workspace in DefaultChat and WorkspaceChat components.
- Updated UserButton to clear last visited workspace on logout.
- Refactored workspace navigation to prioritize last visited workspace if available.

* Refactor workspace fetching & last visited workspace logic into one useEffect

* Enhance loading state in DefaultChat component with skeleton UI elements for improved user experience

* minor UI spacing changes

* refactor order for guard clauses for early exit conditions

* move last known to end of getWorkspace loader

* languages for PR #4542 (#4550)

* languages for PR #4542

* Drop welcome message keys from translations

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-10-15 15:25:53 -07:00
Timothy Carambat
be82f91fc3
Enable keyboard nav of slash commands with arrow keys on mount (#4543) 2025-10-15 10:45:14 -07:00
Sean Hatfield
797920a25f
Enable Microsoft Foundry Local for workspace agent provider (#4539)
enable microsoft foundry local for ws agent provider
2025-10-15 10:02:14 -07:00
Timothy Carambat
4e6f0b33ab
fix label for chunk length setting (#4515) 2025-10-08 13:08:15 -07:00
Guruprasath Sankaran
0c07e040bd
refactor: change naming - contextwarpper to authprovider #4510 (#4511)
refactor: change naming - contextwarpper to authprovider

Co-authored-by: GuruF <guruprasath@aidaptive.com>
2025-10-08 12:55:09 -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
timothycarambat
f6f566792d Update changes to layout rendering for Experimental features 2025-10-06 13:50:21 -07:00
Timothy Carambat
c2e7ccc00f
Reimplement Cohere models for basic chat (#4489)
* Reimplement Cohere models
- Redo LLM implementation to grab models from endpoint and pre-filter
- Migrate embedding models to also grab from remote
- Add records for easy context window lookup'

* fix comment
2025-10-03 18:28:20 -07:00
Timothy Carambat
87c666466f
Render html optional (#4478)
* allow user to render HTML in chat responses
resolves #4476

* add file

* Add translation for all non-en
2025-10-02 13:52:07 -07:00
Timothy Carambat
8cdadd8cb3
Sync models from remote for FireworksAI (#4475)
resolves #4474
2025-10-02 12:34:05 -07:00
Sean Hatfield
0b18ac6577
Model context limit auto-detection for LM Studio and Ollama LLM Providers (#4468)
* auto model context limit detection for ollama llm provider

* auto model context limit detection for lmstudio llm provider

* Patch Ollama to function and sync context windows like Foundry

* normalize how model context windows are cached from endpoint service
todo: move this into global utility class with MODEL_MAP
eager load models on boot to pre-cache them
add performance model improvements into ollama agent as well as apply n_ctx

* remove debug log

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-02 11:54:19 -07:00
Sean Hatfield
599a3fd8b8
Microsoft Foundry Local LLM provider & agent provider (#4435)
* add microsoft foundry local llm and agent providers

* minor change to fix early stop token + overloading of context window
always use user defined window _unless_ it is larger than the models real contenxt window
cache the context windows when we can from the API (0.7.*)+
Unload model forcefully on model change to prevent resource hogging

* add back token preference since some models have very large windows and can crash a machine
normalize cases

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-01 20:04:13 -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
Vansh
d24f9c3414
fix(uiux): correct typo in System Prompt description text (#4461)
* fix(uiux): correct typo in System Prompt description text

* translate

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-10-01 09:26:52 -07:00
Timothy Carambat
be7e2b6bc6
Apply renderer from chat widget history to workspace chats (#4456)
Apply renderer from chat widget history to workspace chats #4455
resolves #4455
Fixes bug with codeblocks since hljs import was missing
2025-09-30 14:48:41 -07:00
Marcello Fitton
96bf127696
New Default System Prompt Variables (User ID, Workspace ID, & Workspace Name) (#4414)
* Fix system prompt variable color logic by removing unused variable type from switch statement and adding new types.

* Add workspace id, name and user id as default system prompt variables

* Combine user and workspace  variable evaluations into a single if statment, reducing redundant code.

* minor refactor

* add systemPromptVariable expandSystemPromptVariables test cases

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-09-29 14:32:56 -07:00
Neha Prasad
473ff9068a
fix: resolve Firefox search icon overlapping placeholder text (#4390)
* fix: resolve Firefox search icon overlapping placeholder text

- Increase input left padding from pl-4 to pl-9 to provide clearance
- Remove redundant placeholder:pl-4 class
- Ensures 24px spacing between search icon and text content

* Update SearchBox component to adjust padding on focus state

---------

Co-authored-by: neha <neha@posthog.com>
Co-authored-by: angelplusultra <macfittondev@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-25 15:27:37 -10:00
Spencer Bull
3cb54fdb9c
[BUGFIX] Update Dell Pro AI Studio Default URL (#4433)
Update DPAISOptions component and constants to use new OpenAI endpoint (#4432)

- Changed placeholder in DPAISOptions component to reflect updated endpoint.
- Updated DPAIS_COMMON_URLS in constants to include '/openai' in URLs.
2025-09-25 13:47:18 -10:00
Timothy Carambat
9466f67162
Update the timeout value on all stream-timeout providers: (#4412)
- OpenRouter
- Novita
- CometAPI
updated to 3,000ms default with 500ms min
2025-09-19 08:52:20 -07:00
Máté Kristóf
01a3cc92d0
Enhanced Chat Embed History View (#4281)
* Enhanced Chat Embed History View

* Robust Markdown Rendering
Improved "Thinking" View

* feat: Improve markdown rendering in chat embed history

* update ui for show/hide thoughts in embed chat history

* refactor -always show thoughts if available

* patch unused imports and use safeJsonParse

* update fallback for loading state to always reset

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-09-17 21:14:18 -07:00
Timothy Carambat
cd063af4d1
Add support for SIMPLE_SSO_NO_LOGIN_REDIRECT config setting (#4394)
* Add support for `SIMPLE_SSO_NO_LOGIN_REDIRECT` config setting

* reset changes on simple page

* redirect at root

* remove paths change
2025-09-17 12:51:00 -07:00