From 839c398209d727fd36fc31bde12186843416a2ee Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 4 Jul 2024 11:00:13 +0200 Subject: [PATCH] Added draft for workspaces --- .../Components/Blocks/Workspaces.razor | 1 + .../Components/Blocks/Workspaces.razor.cs | 7 +++++ .../Components/Pages/Chat.razor | 26 +++++++++++++++++-- .../Components/Pages/Chat.razor.cs | 6 +++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 app/MindWork AI Studio/Components/Blocks/Workspaces.razor create mode 100644 app/MindWork AI Studio/Components/Blocks/Workspaces.razor.cs diff --git a/app/MindWork AI Studio/Components/Blocks/Workspaces.razor b/app/MindWork AI Studio/Components/Blocks/Workspaces.razor new file mode 100644 index 00000000..f85045ff --- /dev/null +++ b/app/MindWork AI Studio/Components/Blocks/Workspaces.razor @@ -0,0 +1 @@ +TODO \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Blocks/Workspaces.razor.cs b/app/MindWork AI Studio/Components/Blocks/Workspaces.razor.cs new file mode 100644 index 00000000..53b6b382 --- /dev/null +++ b/app/MindWork AI Studio/Components/Blocks/Workspaces.razor.cs @@ -0,0 +1,7 @@ +using Microsoft.AspNetCore.Components; + +namespace AIStudio.Components.Blocks; + +public partial class Workspaces : ComponentBase +{ +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Pages/Chat.razor b/app/MindWork AI Studio/Components/Pages/Chat.razor index ae9138da..29052769 100644 --- a/app/MindWork AI Studio/Components/Pages/Chat.razor +++ b/app/MindWork AI Studio/Components/Pages/Chat.razor @@ -2,7 +2,15 @@ @using AIStudio.Chat @using AIStudio.Settings -Chats + + + Chats + + + + + + @foreach (var provider in this.SettingsManager.ConfigurationData.Providers) { @@ -25,4 +33,18 @@ - \ No newline at end of file + + + + + + + Your workspaces + + + + + + + + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Pages/Chat.razor.cs b/app/MindWork AI Studio/Components/Pages/Chat.razor.cs index 08275bd1..2cec8c29 100644 --- a/app/MindWork AI Studio/Components/Pages/Chat.razor.cs +++ b/app/MindWork AI Studio/Components/Pages/Chat.razor.cs @@ -27,6 +27,7 @@ public partial class Chat : ComponentBase private ChatThread? chatThread; private bool isStreaming; private string userInput = string.Empty; + private bool workspacesVisible; // Unfortunately, we need the input field reference to clear it after sending a message. // This is necessary because we have to handle the key events ourselves. Otherwise, @@ -132,4 +133,9 @@ public partial class Chat : ComponentBase break; } } + + private void ToggleWorkspaces() + { + this.workspacesVisible = !this.workspacesVisible; + } } \ No newline at end of file