From 5d83e50c72e076ca1a169ec570bdc67a4e78eaa0 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 23 Sep 2026 10:24:14 +0200 Subject: [PATCH] Clarified the two ways of copying a chat --- app/MindWork AI Studio/Components/Workspaces.razor | 2 +- .../Components/Workspaces.razor.cs | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Components/Workspaces.razor b/app/MindWork AI Studio/Components/Workspaces.razor index 4ea4b401..d34e2fad 100644 --- a/app/MindWork AI Studio/Components/Workspaces.razor +++ b/app/MindWork AI Studio/Components/Workspaces.razor @@ -82,7 +82,7 @@ else - + diff --git a/app/MindWork AI Studio/Components/Workspaces.razor.cs b/app/MindWork AI Studio/Components/Workspaces.razor.cs index 240f7dfb..98887cc6 100644 --- a/app/MindWork AI Studio/Components/Workspaces.razor.cs +++ b/app/MindWork AI Studio/Components/Workspaces.razor.cs @@ -799,7 +799,17 @@ public partial class Workspaces : MSGComponentBase await this.LoadTreeItemsAsync(startPrefetch: false); } - private async Task CopyChatAsync(string? chatPath) + /// + /// Copies the chat behind the copy button of a tree item and opens the copy. + /// + /// The directory of the chat to copy. + /// + /// The copy itself is done by CopyChatAsync, which the chat toolbar uses as well. What this + /// handler adds is what only the tree needs: it finds the chat by its directory, and because it + /// opens the copy afterward, it asks first when the chat open right now has unsaved changes. + /// The chat toolbar asks nothing, since it copies the chat on the screen and keeps working in it. + /// + private async Task CopyChatFromTreeAsync(string? chatPath) { var chat = await this.LoadChatAsync(chatPath, false); if (chat is null)