Commit Graph

1853 Commits

Author SHA1 Message Date
angelplusultra
10dc3fee7e normalize translations 2026-03-18 12:19:23 -07:00
angelplusultra
61543e80ff comment out max depth limit and add example of recent files requests 2026-03-18 12:07:01 -07:00
angelplusultra
8b4f120697 simplify file search plugin and add comments 2026-03-18 11:11:46 -07:00
Marcello Fitton
146e740328 implement result pattern 2026-03-17 15:36:43 -07:00
Marcello Fitton
33fa168854 simplify logic 2026-03-17 15:34:25 -07:00
Marcello Fitton
135758616a migrate native file searching to ripgrep 2026-03-17 15:22:14 -07:00
angelplusultra
f4682cca0c initialize file search tool 2026-03-17 12:51:02 -07:00
Timothy Carambat
7908c10379 add user id to chat feedback
update JSDOC on middleware for typedef
GHSA-2qmm-82f7-8qj5
2026-03-13 16:51:02 -07:00
Timothy Carambat
f2030343d7 Fix potential IDOR vulnerability in workspace parsed files endpoints
Add ownership validation to prevent users from deleting or embedding
parsed files that don't belong to them. Previously, the delete and
embed endpoints only validated authentication but not resource ownership,
allowing users to delete attached files for users within workspaces they are also a member of.

Changes:
- Delete endpoint now filters by userId and workspaceId
- Embed endpoint validates file belongs to user and workspace (redundant)
- delete() returns false when no matching records found (returns 403)
- Added JSDoc comments for clarity
GHSA-p5rf-8p88-979c
2026-03-13 15:22:07 -07:00
Timothy Carambat
6b2ed8ec12 Remove WelcomeMessages from app - no longer used (#5206)
* remove `WelcomeMessages` from app - no longer user

* update erronous alert message

* fix job collision ref

* fix jobs - remove dev job
2026-03-13 12:55:59 -07:00
Timothy Carambat
6a492f038d Fix potential Zip Slip path traversal in community plugin import
Validate all ZIP entries before extraction in importCommunityItemFromUrl()
to prevent path traversal attacks (CWE-22). Malicious ZIP entries with
paths like "../../" could write files outside the intended plugin folder.

Requires admin privileges and explicit opt-in to unverified hub downloads.
GHSA-rh66-4w74-cf4m
2026-03-13 10:18:20 -07:00
Timothy Carambat
a207449095 Enforce user suspension check on browser extension API key path
Previously, suspended users could continue using browser extension
endpoints if they had created an API key before suspension. The normal
JWT session path blocked suspended users, but the browser extension
middleware did not.

Changes:
- Add suspension and user existence checks to validBrowserExtensionApiKey
- Delete browser extension API keys when a user is deleted
- Add deleteAllForUser method to BrowserExtensionApiKey model
GHSA-7754-8jcc-2rg3
2026-03-13 10:05:05 -07:00
Timothy Carambat
732eac6fa8 Align Manager API access with frontend access
GHSA-wfq3-65gm-3g2p
2026-03-13 09:46:37 -07:00
Timothy Carambat
e7ebeb47fc Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-03-12 21:57:06 -07:00
Timothy Carambat
334ce052f0 Fix SQL injection in SQL Agent plugin via parameterized queries
Replace string concatenation with parameterized queries in all database
connectors to prevent SQL injection through LLM-generated table names.

Changes:
- PostgreSQL: Use $1, $2 placeholders with pg client parameterization
- MySQL: Use ? placeholders with mysql2 execute() prepared statements
- MSSQL: Use @p0 placeholders with request.input() parameterization
- Update handlers to support parameterized query objects
- Add formatQueryForDisplay() for logging parameterized queries

Security: Mitigates potential SQL injection when LLM passes unsanitized
user input as table_name parameter to getTableSchemaSql/getTablesSql.
GHSA-jwjx-mw2p-5wc7
2026-03-12 21:56:57 -07:00
Timothy Carambat
dd7b11a43c Add FileRow Indentation on Documents Picker (#5201) 2026-03-12 20:59:45 -07:00
Timothy Carambat
9e2d144dc8 sanitize promptReply Output 2026-03-12 20:51:05 -07:00
Timothy Carambat
c76576a9da Report citations for Agent call stacks (#5199) 2026-03-12 14:49:44 -07:00
Timothy Carambat
15a84d5121 Support Agent stream metric reporting (#5197) 2026-03-12 12:50:02 -07:00
Timothy Carambat
f1439d7fcb Improve build times for tests and lint (#5193)
* test build skip

* reset file
2026-03-11 12:18:29 -07:00
Timothy Carambat
6713c80f31 fix schema not persisting in DB connector 2026-03-11 11:43:38 -07:00
Timothy Carambat
7dd7d57a8f lint 2026-03-11 11:21:10 -07:00
Timothy Carambat
b531ab4895 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-03-11 11:20:45 -07:00
Peter Dave Hello
71ccf90ab0 Improve zh_TW Traditional Chinese locale (#5187) 2026-03-11 09:02:57 -07:00
Peter Dave Hello
2be79222ab Improve zh_TW Traditional Chinese locale 2026-03-11 23:08:01 +08:00
Timothy Carambat
31ffe941d8 patch slashcommand popup to be usePortal 2026-03-10 17:47:57 -07:00
Timothy Carambat
21ac874cfa Implement v2 chat layout designs (#5074)
* New chat history layout with chat bubbles (#4985)

* new chat history layout, remove message alignment setting

* remove orphaned chat alignment hook and MessageDirection

* remove workspace profile picture setting and fetch

* clean up unnecessary changes

* add light mode colors to chat ui and main page backgrounds

* update chat message and action icon colors for light mode

* update thinking and agent ui, layout, sizing

* update user message uploaded images ui

* update thought, agent containers to use new colors

* add truncatable content with gradient to user chat messages

* fix citations margin

* implement new edit message UI with save and submit actions

* add translations for TruncatableContent subcomponent

* remove unused props

* fix text colors for default mode chats, agent, thoughts container

* Normalize translations for new chat history layout (#5022)

* normalize translations

* update translations with DMR

* lint

* fix mismatched home container colors

* fix: add password character validation to onboarding single-user setup (#5037)

* fix single user mode password bug

* share const

---------

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

* Native Tool calling (#5071)

* checkpoint

* test MCP and flows

* add native tool call detection back to LMStudio

* add native tool call loops for Ollama

* Add ablity detection to DMR (regex parse)

* bedrock and generic openai with ENV flag

* deepseek native tool calling

* localAI native function

* groq support

* linting, add litellm and OR native tool calling via flag

* fix: resolve Gemini agent 400 error on tool call responses (#5054)

* add gtc__ prefix to tool call names in Gemini agent message formatting

* resolve Gemini agent 400 error on tool call responses

* add comments explaining geminis thought signatures

---------

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

* fix: prevent CMD/CTRL+Arrow scroll from overriding textarea cursor movement (#5053)

prevent CMD/CTRL+Arrow scroll from overriding textarea cursor movement

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

* linting, assistant speaker spacing and order, copy/edit order

---------

Co-authored-by: Marcello Fitton <106866560+angelplusultra@users.noreply.github.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* Implement new citations UI (#5038)

* new chat history layout, remove message alignment setting

* remove orphaned chat alignment hook and MessageDirection

* remove workspace profile picture setting and fetch

* clean up unnecessary changes

* add light mode colors to chat ui and main page backgrounds

* update chat message and action icon colors for light mode

* update thinking and agent ui, layout, sizing

* update user message uploaded images ui

* update thought, agent containers to use new colors

* add truncatable content with gradient to user chat messages

* fix citations margin

* implement new edit message UI with save and submit actions

* add translations for TruncatableContent subcomponent

* remove unused props

* fix text colors for default mode chats, agent, thoughts container

* Normalize translations for new chat history layout (#5022)

* normalize translations

* update translations with DMR

* lint

* fix mismatched home container colors

* implement new citations ui with sources sidebar

* bottom sheet for mobile citations

* convert mobile citations bottom sheet to new modal design

* add score, border separators for mobile citations modal

* push down sources sidebar in password/multiuser mode

* fix animation gap, simplify sources sidebar by splitting state to persist data on animation

* add english translations

* fix spacing from citations sidebar when user has auth

* Normalize translations for new citation UI (#5087)

* normalize translations

* update translations using DMR

* fix pluralize to use i18n native solution
change reset to immediate clear
fix spacing for TTS when showing or not to not have space

* proper pluralize

* hide metrics on mobile, fix last message padding on mobile

---------

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

* New prompt input ui/tools menu (#5070)

* wip new prompt input ui/tools menu

* fix colors for prompt input

* redesign workspace llm selector, extract text size + model picker to components

* refactor ToolsMenu component

* fix colors/refactor WorkspaceModelPicker

* fix spacing in ws model picker, change order of tools menu tabs

* fix slash commands showing /reset instead of /exit during active agent session

* refactor ToolsMenu to be much simpler

* cleanup, fix behavior of setupup provider in WorkspaceModelPicker

* simplify AgentSkillsTab toggle logic

* add english translations for new components

* remove legacy slash command/agent popups, add ToolsMenu keyboard nav

* fix spacing of workspace model picker text

* fix SourcesSidebar and TextSizeMenu positioning after merge

* fix keyboard nav in ToolsMenu when clicking on tools button to open

* typo

* only auto pop up tools menu when prompt input is empty with /

* fix z index for tools menu on citation

* fix behavior of / in prompt input

* move global window agent session state to module level variable

* fix prompt input not clearing on /reset

* missing translations

* revert translating slash command

* fix STT auto-submit not working on home page

* Normalize translations for new prompt input/tools menu UI (#5130)

* normalize translations

* update translations using DMR script

* normalize translations

* update translations using DMR script

* remove slash_exit

* fix skills.js import after merge

* fix tooltip z-index rendering behind citations

* patch translation prune script to not remove special cases

* updates to tools input

* factory translations

* use safeJsonParse in clearPromptInputDraft

* normalize translations

* disable agent skill toggles during active agent sessions + show tooltip on disabled

* normalize translations

* handle enter key behavior when tools menu is open

* fix unfocusable modal for slash command edit/new

* fix sending prompt when editing/creating slash commands

* hide/show agent skills in tools menu based on role

* container borders for dark/light mode compliance to designs

---------

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

* update how tooltip works for agent menu

* update prompt input to show agent button with CTA in agent panel for user clarify
update agent session start prompt button in input

* translations

* translations + move regex for slash commands to constants

* fix open sidebar ux

* fix tools menu to always open to slash commands, dismiss auto pop up

* fix sidebar open/close button overlapping with ws model picker

---------

Co-authored-by: Sean Hatfield <seanhatfield5@gmail.com>
Co-authored-by: Marcello Fitton <106866560+angelplusultra@users.noreply.github.com>
2026-03-10 12:50:19 -07:00
Timothy Carambat
868358597e Remove use_mlock from Ollama to solve WARN logs in ollama 0.17
resolves #5182
2026-03-10 09:08:05 -07:00
Timothy Carambat
8e795b73e0 add ToS for brevity 2026-03-09 15:45:22 -07:00
Timothy Carambat
ffb0cc5cad Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-03-09 14:34:15 -07:00
Timothy Carambat
e8ffe50760 patch plural keys 2026-03-09 14:34:08 -07:00
Marcello Fitton
456738bbda chore: add ESLint CI workflow (#5160)
add lint CI GitHub Action
2026-03-09 14:27:08 -07:00
Marcello Fitton
a50d410dc2 chore: add script to detect and prune unused translation keys (#5141)
* add script to prune dead translation keys

* add support for dynamic translation keys

* improve performance of script

* fix dynamic t() detection and add keyboard shortcut keys to allowlist

* rename scripts

* change commands

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-09 12:02:16 -07:00
Timothy Carambat
4e3bcfc616 Add custom fetch to embedder for Ollama (#5180)
Refactor ollama timeout to be shared. Add custom fetch to embedder for ollama as well
2026-03-09 11:47:00 -07:00
Timothy Carambat
dc0bdf112b linting & show descriptive error for bad addtoWorkspace request body
resolves #5172
2026-03-09 11:30:53 -07:00
Timothy Carambat
bc58939843 Strip thinking from copy message outputs (#5179) 2026-03-09 11:10:17 -07:00
Maxwell Calkin
563f95167d fix: add missing /wiki to Confluence cloud citation URLs (#5167)
fix: add /wiki to Confluence cloud page URLs in citations
2026-03-09 10:24:56 -07:00
Marcello Fitton
113df6d013 feat: Add tooltip for paperclip attach button when no files are parsed (#5139)
* fix broken tooltip

* fix tooltip not showing on homepage

* fix tooltip rendering behind input on homepage

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2026-03-06 21:58:25 -08:00
Ryan
179a823ab1 Fix: Azure OpenAI model key collision (#5092)
* fix: Migrate AzureOpenAI model key from OPEN_MODEL_PREF to prevent the naming collision. No effort necessary from current users.

* test: add backwards compat tests for AzureOpenAI model key migration

* patch missing env example file

* linting

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 17:12:08 -08:00
Marcello Fitton
4a4378ed99 chore: add ESLint to /server (#5126)
* add eslint config to server

* add break statements to switch case

* add support for browser globals and turn off empty catch blocks

* disable lines with useless try/catch wrappers

* format

* fix no-undef errors

* disbale lines violating no-unsafe-finally

* ignore syncStaticLists.mjs

* use proper null check for creatorId instead of unreachable nullish coalescing

* remove unneeded typescript eslint comment

* make no-unused-private-class-members a warning

* disable line for no-empty-objects

* add new lint script

* fix no-unused-vars violations

* make no-unsued-vars an error

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 16:32:45 -08:00
Marcello Fitton
8f33203ade chore: add ESLint to /collector (#5128)
* add eslint config to /collector

* prettier formatting

* fix unused

* fix undefined

* disable lines

* lockfile

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 16:25:23 -08:00
Marcello Fitton
29950f08bb refactor: refactor agent skills settings page to use i18n translation keys (#5146)
* refactor agent skills to read from translation keys instead of hardcoded strings

* add missing sql agent description key

* Remove fallbacks

* adjust translation

* swap to factor pattern

* normalize translations (#5147)

* normalize translations

* run translator job

* translations

---------

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

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 16:17:00 -08:00
Timothy Carambat
1d8c488e97 Remove Google web-search Programmable SERP (#5156) 2026-03-05 14:49:32 -08:00
Timothy Carambat
f833c34045 Use ALLM_RW_PACKAGES for package cleanup 2026-03-05 12:41:28 -08:00
Timothy Carambat
fcda41bfc5 Debug cleanup workflow 2026-03-05 12:29:41 -08:00
Timothy Carambat
8c42d1081e Debug cleanup workflow 2026-03-05 12:29:26 -08:00
Timothy Carambat
2139c9c583 Debug cleanup workflow 2026-03-05 12:27:38 -08:00
Timothy Carambat
ef23734ff2 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-03-05 12:26:26 -08:00
Timothy Carambat
12f861b87a Sidebar updates (#5154)
* fix sidebar and add translations to sidebar

* add translations
2026-03-05 10:34:38 -08:00
Timothy Carambat
8dfe9613bf add translations 2026-03-05 10:32:59 -08:00