[PR #2245] [MERGED] match user prompts exactly not partially #3933

Closed
opened 2026-02-22 18:34:47 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2245
Author: @MrSimonC
Created: 9/8/2024
Status: Merged
Merged: 9/9/2024
Merged by: @timothycarambat

Base: masterHead: bug/improve-using-multiple-user-prompts


📝 Commits (1)

  • d3b7360 match user prompts exactly not partially

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 server/utils/chats/index.js (+4 -1)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #2244

What is in this change?

This pull request introduces an update to the preset matching logic in Anything LLM. The changes ensure that the system accurately matches user-defined presets by applying stricter criteria. The new regex checks for either the start or end of a string, or a word boundary/whitespace, preventing incorrect matches of substrings.

Additional Information

Testing for the new regex implementation can be found here: Regex Testing. This update addresses the issue of incorrect matching between similar presets, enhancing the overall functionality and user experience.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/2245 **Author:** [@MrSimonC](https://github.com/MrSimonC) **Created:** 9/8/2024 **Status:** ✅ Merged **Merged:** 9/9/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `bug/improve-using-multiple-user-prompts` --- ### 📝 Commits (1) - [`d3b7360`](https://github.com/Mintplex-Labs/anything-llm/commit/d3b736084fb62dfb3b1df57a300c70dd658be764) match user prompts exactly not partially ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/chats/index.js` (+4 -1) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues resolves #2244 ### What is in this change? This pull request introduces an update to the preset matching logic in Anything LLM. The changes ensure that the system accurately matches user-defined presets by applying stricter criteria. The new regex checks for either the start or end of a string, or a word boundary/whitespace, preventing incorrect matches of substrings. ### Additional Information Testing for the new regex implementation can be found here: [Regex Testing](https://regex101.com/r/lVusju/1). This update addresses the issue of incorrect matching between similar presets, enhancing the overall functionality and user experience. ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:47 -05:00
yindo closed this issue 2026-02-22 18:34:48 -05:00
yindo changed title from [PR #2245] match user prompts exactly not partially to [PR #2245] [MERGED] match user prompts exactly not partially 2026-06-05 15:15:57 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3933