[PR #3514] [MERGED] Enable slash commands in dev API chat/stream-chat #4310

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3514
Author: @shatfield4
Created: 3/21/2025
Status: Merged
Merged: 3/24/2025
Merged by: @timothycarambat

Base: masterHead: fix-slash-commands-in-dev-api-chat


📝 Commits (5)

  • 8e76968 enable slash commands in dev api
  • 82a255f lint
  • 50ad722 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into fix-slash-commands-in-dev-api-chat
  • 6b97954 Remove ability to use default slash commands in API request
  • 31e048d update grep function comment

📊 Changes

6 files changed (+149 additions, -15 deletions)

View changed files

📝 server/endpoints/api/workspace/index.js (+11 -5)
📝 server/endpoints/api/workspaceThread/index.js (+11 -5)
📝 server/models/workspaceChats.js (+28 -0)
📝 server/swagger/openapi.json (+8 -4)
📝 server/utils/chats/apiChatHandler.js (+68 -1)
📝 server/utils/chats/index.js (+23 -0)

📄 Description

Pull Request Type

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

Relevant Issues

resolves #3513

What is in this change?

  • Allows recursive expansion of any slash commands in the developer API endpoints (chat/stream-chat). Default commands like /reset are not supported.

  • Added reset param to API chat/stream endpoints for workspace/thread that can reset chat history of a specific request. This parameter will return early if the message property is empty and reset is true.

Additional Information

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/3514 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 3/21/2025 **Status:** ✅ Merged **Merged:** 3/24/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `fix-slash-commands-in-dev-api-chat` --- ### 📝 Commits (5) - [`8e76968`](https://github.com/Mintplex-Labs/anything-llm/commit/8e76968e3d24f365b242d71a08ae923d576cb36f) enable slash commands in dev api - [`82a255f`](https://github.com/Mintplex-Labs/anything-llm/commit/82a255f89af444650c7e3addaade8f73d8b97aba) lint - [`50ad722`](https://github.com/Mintplex-Labs/anything-llm/commit/50ad722a4615f34091133f4c2614242420bc1d79) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into fix-slash-commands-in-dev-api-chat - [`6b97954`](https://github.com/Mintplex-Labs/anything-llm/commit/6b97954e208279dccf036ee763f26edc0700eba6) Remove ability to use default slash commands in API request - [`31e048d`](https://github.com/Mintplex-Labs/anything-llm/commit/31e048d81342ff45ed16f3056b6064d57aa66fac) update grep function comment ### 📊 Changes **6 files changed** (+149 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `server/endpoints/api/workspace/index.js` (+11 -5) 📝 `server/endpoints/api/workspaceThread/index.js` (+11 -5) 📝 `server/models/workspaceChats.js` (+28 -0) 📝 `server/swagger/openapi.json` (+8 -4) 📝 `server/utils/chats/apiChatHandler.js` (+68 -1) 📝 `server/utils/chats/index.js` (+23 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #3513 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> - Allows recursive expansion of any slash commands in the developer API endpoints (chat/stream-chat). Default commands like `/reset` are not supported. - Added `reset` param to API chat/stream endpoints for workspace/thread that can reset chat history of a specific request. This parameter will return early if the `message` property is empty and `reset` is true. ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### 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:35:34 -05:00
yindo closed this issue 2026-02-22 18:35:34 -05:00
yindo changed title from [PR #3514] Enable slash commands in dev API chat/stream-chat to [PR #3514] [MERGED] Enable slash commands in dev API chat/stream-chat 2026-06-05 15:17:54 -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#4310