mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-27 11:57:13 -05:00
[PR #1364] [MERGED] feat: add local sharing of chats #7444
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/1364
Author: @cheahjs
Created: 3/31/2024
Status: ✅ Merged
Merged: 4/2/2024
Merged by: @tjbck
Base:
dev← Head:feat/local-sharing📝 Commits (10+)
86aa2caMerge pull request #1363 from open-webui/devbfbfdaefeat: add backend functions for sharing chats196f91dfeat: add frontend support for locally sharing chatsedeff20Merge pull request #1374 from open-webui/dev4cb2cc6feat: add ability to run db migrationsd667faefeat: migrate db schema for local sharing77b1edcfix: allowed hosts554e566Merge pull request from GHSA-39wr-r5vm-3jxj6c96361Suggested mitigation for KL-CAN-2024-002.d72653cfix: download allowed hosts📊 Changes
22 files changed (+1045 additions, -208 deletions)
View changed files
📝
backend/apps/ollama/main.py(+15 -0)📝
backend/apps/rag/main.py(+18 -1)📝
backend/apps/web/internal/db.py(+4 -1)➕
backend/apps/web/internal/migrations/001_initial_schema.py(+149 -0)➕
backend/apps/web/internal/migrations/002_add_local_sharing.py(+48 -0)➕
backend/apps/web/internal/migrations/README.md(+21 -0)📝
backend/apps/web/models/chats.py(+93 -1)📝
backend/apps/web/routers/chats.py(+72 -0)📝
backend/main.py(+15 -0)📝
backend/requirements.txt(+1 -0)📝
src/lib/apis/chats/index.ts(+96 -0)📝
src/lib/components/chat/Messages.svelte(+3 -0)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+84 -78)📝
src/lib/components/chat/Messages/UserMessage.svelte(+27 -24)📝
src/lib/components/chat/Settings/Models.svelte(+3 -0)📝
src/lib/components/chat/ShareChatModal.svelte(+162 -23)➕
src/lib/components/icons/Link.svelte(+16 -0)📝
src/lib/components/layout/Navbar.svelte(+7 -49)📝
src/lib/i18n/locales/nl-NL/translation.json(+29 -29)📝
src/routes/(app)/+page.svelte(+1 -1)...and 2 more files
📄 Description
Pull Request Checklist
TODOs
Description
Adds the ability to share a chat locally with other authenticated users on the same instance.
This isn't a complete implementation (deletion isn't implemented at the moment), but the design this implements is:
share_idthat points to a chat ID that was the snapshot of the chat when it was shared.user_idset tosharedto distinguish it from regular chats./s/[id], that is read-only and disables any of the buttons that would modify state.Things that are unaddressed:
https://github.com/open-webui/open-webui/assets/818368/0fa1afe6-05c8-495e-937d-180953239d47
May address https://github.com/open-webui/open-webui/issues/797
Changelog Entry
Added
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.