From 1c0c2a38550d6c3f0612898e07de986c40f8679d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Peer=20Sch=C3=BCtt?=
<20603780+peerschuett@users.noreply.github.com>
Date: Wed, 3 Jun 2026 16:43:06 +0200
Subject: [PATCH] Merge Error Fixes
---
.../Assistants/AssistantBase.razor | 2 +-
.../Components/ChatComponent.razor | 2 +-
.../Components/ChatComponent.razor.cs | 13 ++-
.../Provider/BaseProvider.cs | 21 +++--
.../Provider/OpenAI/ProviderOpenAI.cs | 89 ++++++++-----------
.../Provider/OpenAI/ResponsesAPIRequest.cs | 2 -
.../Tools/SecretStoreType.cs | 7 +-
.../Tools/SecretStoreTypeExtensions.cs | 3 +-
.../ToolCallingSystem/ToolSettingsSecretId.cs | 2 +-
.../ToolCallingSystem/ToolSettingsService.cs | 6 +-
10 files changed, 69 insertions(+), 78 deletions(-)
diff --git a/app/MindWork AI Studio/Assistants/AssistantBase.razor b/app/MindWork AI Studio/Assistants/AssistantBase.razor
index a65a519e..9b11152c 100644
--- a/app/MindWork AI Studio/Assistants/AssistantBase.razor
+++ b/app/MindWork AI Studio/Assistants/AssistantBase.razor
@@ -165,7 +165,7 @@
@if (this.SettingsManager.IsToolSelectionVisible(this.Component))
{
-
+
}
diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor b/app/MindWork AI Studio/Components/ChatComponent.razor
index 80437388..9fa82897 100644
--- a/app/MindWork AI Studio/Components/ChatComponent.razor
+++ b/app/MindWork AI Studio/Components/ChatComponent.razor
@@ -124,7 +124,7 @@
-
+
@if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
{
diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs
index 01034107..62edb472 100644
--- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs
+++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs
@@ -78,6 +78,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
private Guid loadedParameterWorkspaceId = Guid.Empty;
private Guid foregroundChatId = Guid.Empty;
private int workspaceHeaderSyncVersion;
+ private CancellationTokenSource? cancellationTokenSource;
// Unfortunately, we need the input field reference to blur the focus away. Without
// this, we cannot clear the input field.
@@ -702,7 +703,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
// ProviderSettings = this.Provider,
// IsForeground = true,
//});
- using (this.cancellationTokenSource = new())
+ using (this.cancellationTokenSource = new CancellationTokenSource())
{
this.StateHasChanged();
this.ChatThread!.RuntimeComponent = Tools.Components.CHAT;
@@ -719,12 +720,8 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
// Save the chat:
if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
{
- ChatThread = this.ChatThread!,
- AIText = aiText,
- LastUserPrompt = lastUserPrompt,
- ProviderSettings = this.Provider,
- IsForeground = true,
- });
+ await this.SaveThread();
+ }
await this.SyncForegroundChatAsync();
this.StateHasChanged();
@@ -1133,4 +1130,4 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
}
#endregion
-}
\ No newline at end of file
+}
diff --git a/app/MindWork AI Studio/Provider/BaseProvider.cs b/app/MindWork AI Studio/Provider/BaseProvider.cs
index 801c9cdc..79776dc9 100644
--- a/app/MindWork AI Studio/Provider/BaseProvider.cs
+++ b/app/MindWork AI Studio/Provider/BaseProvider.cs
@@ -957,7 +957,6 @@ public abstract class BaseProvider : IProvider, ISecretId
/// The selected chat model.
/// The current chat thread.
/// The settings manager.
- /// Builds the provider-specific base messages.
/// Builds the provider-specific request body.
/// The secret store type.
/// Whether the API key is optional.
@@ -969,19 +968,19 @@ public abstract class BaseProvider : IProvider, ISecretId
/// The delta stream line type.
/// The annotation stream line type.
/// The streamed content chunks.
- protected async IAsyncEnumerable StreamOpenAICompatibleChatCompletion(
+ protected async IAsyncEnumerable StreamOpenAICompatibleChatCompletion(
string providerName,
Model chatModel,
ChatThread chatThread,
SettingsManager settingsManager,
- Func>> messagesFactory,
- Func, Task> requestFactory,
+ Func, IList