mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-03-14 07:29:07 +00:00
Code maintenance (#332)
Some checks are pending
Build and Release / Build app (linux-arm64) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Some checks are pending
Build and Release / Build app (linux-arm64) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
parent
5cc6e141c2
commit
2e8444b5e3
@ -1,7 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.Agenda;
|
||||
|
@ -1,4 +1,5 @@
|
||||
@using AIStudio.Chat
|
||||
@inherits AssistantLowerBase
|
||||
@typeparam TSettings
|
||||
|
||||
<div class="inner-scrolling-context">
|
||||
|
@ -1,6 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.Services;
|
||||
@ -15,7 +13,7 @@ using DialogOptions = AIStudio.Dialogs.DialogOptions;
|
||||
|
||||
namespace AIStudio.Assistants;
|
||||
|
||||
public abstract partial class AssistantBase<TSettings> : ComponentBase, IMessageBusReceiver, IDisposable where TSettings : IComponent
|
||||
public abstract partial class AssistantBase<TSettings> : AssistantLowerBase, IMessageBusReceiver, IDisposable where TSettings : IComponent
|
||||
{
|
||||
[Inject]
|
||||
protected SettingsManager SettingsManager { get; init; } = null!;
|
||||
@ -35,9 +33,6 @@ public abstract partial class AssistantBase<TSettings> : ComponentBase, IMessage
|
||||
[Inject]
|
||||
protected RustService RustService { get; init; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected DataSourceService DataSourceService { get; init; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavigationManager { get; init; } = null!;
|
||||
|
||||
@ -50,10 +45,6 @@ public abstract partial class AssistantBase<TSettings> : ComponentBase, IMessage
|
||||
[Inject]
|
||||
private MessageBus MessageBus { get; init; } = null!;
|
||||
|
||||
internal const string RESULT_DIV_ID = "assistantResult";
|
||||
internal const string BEFORE_RESULT_DIV_ID = "beforeAssistantResult";
|
||||
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||
|
||||
protected abstract string Title { get; }
|
||||
|
||||
protected abstract string Description { get; }
|
||||
@ -99,8 +90,6 @@ public abstract partial class AssistantBase<TSettings> : ComponentBase, IMessage
|
||||
protected virtual ChatThread ConvertToChatThread => this.chatThread ?? new();
|
||||
|
||||
protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
|
||||
|
||||
protected static readonly Dictionary<string, object?> USER_INPUT_ATTRIBUTES = new();
|
||||
|
||||
protected AIStudio.Settings.Provider providerSettings;
|
||||
protected MudForm? form;
|
||||
|
12
app/MindWork AI Studio/Assistants/AssistantLowerBase.cs
Normal file
12
app/MindWork AI Studio/Assistants/AssistantLowerBase.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Assistants;
|
||||
|
||||
public abstract class AssistantLowerBase : ComponentBase
|
||||
{
|
||||
protected static readonly Dictionary<string, object?> USER_INPUT_ATTRIBUTES = new();
|
||||
|
||||
internal const string RESULT_DIV_ID = "assistantResult";
|
||||
internal const string BEFORE_RESULT_DIV_ID = "beforeAssistantResult";
|
||||
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Settings.DataModel;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Text;
|
||||
using AIStudio.Components.Settings;
|
||||
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.Coding;
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.EMail;
|
||||
|
@ -2,7 +2,6 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Settings.DataModel;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.GrammarSpelling;
|
||||
|
@ -1,4 +1,3 @@
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.IconFinder;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.JobPosting;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.LegalCheck;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Settings;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.RewriteImprove;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.TextSummarizer;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Components.Settings;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Assistants.Translation;
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using AIStudio.Assistants;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Settings;
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Dialogs.Settings;
|
||||
|
||||
public partial class SettingsDialogAgenda : SettingsDialogBase;
|
@ -1,7 +1,3 @@
|
||||
using AIStudio.Dialogs;
|
||||
|
||||
using DialogOptions = AIStudio.Dialogs.DialogOptions;
|
||||
|
||||
namespace AIStudio.Dialogs.Settings;
|
||||
|
||||
public partial class SettingsDialogAssistantBias : SettingsDialogBase
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
@ -24,8 +23,6 @@ public abstract class SettingsDialogBase : ComponentBase
|
||||
[Inject]
|
||||
protected MessageBus MessageBus { get; init; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected RustService RustService { get; init; } = null!;
|
||||
|
||||
#region Overrides of ComponentBase
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Dialogs.Settings;
|
||||
|
||||
public partial class SettingsDialogTranslation : SettingsDialogBase;
|
@ -1,5 +1,4 @@
|
||||
using AIStudio.Assistants;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
|
||||
namespace AIStudio.Tools;
|
||||
|
||||
@ -7,7 +6,7 @@ public static class JsRuntimeExtensions
|
||||
{
|
||||
public static async Task GenerateAndShowDiff(this IJSRuntime jsRuntime, string text1, string text2)
|
||||
{
|
||||
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantBase<NoComponent>.RESULT_DIV_ID, AssistantBase<NoComponent>.BEFORE_RESULT_DIV_ID);
|
||||
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantLowerBase.RESULT_DIV_ID, AssistantLowerBase.BEFORE_RESULT_DIV_ID);
|
||||
}
|
||||
|
||||
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
||||
|
Loading…
Reference in New Issue
Block a user