[PR #515] [CLOSED] 468 Implement User-Specific Chat Sessions for Workspaces #3378

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/515
Author: @self-programming-bio-robot
Created: 1/3/2024
Status: Closed

Base: masterHead: 468-chat-threads


📝 Commits (6)

  • dbaaa3b added migrations of chat-threads
  • 81c7aa9 Refactored workspace chats to thread chats
  • 0a5922a Added thread to frontend application and fixed bugs of API
  • 9de7d74 Refactored public API
  • ec058f2 Added update thread endpoint and UI
  • 58398a1 Merge branch 'master' into 468-chat-threads

📊 Changes

38 files changed (+1728 additions, -401 deletions)

View changed files

📝 frontend/src/App.jsx (+2 -2)
frontend/src/components/Modals/NewThread.jsx (+124 -0)
📝 frontend/src/components/Modals/NewWorkspace.jsx (+3 -2)
📝 frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx (+191 -58)
📝 frontend/src/components/ThreadChat/ChatContainer/ChatHistory/Citation/index.jsx (+0 -0)
📝 frontend/src/components/ThreadChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (+2 -2)
📝 frontend/src/components/ThreadChat/ChatContainer/ChatHistory/PromptReply/index.jsx (+4 -4)
📝 frontend/src/components/ThreadChat/ChatContainer/ChatHistory/index.jsx (+4 -2)
📝 frontend/src/components/ThreadChat/ChatContainer/PromptInput/index.jsx (+4 -3)
📝 frontend/src/components/ThreadChat/ChatContainer/index.jsx (+7 -4)
📝 frontend/src/components/ThreadChat/LoadingChat/index.jsx (+0 -0)
📝 frontend/src/components/ThreadChat/index.jsx (+4 -4)
📝 frontend/src/models/workspace.js (+37 -6)
📝 frontend/src/pages/GeneralSettings/Chats/ChatRow/index.jsx (+2 -1)
📝 frontend/src/pages/GeneralSettings/Chats/index.jsx (+28 -25)
📝 frontend/src/pages/ThreadChat/index.jsx (+14 -9)
📝 frontend/src/utils/paths.js (+3 -0)
package-lock.json (+32 -0)
📝 server/endpoints/admin.js (+4 -2)
📝 server/endpoints/api/admin/index.js (+3 -3)

...and 18 more files

📄 Description

Hello everyone!
Firstly, I apologize for the extensive size of this pull request. These changes were initially developed for my own purposes.

I'm excited to share this new pull request that introduces a significant enhancement to our workspace functionality. This update is in response to the feature request for allowing users to create, manage, and navigate separate chat sessions within each workspace. Here's what this PR accomplishes:

Key Additions:

  • Database Schema Update: Added a new thread model to our database schema to support separate chat sessions.

  • Data Migration: Developed a migration script that seamlessly integrates existing data into the new schema without any loss of information.

  • API Enhancements: Implemented a set of APIs to handle operations like retrieving, creating, updating, and deleting chat threads.

  • UI Integration: Introduced a new UI block in the sidebar for thread management. This includes functionalities like creating new threads, renaming them. I've made sure to align these changes with the existing chat paths.

Notes for Reviewers:

  • Frontend Implementation: As my expertise primarily lies in backend development, I've done my best with the frontend integration. However, I am not a frontend specialist, so I would greatly appreciate any suggestions or improvements in this area.
  • Adherence to Code Style: I've made an effort to follow the repository's coding style and standards. Please let me know if there are any discrepancies or areas for improvement.

Testing and Feedback:

I've thoroughly tested these changes to ensure functionality and reliability. However, additional testing and feedback are always welcome. If you encounter any issues or have suggestions for further improvement, please feel free to share.

Thank you for taking the time to review this PR. I look forward to your valuable inputs and collaboration in refining this feature.

P.S. Should you decide to migrate to a different provider, such as PostgreSQL, please exercise caution with the migration script. I've crafted a specific block for migrating legacy data. Feel free to copy this block into your migration scripts.


🔄 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/515 **Author:** [@self-programming-bio-robot](https://github.com/self-programming-bio-robot) **Created:** 1/3/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `468-chat-threads` --- ### 📝 Commits (6) - [`dbaaa3b`](https://github.com/Mintplex-Labs/anything-llm/commit/dbaaa3ba3f0d0a69a5648841c3520b7ca75499ef) added migrations of chat-threads - [`81c7aa9`](https://github.com/Mintplex-Labs/anything-llm/commit/81c7aa9101851dc3cb0d082726b764133ae2bd76) Refactored workspace chats to thread chats - [`0a5922a`](https://github.com/Mintplex-Labs/anything-llm/commit/0a5922abd56ff4aa6ac0906008ecc3f0fb7c33fe) Added thread to frontend application and fixed bugs of API - [`9de7d74`](https://github.com/Mintplex-Labs/anything-llm/commit/9de7d7418db1e44a217ac835d17ec5394e9bcf52) Refactored public API - [`ec058f2`](https://github.com/Mintplex-Labs/anything-llm/commit/ec058f2de93aa9b49dd42efebbfc28d5fcfbcdcb) Added update thread endpoint and UI - [`58398a1`](https://github.com/Mintplex-Labs/anything-llm/commit/58398a175dbedcf47d89bff42a940a2a1d0a8e34) Merge branch 'master' into 468-chat-threads ### 📊 Changes **38 files changed** (+1728 additions, -401 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/App.jsx` (+2 -2) ➕ `frontend/src/components/Modals/NewThread.jsx` (+124 -0) 📝 `frontend/src/components/Modals/NewWorkspace.jsx` (+3 -2) 📝 `frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx` (+191 -58) 📝 `frontend/src/components/ThreadChat/ChatContainer/ChatHistory/Citation/index.jsx` (+0 -0) 📝 `frontend/src/components/ThreadChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx` (+2 -2) 📝 `frontend/src/components/ThreadChat/ChatContainer/ChatHistory/PromptReply/index.jsx` (+4 -4) 📝 `frontend/src/components/ThreadChat/ChatContainer/ChatHistory/index.jsx` (+4 -2) 📝 `frontend/src/components/ThreadChat/ChatContainer/PromptInput/index.jsx` (+4 -3) 📝 `frontend/src/components/ThreadChat/ChatContainer/index.jsx` (+7 -4) 📝 `frontend/src/components/ThreadChat/LoadingChat/index.jsx` (+0 -0) 📝 `frontend/src/components/ThreadChat/index.jsx` (+4 -4) 📝 `frontend/src/models/workspace.js` (+37 -6) 📝 `frontend/src/pages/GeneralSettings/Chats/ChatRow/index.jsx` (+2 -1) 📝 `frontend/src/pages/GeneralSettings/Chats/index.jsx` (+28 -25) 📝 `frontend/src/pages/ThreadChat/index.jsx` (+14 -9) 📝 `frontend/src/utils/paths.js` (+3 -0) ➕ `package-lock.json` (+32 -0) 📝 `server/endpoints/admin.js` (+4 -2) 📝 `server/endpoints/api/admin/index.js` (+3 -3) _...and 18 more files_ </details> ### 📄 Description Hello everyone! Firstly, I apologize for the extensive size of this pull request. These changes were initially developed for my own purposes. I'm excited to share this new pull request that introduces a significant enhancement to our workspace functionality. This update is in response to the [feature request](https://github.com/Mintplex-Labs/anything-llm/issues/468) for allowing users to create, manage, and navigate separate chat sessions within each workspace. Here's what this PR accomplishes: # Key Additions: - Database Schema Update: Added a new thread model to our database schema to support separate chat sessions. - Data Migration: Developed a migration script that seamlessly integrates existing data into the new schema without any loss of information. - API Enhancements: Implemented a set of APIs to handle operations like retrieving, creating, updating, and deleting chat threads. - UI Integration: Introduced a new UI block in the sidebar for thread management. This includes functionalities like creating new threads, renaming them. I've made sure to align these changes with the existing chat paths. # Notes for Reviewers: - Frontend Implementation: As my expertise primarily lies in backend development, I've done my best with the frontend integration. However, I am not a frontend specialist, so I would greatly appreciate any suggestions or improvements in this area. - Adherence to Code Style: I've made an effort to follow the repository's coding style and standards. Please let me know if there are any discrepancies or areas for improvement. # Testing and Feedback: I've thoroughly tested these changes to ensure functionality and reliability. However, additional testing and feedback are always welcome. If you encounter any issues or have suggestions for further improvement, please feel free to share. Thank you for taking the time to review this PR. I look forward to your valuable inputs and collaboration in refining this feature. P.S. Should you decide to migrate to a different provider, such as PostgreSQL, please exercise caution with the migration script. I've crafted a specific block for migrating legacy data. Feel free to copy this block into your migration scripts. --- <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:33:39 -05:00
yindo closed this issue 2026-02-22 18:33:39 -05:00
yindo changed title from [PR #515] 468 Implement User-Specific Chat Sessions for Workspaces to [PR #515] [CLOSED] 468 Implement User-Specific Chat Sessions for Workspaces 2026-06-05 15:13:06 -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#3378