mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 01:20:21 +00:00 
			
		
		
		
	Refactor components (#80)
This commit is contained in:
		
							parent
							
								
									a18cb22263
								
							
						
					
					
						commit
						1d1af91f3e
					
				
							
								
								
									
										30
									
								
								app/MindWork AI Studio/App.razor
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								app/MindWork AI Studio/App.razor
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					@using Microsoft.AspNetCore.Components.Web
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@* ReSharper disable Html.PathError *@
 | 
				
			||||||
 | 
					<!DOCTYPE html>
 | 
				
			||||||
 | 
					<html lang="en">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <head>
 | 
				
			||||||
 | 
					        <title>MindWork AI Studio</title>
 | 
				
			||||||
 | 
					        <meta charset="utf-8"/>
 | 
				
			||||||
 | 
					        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 | 
				
			||||||
 | 
					        <base href="/"/>
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        <link rel="icon" type="image/png" href="favicon.png"/>
 | 
				
			||||||
 | 
					        <link href="system/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
 | 
				
			||||||
 | 
					        <link href="system/MudBlazor.Markdown/MudBlazor.Markdown.min.css" rel="stylesheet" />
 | 
				
			||||||
 | 
					        <link href="app.css" rel="stylesheet" />
 | 
				
			||||||
 | 
					        <HeadOutlet/>
 | 
				
			||||||
 | 
					        <script src="diff.js"></script>
 | 
				
			||||||
 | 
					    </head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <body style="overflow: hidden;">
 | 
				
			||||||
 | 
					        <Routes @rendermode="new InteractiveServerRenderMode(prerender: false)"/>
 | 
				
			||||||
 | 
					        <script src="_framework/blazor.web.js" autostart="false"></script>
 | 
				
			||||||
 | 
					        <script src="boot.js"></script>
 | 
				
			||||||
 | 
					        <script src="system/MudBlazor/MudBlazor.min.js"></script>
 | 
				
			||||||
 | 
					        <script src="system/MudBlazor.Markdown/MudBlazor.Markdown.min.js"></script>
 | 
				
			||||||
 | 
					        <script src="app.js"></script>
 | 
				
			||||||
 | 
					    </body>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</html>
 | 
				
			||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
@attribute [Route(Path.ASSISTANT_AGENDA)]
 | 
					@attribute [Route(Routes.ASSISTANT_AGENDA)]
 | 
				
			||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<MudTextField T="string" @bind-Text="@this.inputName" Validation="@this.ValidateName" Label="Meeting Name" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Tag" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Name the meeting, seminar, etc." Placeholder="Weekly jour fixe" Class="mb-3"/>
 | 
					<MudTextField T="string" @bind-Text="@this.inputName" Validation="@this.ValidateName" Label="Meeting Name" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Tag" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Name the meeting, seminar, etc." Placeholder="Weekly jour fixe" Class="mb-3"/>
 | 
				
			||||||
@ -3,7 +3,7 @@ using System.Text;
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.Agenda;
 | 
					namespace AIStudio.Assistants.Agenda;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantAgenda : AssistantBaseCore
 | 
					public partial class AssistantAgenda : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.Agenda;
 | 
					namespace AIStudio.Assistants.Agenda;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum NumberParticipants
 | 
					public enum NumberParticipants
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.Agenda;
 | 
					namespace AIStudio.Assistants.Agenda;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class NumberParticipantsExtensions
 | 
					public static class NumberParticipantsExtensions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
@using AIStudio.Chat
 | 
					@using AIStudio.Chat
 | 
				
			||||||
@using AIStudio.Components.Pages
 | 
					
 | 
				
			||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
<MudText Typo="Typo.h3" Class="mb-2 mr-3">
 | 
					<MudText Typo="Typo.h3" Class="mb-2 mr-3">
 | 
				
			||||||
    @(this.Title)
 | 
					    @(this.Title)
 | 
				
			||||||
</MudText>
 | 
					</MudText>
 | 
				
			||||||
@ -23,7 +22,7 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            <MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-6" />
 | 
					            <MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-6" />
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        <div id="@ASSISTANT_RESULT_DIV_ID" class="mr-2 mt-3">
 | 
					        <div id="@RESULT_DIV_ID" class="mr-2 mt-3">
 | 
				
			||||||
            @if (this.ShowResult && this.resultingContentBlock is not null)
 | 
					            @if (this.ShowResult && this.resultingContentBlock is not null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                <ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@(this.resultingContentBlock.Content)"/>
 | 
					                <ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@(this.resultingContentBlock.Content)"/>
 | 
				
			||||||
@ -1,14 +1,11 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Components.Pages;
 | 
					 | 
				
			||||||
using AIStudio.Provider;
 | 
					using AIStudio.Provider;
 | 
				
			||||||
using AIStudio.Settings;
 | 
					using AIStudio.Settings;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Path = AIStudio.Components.Pages.Path;
 | 
					namespace AIStudio.Assistants;
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace AIStudio.Components;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public abstract partial class AssistantBase : ComponentBase
 | 
					public abstract partial class AssistantBase : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -31,7 +28,7 @@ public abstract partial class AssistantBase : ComponentBase
 | 
				
			|||||||
    protected NavigationManager NavigationManager { get; init; } = null!;
 | 
					    protected NavigationManager NavigationManager { get; init; } = null!;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
 | 
					    internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
 | 
				
			||||||
    internal const string ASSISTANT_RESULT_DIV_ID = "assistantResult";
 | 
					    internal const string RESULT_DIV_ID = "assistantResult";
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected abstract string Title { get; }
 | 
					    protected abstract string Title { get; }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -184,17 +181,17 @@ public abstract partial class AssistantBase : ComponentBase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        var (eventItem, path) = destination switch
 | 
					        var (eventItem, path) = destination switch
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            SendTo.AGENDA_ASSISTANT => (Event.SEND_TO_AGENDA_ASSISTANT, Path.ASSISTANT_AGENDA),
 | 
					            SendTo.AGENDA_ASSISTANT => (Event.SEND_TO_AGENDA_ASSISTANT, Routes.ASSISTANT_AGENDA),
 | 
				
			||||||
            SendTo.CODING_ASSISTANT => (Event.SEND_TO_CODING_ASSISTANT, Path.ASSISTANT_CODING),
 | 
					            SendTo.CODING_ASSISTANT => (Event.SEND_TO_CODING_ASSISTANT, Routes.ASSISTANT_CODING),
 | 
				
			||||||
            SendTo.REWRITE_ASSISTANT => (Event.SEND_TO_REWRITE_ASSISTANT, Path.ASSISTANT_REWRITE),
 | 
					            SendTo.REWRITE_ASSISTANT => (Event.SEND_TO_REWRITE_ASSISTANT, Routes.ASSISTANT_REWRITE),
 | 
				
			||||||
            SendTo.TRANSLATION_ASSISTANT => (Event.SEND_TO_TRANSLATION_ASSISTANT, Path.ASSISTANT_TRANSLATION),
 | 
					            SendTo.TRANSLATION_ASSISTANT => (Event.SEND_TO_TRANSLATION_ASSISTANT, Routes.ASSISTANT_TRANSLATION),
 | 
				
			||||||
            SendTo.ICON_FINDER_ASSISTANT => (Event.SEND_TO_ICON_FINDER_ASSISTANT, Path.ASSISTANT_ICON_FINDER),
 | 
					            SendTo.ICON_FINDER_ASSISTANT => (Event.SEND_TO_ICON_FINDER_ASSISTANT, Routes.ASSISTANT_ICON_FINDER),
 | 
				
			||||||
            SendTo.GRAMMAR_SPELLING_ASSISTANT => (Event.SEND_TO_GRAMMAR_SPELLING_ASSISTANT, Path.ASSISTANT_GRAMMAR_SPELLING),
 | 
					            SendTo.GRAMMAR_SPELLING_ASSISTANT => (Event.SEND_TO_GRAMMAR_SPELLING_ASSISTANT, Routes.ASSISTANT_GRAMMAR_SPELLING),
 | 
				
			||||||
            SendTo.TEXT_SUMMARIZER_ASSISTANT => (Event.SEND_TO_TEXT_SUMMARIZER_ASSISTANT, Path.ASSISTANT_SUMMARIZER),
 | 
					            SendTo.TEXT_SUMMARIZER_ASSISTANT => (Event.SEND_TO_TEXT_SUMMARIZER_ASSISTANT, Routes.ASSISTANT_SUMMARIZER),
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            SendTo.CHAT => (Event.SEND_TO_CHAT, Path.CHAT),
 | 
					            SendTo.CHAT => (Event.SEND_TO_CHAT, Routes.CHAT),
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            _ => (Event.NONE, Path.ASSISTANTS),
 | 
					            _ => (Event.NONE, Routes.ASSISTANTS),
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        switch (destination)
 | 
					        switch (destination)
 | 
				
			||||||
@ -217,7 +214,7 @@ public abstract partial class AssistantBase : ComponentBase
 | 
				
			|||||||
        this.resultingContentBlock = null;
 | 
					        this.resultingContentBlock = null;
 | 
				
			||||||
        this.providerSettings = default;
 | 
					        this.providerSettings = default;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        await this.JsRuntime.ClearDiv(ASSISTANT_RESULT_DIV_ID);
 | 
					        await this.JsRuntime.ClearDiv(RESULT_DIV_ID);
 | 
				
			||||||
        await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
 | 
					        await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        this.ResetFrom();
 | 
					        this.ResetFrom();
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
using Microsoft.AspNetCore.Components.Rendering;
 | 
					using Microsoft.AspNetCore.Components.Rendering;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components;
 | 
					namespace AIStudio.Assistants;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// See https://stackoverflow.com/a/77300384/2258393 for why this class is necessary
 | 
					// See https://stackoverflow.com/a/77300384/2258393 for why this class is necessary
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
@attribute [Route(Path.ASSISTANT_CODING)]
 | 
					@attribute [Route(Routes.ASSISTANT_CODING)]
 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<MudExpansionPanels Class="mb-3">
 | 
					<MudExpansionPanels Class="mb-3">
 | 
				
			||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantCoding : AssistantBaseCore
 | 
					public partial class AssistantCoding : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public sealed class CodingContext(string id, CommonCodingLanguages language, string otherLanguage, string code)
 | 
					public sealed class CodingContext(string id, CommonCodingLanguages language, string otherLanguage, string code)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class CodingContextItem : ComponentBase
 | 
					public partial class CodingContextItem : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class CommonCodingLanguageExtensions
 | 
					public static class CommonCodingLanguageExtensions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum CommonCodingLanguages
 | 
					public enum CommonCodingLanguages
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
@using AIStudio.Tools
 | 
					@attribute [Route(Routes.ASSISTANT_GRAMMAR_SPELLING)]
 | 
				
			||||||
@attribute [Route(Path.ASSISTANT_GRAMMAR_SPELLING)]
 | 
					 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input to check" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
					<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input to check" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.GrammarSpelling;
 | 
					namespace AIStudio.Assistants.GrammarSpelling;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantGrammarSpelling : AssistantBaseCore
 | 
					public partial class AssistantGrammarSpelling : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
@attribute [Route(Path.ASSISTANT_ICON_FINDER)]
 | 
					@attribute [Route(Routes.ASSISTANT_ICON_FINDER)]
 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<MudTextField T="string" @bind-Text="@this.inputContext" Validation="@this.ValidatingContext" AdornmentIcon="@Icons.Material.Filled.Description" Adornment="Adornment.Start" Label="Your context" Variant="Variant.Outlined" Lines="3" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
					<MudTextField T="string" @bind-Text="@this.inputContext" Validation="@this.ValidatingContext" AdornmentIcon="@Icons.Material.Filled.Description" Adornment="Adornment.Start" Label="Your context" Variant="Variant.Outlined" Lines="3" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.IconFinder;
 | 
					namespace AIStudio.Assistants.IconFinder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantIconFinder : AssistantBaseCore
 | 
					public partial class AssistantIconFinder : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.IconFinder;
 | 
					namespace AIStudio.Assistants.IconFinder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class IconSourceExtensions
 | 
					public static class IconSourceExtensions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.IconFinder;
 | 
					namespace AIStudio.Assistants.IconFinder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum IconSources
 | 
					public enum IconSources
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
@using AIStudio.Tools
 | 
					@attribute [Route(Routes.ASSISTANT_REWRITE)]
 | 
				
			||||||
@attribute [Route(Path.ASSISTANT_REWRITE)]
 | 
					 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input to improve" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
					<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input to improve" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.RewriteImprove;
 | 
					namespace AIStudio.Assistants.RewriteImprove;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantRewriteImprove : AssistantBaseCore
 | 
					public partial class AssistantRewriteImprove : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.RewriteImprove;
 | 
					namespace AIStudio.Assistants.RewriteImprove;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum WritingStyles
 | 
					public enum WritingStyles
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.RewriteImprove;
 | 
					namespace AIStudio.Assistants.RewriteImprove;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class WritingStylesExtensions
 | 
					public static class WritingStylesExtensions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
@attribute [Route(Path.ASSISTANT_SUMMARIZER)]
 | 
					@attribute [Route(Routes.ASSISTANT_SUMMARIZER)]
 | 
				
			||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@if (!this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)
 | 
					@if (!this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.TextSummarizer;
 | 
					namespace AIStudio.Assistants.TextSummarizer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantTextSummarizer : AssistantBaseCore
 | 
					public partial class AssistantTextSummarizer : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.TextSummarizer;
 | 
					namespace AIStudio.Assistants.TextSummarizer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum Complexity
 | 
					public enum Complexity
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Pages.TextSummarizer;
 | 
					namespace AIStudio.Assistants.TextSummarizer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class ComplexityExtensions
 | 
					public static class ComplexityExtensions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
@attribute [Route(Path.ASSISTANT_TRANSLATION)]
 | 
					@attribute [Route(Routes.ASSISTANT_TRANSLATION)]
 | 
				
			||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
@inherits AssistantBaseCore
 | 
					@inherits AssistantBaseCore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@if (!this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)
 | 
					@if (!this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Pages.Translation;
 | 
					namespace AIStudio.Assistants.Translation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantTranslation : AssistantBaseCore
 | 
					public partial class AssistantTranslation : AssistantBaseCore
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
							
								
								
									
										4
									
								
								app/MindWork AI Studio/Assistants/_Imports.razor
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								app/MindWork AI Studio/Assistants/_Imports.razor
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					@using AIStudio
 | 
				
			||||||
 | 
					@using AIStudio.Tools
 | 
				
			||||||
 | 
					@using AIStudio.Components
 | 
				
			||||||
 | 
					@using MudBlazor
 | 
				
			||||||
@ -1,28 +0,0 @@
 | 
				
			|||||||
@* ReSharper disable Html.PathError *@
 | 
					 | 
				
			||||||
<!DOCTYPE html>
 | 
					 | 
				
			||||||
<html lang="en">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<head>
 | 
					 | 
				
			||||||
    <title>MindWork AI Studio</title>
 | 
					 | 
				
			||||||
    <meta charset="utf-8"/>
 | 
					 | 
				
			||||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 | 
					 | 
				
			||||||
    <base href="/"/>
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    <link rel="icon" type="image/png" href="favicon.png"/>
 | 
					 | 
				
			||||||
    <link href="system/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
 | 
					 | 
				
			||||||
    <link href="system/MudBlazor.Markdown/MudBlazor.Markdown.min.css" rel="stylesheet" />
 | 
					 | 
				
			||||||
    <link href="app.css" rel="stylesheet" />
 | 
					 | 
				
			||||||
    <HeadOutlet/>
 | 
					 | 
				
			||||||
    <script src="diff.js"></script>
 | 
					 | 
				
			||||||
</head>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<body style="overflow: hidden;">
 | 
					 | 
				
			||||||
    <Routes @rendermode="new InteractiveServerRenderMode(prerender: false)"/>
 | 
					 | 
				
			||||||
    <script src="_framework/blazor.web.js" autostart="false"></script>
 | 
					 | 
				
			||||||
    <script src="boot.js"></script>
 | 
					 | 
				
			||||||
    <script src="system/MudBlazor/MudBlazor.min.js"></script>
 | 
					 | 
				
			||||||
    <script src="system/MudBlazor.Markdown/MudBlazor.Markdown.min.js"></script>
 | 
					 | 
				
			||||||
    <script src="app.js"></script>
 | 
					 | 
				
			||||||
</body>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantBlock : ComponentBase
 | 
					public partial class AssistantBlock : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,3 +0,0 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public interface ITreeItem;
 | 
					 | 
				
			||||||
@ -1,3 +0,0 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public readonly record struct TreeDivider : ITreeItem;
 | 
					 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Changelog
 | 
					public partial class Changelog
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,3 @@
 | 
				
			|||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
<MudSelect T="Log" @bind-Value="@this.SelectedLog" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Schedule" Margin="Margin.Dense" Label="Changelog" Class="mb-2 rounded-lg" Variant="Variant.Outlined" SelectedValuesChanged="() => this.ReadLogAsync()" OnKeyUp="() => this.ReadLogAsync()">
 | 
					<MudSelect T="Log" @bind-Value="@this.SelectedLog" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Schedule" Margin="Margin.Dense" Label="Changelog" Class="mb-2 rounded-lg" Variant="Variant.Outlined" SelectedValuesChanged="() => this.ReadLogAsync()" OnKeyUp="() => this.ReadLogAsync()">
 | 
				
			||||||
    @foreach (var log in LOGS)
 | 
					    @foreach (var log in LOGS)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Changelog : ComponentBase
 | 
					public partial class Changelog : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// <summary>
 | 
					/// <summary>
 | 
				
			||||||
/// Configuration component for any boolean option.
 | 
					/// Configuration component for any boolean option.
 | 
				
			||||||
@ -3,7 +3,7 @@ using AIStudio.Tools;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ConfigurationProviderSelection : ComponentBase, IMessageBusReceiver, IDisposable
 | 
					public partial class ConfigurationProviderSelection : ComponentBase, IMessageBusReceiver, IDisposable
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@ using AIStudio.Settings;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// <summary>
 | 
					/// <summary>
 | 
				
			||||||
/// Configuration component for selecting a value from a list.
 | 
					/// Configuration component for selecting a value from a list.
 | 
				
			||||||
@ -2,7 +2,7 @@ using System.Numerics;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ConfigurationSlider<T> : ConfigurationBase where T : struct, INumber<T>
 | 
					public partial class ConfigurationSlider<T> : ConfigurationBase where T : struct, INumber<T>
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ConfigurationText : ConfigurationBase
 | 
					public partial class ConfigurationText : ConfigurationBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@ using AIStudio.Settings;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class EnumSelection<T> : EnumSelectionBase where T : struct, Enum
 | 
					public partial class EnumSelection<T> : EnumSelectionBase where T : struct, Enum
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public abstract class EnumSelectionBase : ComponentBase
 | 
					public abstract class EnumSelectionBase : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ExpansionPanel : ComponentBase
 | 
					public partial class ExpansionPanel : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
							
								
								
									
										3
									
								
								app/MindWork AI Studio/Components/ITreeItem.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/MindWork AI Studio/Components/ITreeItem.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface ITreeItem;
 | 
				
			||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
using AIStudio.Components.Layout;
 | 
					using AIStudio.Layout;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class InnerScrolling : MSGComponentBase
 | 
					public partial class InnerScrolling : MSGComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Issues : ComponentBase
 | 
					public partial class Issues : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,3 +0,0 @@
 | 
				
			|||||||
namespace AIStudio.Components.Layout;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public record NavBarItem(string Name, string Icon, Color IconColor, string Path, bool MatchAll);
 | 
					 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Motivation : ComponentBase
 | 
					public partial class Motivation : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class MudTextList : ComponentBase
 | 
					public partial class MudTextList : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@ using System.Numerics;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class MudTextSlider<T> : ComponentBase where T : struct, INumber<T>
 | 
					public partial class MudTextSlider<T> : ComponentBase where T : struct, INumber<T>
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class MudTextSwitch : ComponentBase
 | 
					public partial class MudTextSwitch : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,5 +0,0 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace AIStudio.Components.Pages;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public partial class Assistants : ComponentBase;
 | 
					 | 
				
			||||||
@ -2,7 +2,7 @@ using AIStudio.Tools;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ProcessComponent<T> : ComponentBase where T : struct, Enum
 | 
					public partial class ProcessComponent<T> : ComponentBase where T : struct, Enum
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@ using AIStudio.Settings;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ProviderSelection : ComponentBase
 | 
					public partial class ProviderSelection : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -5,7 +5,7 @@ using AIStudio.Tools;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ReadWebContent : ComponentBase
 | 
					public partial class ReadWebContent : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum ReadWebContentSteps
 | 
					public enum ReadWebContentSteps
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SplitButton<T> : ComponentBase
 | 
					public partial class SplitButton<T> : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class ThirdPartyComponent : ComponentBase
 | 
					public partial class ThirdPartyComponent : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public readonly record struct TreeButton(WorkspaceBranch Branch, int Depth, string Text, string Icon, Func<Task> Action) : ITreeItem;
 | 
					public readonly record struct TreeButton(WorkspaceBranch Branch, int Depth, string Text, string Icon, Func<Task> Action) : ITreeItem;
 | 
				
			||||||
							
								
								
									
										3
									
								
								app/MindWork AI Studio/Components/TreeDivider.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/MindWork AI Studio/Components/TreeDivider.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public readonly record struct TreeDivider : ITreeItem;
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class TreeItemData : ITreeItem
 | 
					public class TreeItemData : ITreeItem
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -8,7 +8,7 @@ public class TreeItemData : ITreeItem
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    public string Text { get; init; } = string.Empty;
 | 
					    public string Text { get; init; } = string.Empty;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    public string ShortenedText => Text.Length > 30 ? this.Text[..30] + "..." : this.Text;
 | 
					    public string ShortenedText => this.Text.Length > 30 ? this.Text[..30] + "..." : this.Text;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public string Icon { get; init; } = string.Empty;
 | 
					    public string Icon { get; init; } = string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum TreeItemType
 | 
					public enum TreeItemType
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Vision : ComponentBase
 | 
					public partial class Vision : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public enum WorkspaceBranch
 | 
					public enum WorkspaceBranch
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -3,15 +3,15 @@ using System.Text.Json;
 | 
				
			|||||||
using System.Text.Json.Serialization;
 | 
					using System.Text.Json.Serialization;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
using AIStudio.Components.CommonDialogs;
 | 
					using AIStudio.Dialogs;
 | 
				
			||||||
using AIStudio.Settings;
 | 
					using AIStudio.Settings;
 | 
				
			||||||
using AIStudio.Tools;
 | 
					using AIStudio.Tools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using DialogOptions = AIStudio.Components.CommonDialogs.DialogOptions;
 | 
					using DialogOptions = AIStudio.Dialogs.DialogOptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.Blocks;
 | 
					namespace AIStudio.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class Workspaces : ComponentBase
 | 
					public partial class Workspaces : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,12 +1,3 @@
 | 
				
			|||||||
@using System.Net.Http
 | 
					@using AIStudio
 | 
				
			||||||
@using System.Net.Http.Json
 | 
					@using AIStudio.Tools
 | 
				
			||||||
@using Microsoft.AspNetCore.Components.Forms
 | 
					 | 
				
			||||||
@using Microsoft.AspNetCore.Components.Routing
 | 
					 | 
				
			||||||
@using Microsoft.AspNetCore.Components.Web
 | 
					 | 
				
			||||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
 | 
					 | 
				
			||||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
 | 
					 | 
				
			||||||
@using Microsoft.JSInterop
 | 
					 | 
				
			||||||
@using AIStudio
 | 
					 | 
				
			||||||
@using AIStudio.Components
 | 
					 | 
				
			||||||
@using AIStudio.Components.Blocks
 | 
					 | 
				
			||||||
@using MudBlazor
 | 
					@using MudBlazor
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.CommonDialogs;
 | 
					namespace AIStudio.Dialogs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// <summary>
 | 
					/// <summary>
 | 
				
			||||||
/// A confirmation dialog that can be used to ask the user for confirmation.
 | 
					/// A confirmation dialog that can be used to ask the user for confirmation.
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
namespace AIStudio.Components.CommonDialogs;
 | 
					namespace AIStudio.Dialogs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class DialogOptions
 | 
					public static class DialogOptions
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -2,7 +2,7 @@ using AIStudio.Settings;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.CommonDialogs;
 | 
					namespace AIStudio.Dialogs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SingleInputDialog : ComponentBase
 | 
					public partial class SingleInputDialog : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -1,4 +1,3 @@
 | 
				
			|||||||
@using AIStudio.Tools
 | 
					 | 
				
			||||||
<MudDialog>
 | 
					<MudDialog>
 | 
				
			||||||
    <DialogContent>
 | 
					    <DialogContent>
 | 
				
			||||||
        <MudText Typo="Typo.h4" Class="d-inline-flex align-center">
 | 
					        <MudText Typo="Typo.h4" Class="d-inline-flex align-center">
 | 
				
			||||||
@ -4,7 +4,7 @@ using AIStudio.Tools;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.CommonDialogs;
 | 
					namespace AIStudio.Dialogs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// <summary>
 | 
					/// <summary>
 | 
				
			||||||
/// The update dialog that is used to inform the user about an available update.
 | 
					/// The update dialog that is used to inform the user about an available update.
 | 
				
			||||||
@ -4,7 +4,7 @@ using AIStudio.Settings;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					using Microsoft.AspNetCore.Components;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Components.CommonDialogs;
 | 
					namespace AIStudio.Dialogs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class WorkspaceSelectionDialog : ComponentBase
 | 
					public partial class WorkspaceSelectionDialog : ComponentBase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	Block a user