[PR #5516] [MERGED] Fix double /reset in agent mode #5466

Closed
opened 2026-06-05 15:21:27 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5516
Author: @shatfield4
Created: 4/24/2026
Status: Merged
Merged: 4/28/2026
Merged by: @timothycarambat

Base: masterHead: 5487-feat-fix-double-reset-in-agent-mode


📝 Commits (2)

  • 3a362d7 fix double /reset in agent mode
  • e616151 Merge branch 'master' into 5487-feat-fix-double-reset-in-agent-mode

📊 Changes

3 files changed (+62 additions, -53 deletions)

View changed files

📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/ToolsMenu/Tabs/SlashCommands/index.jsx (+27 -38)
📝 frontend/src/components/WorkspaceChat/ChatContainer/index.jsx (+28 -15)
📝 server/utils/agents/aibitat/plugins/chat-history.js (+7 -0)

📄 Description

Pull Request Type

  • feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #5487

Description

  • /reset in an active agent session now ends the agent and clears the chat in a single action (previously required two /resets)
  • Handles edge case where in-flight responses would reappear after /reset once backend finished responding to message
  • Simplified slash command menu to only show /reset (removed /exit from this menu since we now default all chats to agent mode but is still available to use for power users. Agent thinking block on startup still tells user to use /exit to exit agent session)

Visuals (if applicable)

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • 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/5516 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 4/24/2026 **Status:** ✅ Merged **Merged:** 4/28/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `5487-feat-fix-double-reset-in-agent-mode` --- ### 📝 Commits (2) - [`3a362d7`](https://github.com/Mintplex-Labs/anything-llm/commit/3a362d70393504b7f8f5d79b8f5638e6b3952d49) fix double /reset in agent mode - [`e616151`](https://github.com/Mintplex-Labs/anything-llm/commit/e616151f19e758dfaed0c250903c7e56f5ec7982) Merge branch 'master' into 5487-feat-fix-double-reset-in-agent-mode ### 📊 Changes **3 files changed** (+62 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/ToolsMenu/Tabs/SlashCommands/index.jsx` (+27 -38) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/index.jsx` (+28 -15) 📝 `server/utils/agents/aibitat/plugins/chat-history.js` (+7 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat (New feature) - [x] 🐛 fix (Bug fix) - [ ] ♻️ refactor (Code refactoring without changing behavior) - [ ] 💄 style (UI style changes) - [ ] 🔨 chore (Build, CI, maintenance) - [ ] 📝 docs (Documentation updates) ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #5487 ### Description <!-- Describe the changes in this PR that are impactful to the repo. What problem does it solve? --> - `/reset` in an active agent session now ends the agent and clears the chat in a single action (previously required two `/resets`) - Handles edge case where in-flight responses would reappear after `/reset` once backend finished responding to message - Simplified slash command menu to only show `/reset` (removed `/exit` from this menu since we now default all chats to agent mode but is still available to use for power users. Agent thinking block on startup still tells user to use `/exit` to exit agent session) ### Visuals (if applicable) <!-- Add screenshots or screen recordings to demonstrate the changes, especially for UI updates. --> ### 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 (if applicable) - [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-06-05 15:21:27 -04:00
yindo closed this issue 2026-06-05 15:21:27 -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#5466