[PR #699] [MERGED] Implement workspace threading that is backwards compatible #3464

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

📋 Pull Request Information

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

Base: masterHead: workspace-threads


📝 Commits (3)

  • ce6ddd6 Implement workspace thread that is compatible with legacy versions
  • 82e8d0b last touches
  • 2ee164e comment on chat qty enforcement

📊 Changes

21 files changed (+1087 additions, -83 deletions)

View changed files

📝 frontend/src/App.jsx (+4 -0)
frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx (+189 -0)
frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx (+90 -0)
📝 frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx (+51 -45)
📝 frontend/src/components/WorkspaceChat/ChatContainer/index.jsx (+35 -14)
📝 frontend/src/components/WorkspaceChat/index.jsx (+5 -1)
📝 frontend/src/models/workspace.js (+2 -0)
frontend/src/models/workspaceThread.js (+146 -0)
📝 frontend/src/pages/WorkspaceChat/index.jsx (+5 -1)
📝 frontend/src/utils/paths.js (+3 -0)
📝 server/endpoints/chat.js (+114 -0)
server/endpoints/workspaceThreads.js (+150 -0)
📝 server/index.js (+2 -0)
📝 server/models/workspaceChats.js (+33 -1)
server/models/workspaceThread.js (+86 -0)
server/prisma/migrations/20240208224848_init/migration.sql (+24 -0)
📝 server/prisma/schema.prisma (+24 -6)
📝 server/utils/chats/commands/reset.js (+16 -2)
📝 server/utils/chats/index.js (+27 -0)
📝 server/utils/chats/stream.js (+29 -13)

...and 1 more files

📄 Description

Pull Request Type

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

Relevant Issues

resolves #468
closes #515 (superseded) Thank you @self-programming-bio-robot for your previous work!

What is in this change?

Implements a workspace threading solution that allows anyone with access to a workspace to start a thread or multiple threads in isolation from other users but still leveraging the files in the higher-level workspace.

Additional Information

This upgrade will be fully backward compatible with existing installations with zero migrations required for both single user and multi-user instances.

workspace_threads table is the child table of workspaces that enable this functionality to exist.

All workspace chats by default occur in a default thread that cannot be deleted. This is the same as chatting with a workspace before this update. Threads now are a history pattern below a workspace.

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/699 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 2/8/2024 **Status:** ✅ Merged **Merged:** 2/8/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `workspace-threads` --- ### 📝 Commits (3) - [`ce6ddd6`](https://github.com/Mintplex-Labs/anything-llm/commit/ce6ddd65a59a5d15a34142176799428ccfd00d07) Implement workspace thread that is compatible with legacy versions - [`82e8d0b`](https://github.com/Mintplex-Labs/anything-llm/commit/82e8d0b165b7d49c16785eaa6088be898e6f2e26) last touches - [`2ee164e`](https://github.com/Mintplex-Labs/anything-llm/commit/2ee164e167b43624c55138227a5457fcc17b9eee) comment on chat qty enforcement ### 📊 Changes **21 files changed** (+1087 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/App.jsx` (+4 -0) ➕ `frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx` (+189 -0) ➕ `frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx` (+90 -0) 📝 `frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx` (+51 -45) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/index.jsx` (+35 -14) 📝 `frontend/src/components/WorkspaceChat/index.jsx` (+5 -1) 📝 `frontend/src/models/workspace.js` (+2 -0) ➕ `frontend/src/models/workspaceThread.js` (+146 -0) 📝 `frontend/src/pages/WorkspaceChat/index.jsx` (+5 -1) 📝 `frontend/src/utils/paths.js` (+3 -0) 📝 `server/endpoints/chat.js` (+114 -0) ➕ `server/endpoints/workspaceThreads.js` (+150 -0) 📝 `server/index.js` (+2 -0) 📝 `server/models/workspaceChats.js` (+33 -1) ➕ `server/models/workspaceThread.js` (+86 -0) ➕ `server/prisma/migrations/20240208224848_init/migration.sql` (+24 -0) 📝 `server/prisma/schema.prisma` (+24 -6) 📝 `server/utils/chats/commands/reset.js` (+16 -2) 📝 `server/utils/chats/index.js` (+27 -0) 📝 `server/utils/chats/stream.js` (+29 -13) _...and 1 more files_ </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #468 closes #515 (superseded) Thank you @self-programming-bio-robot for your previous work! ### What is in this change? Implements a workspace threading solution that allows anyone with access to a workspace to start a thread or multiple threads in isolation from other users but still leveraging the files in the higher-level workspace. ### Additional Information This upgrade will be fully backward compatible with existing installations with zero migrations required for both single user and multi-user instances. `workspace_threads` table is the child table of workspaces that enable this functionality to exist. All workspace chats by default occur in a `default` thread that cannot be deleted. This is the same as chatting with a workspace before this update. Threads now are a history pattern below a workspace. ### 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:33:50 -05:00
yindo closed this issue 2026-02-22 18:33:50 -05:00
yindo changed title from [PR #699] Implement workspace threading that is backwards compatible to [PR #699] [MERGED] Implement workspace threading that is backwards compatible 2026-06-05 15:13:33 -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#3464