[PR #8286] [MERGED] feat: functionality to clone shared chats #8994

Closed
opened 2025-11-11 18:11:24 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/8286
Author: @srajangarg
Created: 1/3/2025
Status: ✅ Merged
Merged: 1/5/2025
Merged by: @tjbck

Base: dev ← Head: sg


📝 Commits (2)

📊 Changes

5 files changed (+112 additions, -18 deletions)

View changed files

📝 backend/open_webui/models/chats.py (+2 -0)
📝 backend/open_webui/routers/chats.py (+24 -0)
📝 src/lib/apis/chats/index.ts (+38 -0)
📝 src/lib/components/chat/Messages.svelte (+3 -1)
📝 src/routes/s/[id]/+page.svelte (+45 -17)

📄 Description

Pull request for: https://github.com/open-webui/open-webui/discussions/8285

I often find myself sharing chats back and forth with friends and often find myself extending the chats they were having. Would like to implement a button on the shared chat that automatically clones the chat so i can start talking to it

Pull Request Checklist

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following

Description

This PR adds a button (top right) to the shared chat page:
image

When clicked, a new chat is created for the user with the contents of the shared chat. The user also is also navigated to the newly created chat. Here's a small video illustrating the feature:

https://github.com/user-attachments/assets/3b416426-f287-4718-8d91-45662efb1722

Happy to take suggestions on the frontend aspect of this change! I believe this change does not require a documentation change.


🔄 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/open-webui/open-webui/pull/8286 **Author:** [@srajangarg](https://github.com/srajangarg) **Created:** 1/3/2025 **Status:** ✅ Merged **Merged:** 1/5/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `sg` --- ### 📝 Commits (2) - [`2444327`](https://github.com/open-webui/open-webui/commit/2444327a47da31667a1d0abf63f12c197f6d46e9) add functionality to clone shared chats - [`fe59b7f`](https://github.com/open-webui/open-webui/commit/fe59b7f39cc07ea002f4d63dd476243fc1211edf) refac ### 📊 Changes **5 files changed** (+112 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/models/chats.py` (+2 -0) 📝 `backend/open_webui/routers/chats.py` (+24 -0) 📝 `src/lib/apis/chats/index.ts` (+38 -0) 📝 `src/lib/components/chat/Messages.svelte` (+3 -1) 📝 `src/routes/s/[id]/+page.svelte` (+45 -17) </details> ### 📄 Description Pull request for: https://github.com/open-webui/open-webui/discussions/8285 > I often find myself sharing chats back and forth with friends and often find myself extending the chats they were having. Would like to implement a button on the shared chat that automatically clones the chat so i can start talking to it ### Pull Request Checklist - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [ ] **Testing:** Have you written and run sufficient tests for validating the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following ### Description This PR adds a button (top right) to the shared chat page: ![image](https://github.com/user-attachments/assets/5c128a18-eb84-4f36-94d1-974c6d94f162) When clicked, a new chat is created for the user with the contents of the shared chat. The user also is also navigated to the newly created chat. Here's a small video illustrating the feature: https://github.com/user-attachments/assets/3b416426-f287-4718-8d91-45662efb1722 Happy to take suggestions on the frontend aspect of this change! I believe this change does not require a documentation change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:11:24 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8994