mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 13:49:07 +00:00
Add agenda assistant (#69)
This commit is contained in:
parent
1ec86ec1a6
commit
6b7800b615
@ -70,7 +70,7 @@ public sealed class ContentText : IContent
|
|||||||
// Notify the UI that the content has changed,
|
// Notify the UI that the content has changed,
|
||||||
// depending on the energy saving mode:
|
// depending on the energy saving mode:
|
||||||
var now = DateTimeOffset.Now;
|
var now = DateTimeOffset.Now;
|
||||||
switch (settings.ConfigurationData.IsSavingEnergy)
|
switch (settings.ConfigurationData.App.IsSavingEnergy)
|
||||||
{
|
{
|
||||||
// Energy saving mode is off. We notify the UI
|
// Energy saving mode is off. We notify the UI
|
||||||
// as fast as possible -- no matter the odds:
|
// as fast as possible -- no matter the odds:
|
||||||
|
@ -13,6 +13,7 @@ public partial class Changelog
|
|||||||
|
|
||||||
public static readonly Log[] LOGS =
|
public static readonly Log[] LOGS =
|
||||||
[
|
[
|
||||||
|
new (169, "v0.8.7, build 169 (2024-08-01 19:08 UTC)", "v0.8.7.md"),
|
||||||
new (168, "v0.8.6, build 168 (2024-08-01 19:50 UTC)", "v0.8.6.md"),
|
new (168, "v0.8.6, build 168 (2024-08-01 19:50 UTC)", "v0.8.6.md"),
|
||||||
new (167, "v0.8.5, build 167 (2024-07-28 16:44 UTC)", "v0.8.5.md"),
|
new (167, "v0.8.5, build 167 (2024-07-28 16:44 UTC)", "v0.8.5.md"),
|
||||||
new (166, "v0.8.4, build 166 (2024-07-26 06:53 UTC)", "v0.8.4.md"),
|
new (166, "v0.8.4, build 166 (2024-07-26 06:53 UTC)", "v0.8.4.md"),
|
||||||
|
@ -42,10 +42,35 @@ public partial class ConfigurationSlider<T> : ConfigurationBase where T : struct
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public Action<T> ValueUpdate { get; set; } = _ => { };
|
public Action<T> ValueUpdate { get; set; } = _ => { };
|
||||||
|
|
||||||
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
await this.EnsureMinMax();
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnParametersSetAsync()
|
||||||
|
{
|
||||||
|
await this.EnsureMinMax();
|
||||||
|
await base.OnParametersSetAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
private async Task OptionChanged(T updatedValue)
|
private async Task OptionChanged(T updatedValue)
|
||||||
{
|
{
|
||||||
this.ValueUpdate(updatedValue);
|
this.ValueUpdate(updatedValue);
|
||||||
await this.SettingsManager.StoreSettings();
|
await this.SettingsManager.StoreSettings();
|
||||||
await this.InformAboutChange();
|
await this.InformAboutChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task EnsureMinMax()
|
||||||
|
{
|
||||||
|
if (this.Value() < this.Min)
|
||||||
|
await this.OptionChanged(this.Min);
|
||||||
|
|
||||||
|
else if(this.Value() > this.Max)
|
||||||
|
await this.OptionChanged(this.Max);
|
||||||
|
}
|
||||||
}
|
}
|
17
app/MindWork AI Studio/Components/Blocks/EnumSelection.razor
Normal file
17
app/MindWork AI Studio/Components/Blocks/EnumSelection.razor
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@typeparam T
|
||||||
|
@inherits EnumSelectionBase
|
||||||
|
|
||||||
|
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
||||||
|
<MudSelect T="@T" Value="@this.Value" ValueChanged="@this.SelectionChanged" AdornmentIcon="@this.Icon" Adornment="Adornment.Start" Label="@this.Label" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateSelection">
|
||||||
|
@foreach (var value in Enum.GetValues<T>())
|
||||||
|
{
|
||||||
|
<MudSelectItem Value="@value">
|
||||||
|
@this.NameFunc(value)
|
||||||
|
</MudSelectItem>
|
||||||
|
}
|
||||||
|
</MudSelect>
|
||||||
|
@if (this.AllowOther && this.Value.Equals(this.OtherValue))
|
||||||
|
{
|
||||||
|
<MudTextField T="string" Text="@this.OtherInput" TextChanged="this.OtherInputChanged" Validation="@this.ValidateOther" Label="@this.LabelOther" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Immediate="@true"/>
|
||||||
|
}
|
||||||
|
</MudStack>
|
@ -0,0 +1,79 @@
|
|||||||
|
using AIStudio.Settings;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class EnumSelection<T> : EnumSelectionBase where T : struct, Enum
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public T Value { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<T> ValueChanged { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool AllowOther { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public T OtherValue { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string OtherInput { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<string> OtherInputChanged { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Label { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string LabelOther { get; set; } = "Other";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<T, string?> ValidateSelection { get; set; } = _ => null;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<string, string?> ValidateOther { get; set; } = _ => null;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Icon { get; set; } = Icons.Material.Filled.ArrowDropDown;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the custom name function for selecting the display name of an enum value.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">The enum type.</typeparam>
|
||||||
|
/// <param name="value">The enum value.</param>
|
||||||
|
/// <returns>The display name of the enum value.</returns>
|
||||||
|
[Parameter]
|
||||||
|
public Func<T, string> NameFunc { get; set; } = value => value.ToString();
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<T, Task> SelectionUpdated { get; set; } = _ => Task.CompletedTask;
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
private SettingsManager SettingsManager { get; set; } = null!;
|
||||||
|
|
||||||
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
// Configure the spellchecking for the user input:
|
||||||
|
this.SettingsManager.InjectSpellchecking(USER_INPUT_ATTRIBUTES);
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private async Task SelectionChanged(T value)
|
||||||
|
{
|
||||||
|
await this.ValueChanged.InvokeAsync(value);
|
||||||
|
await this.SelectionUpdated(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OtherValueChanged(string value)
|
||||||
|
{
|
||||||
|
await this.OtherInputChanged.InvokeAsync(value);
|
||||||
|
await this.SelectionUpdated(this.Value);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public abstract class EnumSelectionBase : ComponentBase
|
||||||
|
{
|
||||||
|
protected static readonly Dictionary<string, object?> USER_INPUT_ATTRIBUTES = new();
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
@typeparam T
|
||||||
|
|
||||||
|
<MudField Label="@this.Label" Variant="Variant.Outlined" Class="mb-3" Disabled="@this.Disabled()">
|
||||||
|
<MudSlider T="@T" Size="Size.Medium" Value="@this.Value" ValueChanged="@this.ValueUpdated" Min="@this.Min" Max="@this.Max" Step="@this.Step" Immediate="@true" Disabled="@this.Disabled()">
|
||||||
|
@this.Value @this.Unit
|
||||||
|
</MudSlider>
|
||||||
|
</MudField>
|
@ -0,0 +1,78 @@
|
|||||||
|
using System.Numerics;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class MudTextSlider<T> : ComponentBase where T : struct, INumber<T>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The minimum value for the slider.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public T Min { get; set; } = T.Zero;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The maximum value for the slider.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public T Max { get; set; } = T.One;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The step size for the slider.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public T Step { get; set; } = T.One;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unit to display next to the slider's value.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public string Unit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public T Value { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<T> ValueChanged { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The label to display above the slider.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public string Label { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<bool> Disabled { get; set; } = () => false;
|
||||||
|
|
||||||
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
await this.EnsureMinMax();
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnParametersSetAsync()
|
||||||
|
{
|
||||||
|
await this.EnsureMinMax();
|
||||||
|
await base.OnParametersSetAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private async Task EnsureMinMax()
|
||||||
|
{
|
||||||
|
if (this.Value < this.Min)
|
||||||
|
await this.ValueUpdated(this.Min);
|
||||||
|
|
||||||
|
else if(this.Value > this.Max)
|
||||||
|
await this.ValueUpdated(this.Max);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ValueUpdated(T value)
|
||||||
|
{
|
||||||
|
this.Value = value;
|
||||||
|
await this.ValueChanged.InvokeAsync(this.Value);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<MudField Label="@this.Label" Variant="Variant.Outlined" Class="mb-3" Disabled="@this.Disabled">
|
||||||
|
<MudSwitch T="bool" Value="@this.Value" ValueChanged="@this.ValueChanged" Color="@this.Color" Validation="@this.Validation" Disabled="@this.Disabled">
|
||||||
|
@(this.Value ? this.LabelOn : this.LabelOff)
|
||||||
|
</MudSwitch>
|
||||||
|
</MudField>
|
@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class MudTextSwitch : ComponentBase
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public string Label { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool Disabled { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool Value { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<bool> ValueChanged { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Color Color { get; set; } = Color.Primary;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<bool, string?> Validation { get; set; } = _ => null;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string LabelOn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string LabelOff { get; set; } = string.Empty;
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
@typeparam T
|
||||||
|
|
||||||
|
@if (this.ShowProgressAnimation)
|
||||||
|
{
|
||||||
|
<div class="pa-1">
|
||||||
|
<MudProgressLinear Color="Color.Primary" Indeterminate="true"/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<div class="pa-6">
|
||||||
|
<MudSlider T="int" Disabled="@true" Value="@this.StepValue" Min="@this.process.Min" Max="@this.process.Max" TickMarks="@true" Size="Size.Large" Variant="Variant.Filled" TickMarkLabels="@this.process.Labels" Class="mb-12"/>
|
||||||
|
</div>
|
@ -0,0 +1,16 @@
|
|||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class ProcessComponent<T> : ComponentBase where T : struct, Enum
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public bool ShowProgressAnimation { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public ProcessStepValue StepValue { get; set; }
|
||||||
|
|
||||||
|
private readonly Process<T> process = Process<T>.INSTANCE;
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
@using AIStudio.Settings
|
||||||
|
|
||||||
|
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
||||||
|
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
||||||
|
{
|
||||||
|
<MudSelectItem Value="@provider"/>
|
||||||
|
}
|
||||||
|
</MudSelect>
|
@ -0,0 +1,26 @@
|
|||||||
|
using AIStudio.Settings;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class ProviderSelection : ComponentBase
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public Settings.Provider ProviderSettings { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<Settings.Provider> ProviderSettingsChanged { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Func<Settings.Provider, string?> ValidateProvider { get; set; } = _ => null;
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
protected SettingsManager SettingsManager { get; set; } = null!;
|
||||||
|
|
||||||
|
private async Task SelectionChanged(Settings.Provider provider)
|
||||||
|
{
|
||||||
|
this.ProviderSettings = provider;
|
||||||
|
await this.ProviderSettingsChanged.InvokeAsync(provider);
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,8 @@
|
|||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
<MudField Label="Read content from web?" Variant="Variant.Outlined" Class="mb-3" Disabled="@this.AgentIsRunning">
|
<MudTextSwitch Label="Read content from web?" Disabled="@this.AgentIsRunning" @bind-Value="@this.showWebContentReader" LabelOn="Show web content options" LabelOff="Hide web content options" />
|
||||||
<MudSwitch T="bool" @bind-Value="@this.showWebContentReader" Color="Color.Primary" Disabled="@this.AgentIsRunning">
|
|
||||||
@(this.showWebContentReader ? "Show web content options" : "Hide web content options")
|
|
||||||
</MudSwitch>
|
|
||||||
</MudField>
|
|
||||||
|
|
||||||
@if (this.showWebContentReader)
|
@if (this.showWebContentReader)
|
||||||
{
|
{
|
||||||
<MudField Label="Cleanup content by using a LLM agent?" Variant="Variant.Outlined" Class="mb-3" Disabled="@this.AgentIsRunning">
|
<MudTextSwitch Label="Cleanup content by using a LLM agent?" @bind-Value="@this.useContentCleanerAgent" Validation="@this.ValidateProvider" Disabled="@this.AgentIsRunning" LabelOn="The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used." LabelOff="No content cleaning" />
|
||||||
<MudSwitch T="bool" @bind-Value="@this.useContentCleanerAgent" Color="Color.Primary" Validation="@this.ValidateProvider" Disabled="@this.AgentIsRunning">
|
|
||||||
@(this.useContentCleanerAgent ? "The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used." : "No content cleaning")
|
|
||||||
</MudSwitch>
|
|
||||||
</MudField>
|
|
||||||
<MudStack Row="@true" AlignItems="@AlignItems.Baseline" Class="mb-3">
|
<MudStack Row="@true" AlignItems="@AlignItems.Baseline" Class="mb-3">
|
||||||
<MudTextField T="string" Label="URL from which to load the content" @bind-Value="@this.providedURL" Validation="@this.ValidateURL" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Link" Placeholder="https://..." HelperText="Loads the content from your URL. Does not work when the content is hidden behind a paywall." Variant="Variant.Outlined" Immediate="@true" Disabled="@this.AgentIsRunning"/>
|
<MudTextField T="string" Label="URL from which to load the content" @bind-Value="@this.providedURL" Validation="@this.ValidateURL" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Link" Placeholder="https://..." HelperText="Loads the content from your URL. Does not work when the content is hidden behind a paywall." Variant="Variant.Outlined" Immediate="@true" Disabled="@this.AgentIsRunning"/>
|
||||||
<MudButton Disabled="@(!this.IsReady || this.AgentIsRunning)" Variant="Variant.Filled" Size="Size.Large" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Download" OnClick="() => this.LoadFromWeb()">
|
<MudButton Disabled="@(!this.IsReady || this.AgentIsRunning)" Variant="Variant.Filled" Size="Size.Large" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Download" OnClick="() => this.LoadFromWeb()">
|
||||||
@ -20,12 +11,7 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
@if (this.AgentIsRunning)
|
@if (this.AgentIsRunning)
|
||||||
{
|
{
|
||||||
<div class="pa-1">
|
<ProcessComponent T="ReadWebContentSteps" StepValue="@this.processStep" ShowProgressAnimation="@true"/>
|
||||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class=""/>
|
|
||||||
</div>
|
|
||||||
<div class="pa-6">
|
|
||||||
<MudSlider T="int" Disabled="@true" Value="@this.processStep" Min="@this.process.Min" Max="@this.process.Max" TickMarks="@true" Size="Size.Large" Variant="Variant.Filled" TickMarkLabels="@this.process.Labels" Class="mb-12"/>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</MudPaper>
|
</MudPaper>
|
@ -17,10 +17,7 @@ public partial class ReadWebContent : ComponentBase
|
|||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected SettingsManager SettingsManager { get; set; } = null!;
|
protected SettingsManager SettingsManager { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
protected IJSRuntime JsRuntime { get; init; } = null!;
|
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Content { get; set; } = string.Empty;
|
public string Content { get; set; } = string.Empty;
|
||||||
|
|
||||||
@ -63,8 +60,8 @@ public partial class ReadWebContent : ComponentBase
|
|||||||
if(this.PreselectContentCleanerAgent)
|
if(this.PreselectContentCleanerAgent)
|
||||||
this.useContentCleanerAgent = true;
|
this.useContentCleanerAgent = true;
|
||||||
|
|
||||||
if (this.SettingsManager.ConfigurationData.PreselectAgentTextContentCleanerOptions)
|
if (this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedAgentTextContentCleanerProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider);
|
||||||
else
|
else
|
||||||
this.providerSettings = this.ProviderSettings;
|
this.providerSettings = this.ProviderSettings;
|
||||||
|
|
||||||
@ -73,7 +70,7 @@ public partial class ReadWebContent : ComponentBase
|
|||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
if (!this.SettingsManager.ConfigurationData.PreselectAgentTextContentCleanerOptions)
|
if (!this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)
|
||||||
this.providerSettings = this.ProviderSettings;
|
this.providerSettings = this.ProviderSettings;
|
||||||
|
|
||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
@if (!this.performingUpdate)
|
@if (!this.performingUpdate)
|
||||||
{
|
{
|
||||||
<MudDrawerContainer Class="mud-height-full absolute">
|
<MudDrawerContainer Class="mud-height-full absolute">
|
||||||
<MudDrawer @bind-Open="@this.navBarOpen" MiniWidth="@NAVBAR_COLLAPSED_WIDTH" Width="@NAVBAR_EXPANDED_WIDTH" Elevation="1" Fixed="@true" Variant="@DrawerVariant.Mini" OpenMiniOnHover="@(this.SettingsManager.ConfigurationData.NavigationBehavior is NavBehavior.EXPAND_ON_HOVER)" Color="Color.Default">
|
<MudDrawer @bind-Open="@this.navBarOpen" MiniWidth="@NAVBAR_COLLAPSED_WIDTH" Width="@NAVBAR_EXPANDED_WIDTH" Elevation="1" Fixed="@true" Variant="@DrawerVariant.Mini" OpenMiniOnHover="@(this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.EXPAND_ON_HOVER)" Color="Color.Default">
|
||||||
<MudNavMenu>
|
<MudNavMenu>
|
||||||
@foreach (var navBarItem in NAV_ITEMS)
|
@foreach (var navBarItem in NAV_ITEMS)
|
||||||
{
|
{
|
||||||
if (this.SettingsManager.ConfigurationData.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
|
if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="@navBarItem.Name" Placement="Placement.Right">
|
<MudTooltip Text="@navBarItem.Name" Placement="Placement.Right">
|
||||||
<MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" IconColor="@navBarItem.IconColor">@navBarItem.Name</MudNavLink>
|
<MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" IconColor="@navBarItem.IconColor">@navBarItem.Name</MudNavLink>
|
||||||
|
@ -89,7 +89,7 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, IDis
|
|||||||
TemporaryChatService.Initialize();
|
TemporaryChatService.Initialize();
|
||||||
|
|
||||||
// Should the navigation bar be open by default?
|
// Should the navigation bar be open by default?
|
||||||
if(this.SettingsManager.ConfigurationData.NavigationBehavior is NavBehavior.ALWAYS_EXPAND)
|
if(this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.ALWAYS_EXPAND)
|
||||||
this.navBarOpen = true;
|
this.navBarOpen = true;
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -121,7 +121,7 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, IDis
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Event.CONFIGURATION_CHANGED:
|
case Event.CONFIGURATION_CHANGED:
|
||||||
if(this.SettingsManager.ConfigurationData.NavigationBehavior is NavBehavior.ALWAYS_EXPAND)
|
if(this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.ALWAYS_EXPAND)
|
||||||
this.navBarOpen = true;
|
this.navBarOpen = true;
|
||||||
else
|
else
|
||||||
this.navBarOpen = false;
|
this.navBarOpen = false;
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
@page "/assistant/agenda"
|
||||||
|
@using AIStudio.Tools
|
||||||
|
@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.inputTopic" Validation="@this.ValidateTopic" Label="Topic" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.EventNote" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Describe the topic of the meeting, seminar, etc. Is it about quantum computing, software engineering, or is it a general business meeting?" Placeholder="Project meeting" Class="mb-3"/>
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputContent" Validation="@this.ValidateContent" Label="Content list" Variant="Variant.Outlined" Lines="6" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Bullet list the content of the meeting, seminar, etc. roughly. Use dashes (-) to separate the items." Placeholder="@PLACEHOLDER_CONTENT" Class="mb-3" Immediate="@false" DebounceInterval="1_000" OnDebounceIntervalElapsed="@this.OnContentChanged" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.ListAlt"/>
|
||||||
|
<MudSelect T="string" Label="(Optional) What topics should be the focus?" MultiSelection="@true" @bind-SelectedValues="@this.selectedFoci" Variant="Variant.Outlined" Class="mb-3" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.ListAlt">
|
||||||
|
@foreach (var contentLine in this.contentLines)
|
||||||
|
{
|
||||||
|
@if(!this.justBriefly.Contains(contentLine))
|
||||||
|
{
|
||||||
|
<MudSelectItem T="string" Value="@contentLine">@contentLine</MudSelectItem>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</MudSelect>
|
||||||
|
|
||||||
|
<MudSelect T="string" Label="(Optional) What topics should only be briefly addressed?" MultiSelection="@true" @bind-SelectedValues="@this.justBriefly" Variant="Variant.Outlined" Class="mb-3" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.ListAlt">
|
||||||
|
@foreach (var contentLine in this.contentLines)
|
||||||
|
{
|
||||||
|
@if(!this.selectedFoci.Contains(contentLine))
|
||||||
|
{
|
||||||
|
<MudSelectItem T="string" Value="@contentLine">@contentLine</MudSelectItem>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</MudSelect>
|
||||||
|
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputObjective" Validation="@this.ValidateObjective" Label="Objective" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Flag" Variant="Variant.Outlined" Lines="3" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Describe the objective(s) of the meeting, seminar, etc. What should be achieved?" Placeholder="Discuss the current project status and plan the next steps." Class="mb-3"/>
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputModerator" Validation="@this.ValidateModerator" Label="Moderator" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Person3" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Who will moderate the meeting, seminar, etc.?" Placeholder="Jane Doe" Class="mb-3" />
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputDuration" Validation="@this.ValidateDuration" Label="Duration" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Schedule" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="How long will the meeting, seminar, etc. last? E.g., '2 hours', or '2 days (first day 8 hours, then 4 hours)', etc." Placeholder="2 hours" Class="mb-3"/>
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputStartTime" Validation="@this.ValidateStartTime" Label="Start time" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Schedule" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="When will the meeting, seminar, etc. start? E.g., '9:00 AM', or '9:00 AM (CET)', etc. When the meeting is a multi-day event, specify the start time for each day." Placeholder="9:00 AM" Class="mb-3"/>
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputWhoIsPresenting" Label="(Optional) Who is presenting?" Variant="Variant.Outlined" Lines="6" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="(Optional) List the persons who will present at the meeting, seminar, etc. Use dashes (-) to separate the items." Placeholder="@PLACEHOLDER_WHO_IS_PRESENTING" Class="mb-3"/>
|
||||||
|
<MudTextSwitch Label="Do the participants need to get to know each other first?" @bind-Value="@this.introduceParticipants" LabelOn="Yes, introduce participants" LabelOff="No, participants know each other" />
|
||||||
|
<EnumSelection T="NumberParticipants" @bind-Value="@this.numberParticipants" NameFunc="@(participants => participants.Name())" Icon="@Icons.Material.Filled.Group" Label="Number of participants" ValidateSelection="@this.ValidateNumberParticipants"/>
|
||||||
|
<MudTextSwitch Label="Should the participants be involved passively or actively?" @bind-Value="@this.activeParticipation" LabelOn="Active participation, like world café, discussions, etc." LabelOff="Passive participation, like presentations, lectures, etc." />
|
||||||
|
<MudTextSwitch Label="Is this a virtual event, e.g., a call or webinar?" @bind-Value="@this.isMeetingVirtual" LabelOn="Yes, this is a virtual event" LabelOff="No, this is a physical event" />
|
||||||
|
@if (!this.isMeetingVirtual)
|
||||||
|
{
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<MudTextField T="string" @bind-Text="@this.inputLocation" Validation="@this.ValidateLocation" Label="Location" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.MyLocation" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="Where will the meeting, seminar, etc. take place?" Placeholder="Hamburg, Germany" Class="mb-3"/>
|
||||||
|
<MudTextSwitch Label="Should there be a joint dinner?" @bind-Value="@this.goingToDinner" LabelOn="Yes, there should be a joint dinner" LabelOff="No, there should be no joint dinner" />
|
||||||
|
<MudTextSwitch Label="Should there be a social activity?" @bind-Value="@this.doingSocialActivity" LabelOn="Yes, there should be a social activity" LabelOff="No, there should be no social activity" />
|
||||||
|
<MudTextSwitch Label="Do participants need to arrive and depart?" @bind-Value="@this.needToArriveAndDepart" LabelOn="Yes, participants need to arrive and depart" LabelOff="No, participants do not need to arrive and depart" />
|
||||||
|
<MudStack Row="@true" Wrap="Wrap.Wrap">
|
||||||
|
<MudTextSlider T="int" Label="Approx. duration of the lunch break" @bind-Value="@this.durationLunchBreak" Min="30" Max="120" Step="5" Unit="minutes"/>
|
||||||
|
<MudTextSlider T="int" Label="Approx. duration of the coffee or tea breaks" @bind-Value="@this.durationBreaks" Min="10" Max="60" Step="5" Unit="minutes"/>
|
||||||
|
</MudStack>
|
||||||
|
</MudPaper>
|
||||||
|
}
|
||||||
|
|
||||||
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="Target language" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="Custom target language" />
|
||||||
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
|
|
||||||
|
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.CreateAgenda()">
|
||||||
|
Create agenda
|
||||||
|
</MudButton>
|
@ -0,0 +1,452 @@
|
|||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Pages.Agenda;
|
||||||
|
|
||||||
|
public partial class AssistantAgenda : AssistantBaseCore
|
||||||
|
{
|
||||||
|
protected override string Title => "Agenda Planner";
|
||||||
|
|
||||||
|
protected override string Description =>
|
||||||
|
"""
|
||||||
|
This agenda planner helps you create a structured agenda for your meeting or seminar. Just provide some basic
|
||||||
|
information about the event, and the assistant will generate an agenda for you. You can also specify the
|
||||||
|
duration, the start time, the location, the target language, and other details.
|
||||||
|
""";
|
||||||
|
|
||||||
|
protected override string SystemPrompt =>
|
||||||
|
$"""
|
||||||
|
You are a friendly assistant who supports the planning and consultation of events. You receive
|
||||||
|
metadata about an event and create an agenda from it. Additionally, you provide advice on what
|
||||||
|
the organizer and moderator should consider. When creating the agenda, you take into account that
|
||||||
|
time for questions and discussions needs to be scheduled. For large events, you take into account
|
||||||
|
the logistical challenges that come with an increasing number of participants.
|
||||||
|
|
||||||
|
If the user is planning interactions with participants, you know various methods. For example:
|
||||||
|
|
||||||
|
- **Townhall Meeting**: An open assembly where participants can ask questions and provide feedback directly to leaders or speakers. Good moderation is necessary to queue contributions and hand the floor to the respective person. Additionally, one person should take notes visible to all. Ideally, this should not be the moderator.
|
||||||
|
|
||||||
|
- **Speed Dating**: Short, structured interaction rounds where participants get the chance to quickly introduce themselves and make initial connections. A long row of tables is needed so that two people can sit opposite each other. A moderator with a stopwatch must ensure that participants rotate and change seats every 3 to 5 minutes.
|
||||||
|
|
||||||
|
- **World Café**: Participants discuss in small groups at tables and rotate after set intervals to exchange thoughts and develop ideas further. Each table needs a host. Notes should be taken on a flipchart or digitally at each table. At the end, the table hosts could present their insights to all participants in a plenary session.
|
||||||
|
|
||||||
|
- **Fishbowl**: A group discusses in an inner circle while a larger group listens from the outside. Occasionally, listeners can move into the inner circle to actively participate.
|
||||||
|
|
||||||
|
- **BarCamp (Unconference)**: Participants contribute to part of the agenda themselves and can act as both presenters and listeners. Anyone can propose and lead a session. However, there should be initial moderation to guide this meta-process.
|
||||||
|
|
||||||
|
- **Open Space Technology**: A method for large groups where participants bring up their own topics and then work intensively in small groups. At the end, the groups can present their findings to all participants in a plenary session.
|
||||||
|
|
||||||
|
- **Panel Discussion**: A group of experts discusses a specific topic in front of an audience, followed by a question-and-answer session.
|
||||||
|
|
||||||
|
- **Breakout Sessions**: Larger groups are divided into smaller, topic-related groups to discuss specific issues more deeply and interactively.
|
||||||
|
|
||||||
|
- **Interactive Polling**: Real-time surveys during the meeting or seminar using digital technology to collect immediate feedback from participants. With an increasing number of participants, technical requirements also become more complex: not every Wi-Fi router can handle several hundred or thousand devices. Additionally, the moderator or speaker must have a stable network connection to display the results. It would be problematic if the speaker depends on the same Wi-Fi as the participants: if the Wi-Fi crashes due to the high number of participants, the speaker cannot show the results. Therefore, a LAN for the speaker or the use of a mobile hotspot would be a better choice.
|
||||||
|
|
||||||
|
- **Peer Learning Groups**: Small groups of participants work together to learn from each other and collaboratively develop solutions for specific challenges.
|
||||||
|
|
||||||
|
- **Role Play/Simulation**: Participants take on roles to simulate certain scenarios, gaining practical experience and promoting dynamic discussions.
|
||||||
|
|
||||||
|
- **Round Table Discussions**: Small group discussions on specific topics, often without formal moderation, to encourage open and equal dialogue.
|
||||||
|
|
||||||
|
- **Mind Mapping**: A method for visualizing ideas and concepts, which can foster creative exchange within groups.
|
||||||
|
|
||||||
|
- **Case Study Analysis**: Groups analyze real or hypothetical case studies and present their solutions or insights.
|
||||||
|
|
||||||
|
- **Silent Meeting/Writing**: Participants write down their thoughts and questions, which are then collected and discussed to balance out loud or dominant voices.
|
||||||
|
|
||||||
|
- **Debate**: Participants argue for or against a specific topic, often with a moderator who ensures that the discussion remains constructive.
|
||||||
|
|
||||||
|
- **Workshops**: Interactive sessions where participants work together on specific tasks or challenges.
|
||||||
|
|
||||||
|
- **Brainstorming**: A method for generating ideas in a group setting, often with a focus on quantity and creativity.
|
||||||
|
|
||||||
|
- **Design Thinking**: A structured approach to innovation solutions. Design thinking is structured in six phases: understand, observe, point of view, ideate, prototype, and test. Depending on the number of participants, there are two moderates needed. One moderator leads the process, the other supports the participants in their work. Design thinking may takes up to two days.
|
||||||
|
|
||||||
|
You output the agenda in the following Markdown format:
|
||||||
|
|
||||||
|
# [Agenda Title]
|
||||||
|
- 09:00 - 09:05 (5 minutes): Welcome
|
||||||
|
- 09:05 - 09:15 (10 minutes): Introduction
|
||||||
|
- ...
|
||||||
|
{this.SystemPromptSocialActivity()}
|
||||||
|
{this.SystemPromptDinner()}
|
||||||
|
|
||||||
|
# Organizational notes
|
||||||
|
[Your advice for the organizer goes here, like room setup, technical requirements, etc.]
|
||||||
|
|
||||||
|
# Moderation notes
|
||||||
|
[Your advice for the moderator goes here]
|
||||||
|
|
||||||
|
Output the agenda in the following language: {this.PromptLanguage()}.
|
||||||
|
""";
|
||||||
|
|
||||||
|
private const string PLACEHOLDER_CONTENT = """
|
||||||
|
- Project status
|
||||||
|
- We need to discuss how to proceed
|
||||||
|
- Problem solving in work package 3 possible?
|
||||||
|
- Concerns of the members
|
||||||
|
""";
|
||||||
|
|
||||||
|
private const string PLACEHOLDER_WHO_IS_PRESENTING = """
|
||||||
|
- John Doe: Project status
|
||||||
|
- Mary Jane: Work package 3
|
||||||
|
""";
|
||||||
|
|
||||||
|
private string inputTopic = string.Empty;
|
||||||
|
private string inputName = string.Empty;
|
||||||
|
private string inputContent = string.Empty;
|
||||||
|
private string inputDuration = string.Empty;
|
||||||
|
private string inputStartTime = string.Empty;
|
||||||
|
private IEnumerable<string> selectedFoci = new HashSet<string>();
|
||||||
|
private IEnumerable<string> justBriefly = new HashSet<string>();
|
||||||
|
private string inputObjective = string.Empty;
|
||||||
|
private string inputModerator = string.Empty;
|
||||||
|
private CommonLanguages selectedTargetLanguage;
|
||||||
|
private string customTargetLanguage = string.Empty;
|
||||||
|
private bool introduceParticipants;
|
||||||
|
private bool isMeetingVirtual = true;
|
||||||
|
private string inputLocation = string.Empty;
|
||||||
|
private bool goingToDinner;
|
||||||
|
private bool doingSocialActivity;
|
||||||
|
private bool needToArriveAndDepart;
|
||||||
|
private int durationLunchBreak;
|
||||||
|
private int durationBreaks;
|
||||||
|
private bool activeParticipation;
|
||||||
|
private NumberParticipants numberParticipants;
|
||||||
|
private string inputWhoIsPresenting = string.Empty;
|
||||||
|
|
||||||
|
private readonly List<string> contentLines = [];
|
||||||
|
|
||||||
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
if (this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)
|
||||||
|
{
|
||||||
|
this.inputTopic = this.SettingsManager.ConfigurationData.Agenda.PreselectTopic;
|
||||||
|
this.inputName = this.SettingsManager.ConfigurationData.Agenda.PreselectName;
|
||||||
|
this.inputDuration = this.SettingsManager.ConfigurationData.Agenda.PreselectDuration;
|
||||||
|
this.inputStartTime = this.SettingsManager.ConfigurationData.Agenda.PreselectStartTime;
|
||||||
|
this.inputObjective = this.SettingsManager.ConfigurationData.Agenda.PreselectObjective;
|
||||||
|
this.inputModerator = this.SettingsManager.ConfigurationData.Agenda.PreselectModerator;
|
||||||
|
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.Agenda.PreselectedTargetLanguage;
|
||||||
|
this.customTargetLanguage = this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage;
|
||||||
|
this.introduceParticipants = this.SettingsManager.ConfigurationData.Agenda.PreselectIntroduceParticipants;
|
||||||
|
this.isMeetingVirtual = this.SettingsManager.ConfigurationData.Agenda.PreselectIsMeetingVirtual;
|
||||||
|
this.inputLocation = this.SettingsManager.ConfigurationData.Agenda.PreselectLocation;
|
||||||
|
this.goingToDinner = this.SettingsManager.ConfigurationData.Agenda.PreselectJointDinner;
|
||||||
|
this.doingSocialActivity = this.SettingsManager.ConfigurationData.Agenda.PreselectSocialActivity;
|
||||||
|
this.needToArriveAndDepart = this.SettingsManager.ConfigurationData.Agenda.PreselectArriveAndDepart;
|
||||||
|
this.durationLunchBreak = this.SettingsManager.ConfigurationData.Agenda.PreselectLunchTime;
|
||||||
|
this.durationBreaks = this.SettingsManager.ConfigurationData.Agenda.PreselectBreakTime;
|
||||||
|
this.activeParticipation = this.SettingsManager.ConfigurationData.Agenda.PreselectActiveParticipation;
|
||||||
|
this.numberParticipants = this.SettingsManager.ConfigurationData.Agenda.PreselectNumberParticipants;
|
||||||
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider);
|
||||||
|
}
|
||||||
|
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void OnContentChanged(string content)
|
||||||
|
{
|
||||||
|
var previousSelectedFoci = new HashSet<string>();
|
||||||
|
var previousJustBriefly = new HashSet<string>();
|
||||||
|
|
||||||
|
this.contentLines.Clear();
|
||||||
|
foreach (var line in content.AsSpan().EnumerateLines())
|
||||||
|
{
|
||||||
|
var trimmedLine = line.Trim();
|
||||||
|
if (trimmedLine.StartsWith("-"))
|
||||||
|
trimmedLine = trimmedLine[1..].Trim();
|
||||||
|
|
||||||
|
if (trimmedLine.Length == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var finalLine = trimmedLine.ToString();
|
||||||
|
if(this.selectedFoci.Any(x => x.StartsWith(finalLine, StringComparison.InvariantCultureIgnoreCase)))
|
||||||
|
previousSelectedFoci.Add(finalLine);
|
||||||
|
|
||||||
|
if(this.justBriefly.Any(x => x.StartsWith(finalLine, StringComparison.InvariantCultureIgnoreCase)))
|
||||||
|
previousJustBriefly.Add(finalLine);
|
||||||
|
|
||||||
|
this.contentLines.Add(finalLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selectedFoci = previousSelectedFoci;
|
||||||
|
this.justBriefly = previousJustBriefly;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateLocation(string location)
|
||||||
|
{
|
||||||
|
if(!this.isMeetingVirtual && string.IsNullOrWhiteSpace(location))
|
||||||
|
return "Please provide a location for the meeting or the seminar.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateNumberParticipants(NumberParticipants selectedSize)
|
||||||
|
{
|
||||||
|
if(selectedSize is NumberParticipants.NOT_SPECIFIED)
|
||||||
|
return "Please select the number of participants.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateTargetLanguage(CommonLanguages language)
|
||||||
|
{
|
||||||
|
if(language is CommonLanguages.AS_IS)
|
||||||
|
return "Please select a target language for the agenda.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateDuration(string duration)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(duration))
|
||||||
|
return "Please provide a duration for the meeting or the seminar, e.g. '2 hours', or '2 days (8 hours and 4 hours)', etc.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateStartTime(string startTime)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(startTime))
|
||||||
|
return "Please provide a start time for the meeting or the seminar. When the meeting is a multi-day event, specify the start time for each day, e.g. '9:00 AM, 10:00 AM', etc.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateCustomLanguage(string language)
|
||||||
|
{
|
||||||
|
if(this.selectedTargetLanguage == CommonLanguages.OTHER && string.IsNullOrWhiteSpace(language))
|
||||||
|
return "Please provide a custom language.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateTopic(string topic)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(topic))
|
||||||
|
return "Please provide a topic for the agenda. What is the meeting or the seminar about?";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateName(string name)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(name))
|
||||||
|
return "Please provide a name for the meeting or the seminar.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateContent(string content)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(content))
|
||||||
|
return "Please provide some content for the agenda. What are the main points of the meeting or the seminar?";
|
||||||
|
|
||||||
|
var lines = content.Split('\n');
|
||||||
|
foreach (var line in lines)
|
||||||
|
if(!line.TrimStart().StartsWith('-'))
|
||||||
|
return "Please start each line of your content list with a dash (-) to create a bullet point list.";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateObjective(string objective)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(objective))
|
||||||
|
return "Please provide an objective for the meeting or the seminar. What do you want to achieve?";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? ValidateModerator(string moderator)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(moderator))
|
||||||
|
return "Please provide a moderator for the meeting or the seminar. Who will lead the discussion?";
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CreateAgenda()
|
||||||
|
{
|
||||||
|
await this.form!.Validate();
|
||||||
|
if (!this.inputIsValid)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.CreateChatThread();
|
||||||
|
var time = this.AddUserRequest(
|
||||||
|
$"""
|
||||||
|
Create an agenda for the meeting or seminar wit the title '{this.inputName}' using the following details:
|
||||||
|
|
||||||
|
- The overall topic is '{this.inputTopic}'.
|
||||||
|
- The objective of the meeting is '{this.inputObjective}'.
|
||||||
|
- The moderator is '{this.inputModerator}'.
|
||||||
|
- The planned duration is '{this.inputDuration}'.
|
||||||
|
- The planned start time is '{this.inputStartTime}'.
|
||||||
|
{this.PromptGettingToKnowEachOther()}
|
||||||
|
- The number of participants is '{this.numberParticipants.Name()}'.
|
||||||
|
{this.PromptActiveParticipation()}
|
||||||
|
{this.PromptVirtualMeeting()}
|
||||||
|
{this.PromptPhysicalMeeting()}
|
||||||
|
|
||||||
|
Here is draft what was planned for the meeting:
|
||||||
|
{this.inputContent}
|
||||||
|
|
||||||
|
Please do not follow this draft strictly. It is just a suggestion.
|
||||||
|
{this.PromptFoci()}
|
||||||
|
{this.PromptBriefly()}
|
||||||
|
{this.PromptWhoIsPresenting()}
|
||||||
|
""");
|
||||||
|
|
||||||
|
await this.AddAIResponseAsync(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptLanguage()
|
||||||
|
{
|
||||||
|
if(this.selectedTargetLanguage is CommonLanguages.OTHER)
|
||||||
|
return this.customTargetLanguage;
|
||||||
|
|
||||||
|
return this.selectedTargetLanguage.Name();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptPhysicalMeeting()
|
||||||
|
{
|
||||||
|
if(this.isMeetingVirtual)
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
return $"""
|
||||||
|
- The meeting takes place at the following location: '{this.inputLocation}'.
|
||||||
|
{this.PromptJoiningDinner()}
|
||||||
|
{this.PromptSocialActivity()}
|
||||||
|
{this.PromptArriveAndDepart()}
|
||||||
|
- In case a lunch break is necessary, the break should about {this.durationLunchBreak} minutes long.
|
||||||
|
- In case any breaks are necessary, the breaks should be about {this.durationBreaks} minutes long.
|
||||||
|
""";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptArriveAndDepart()
|
||||||
|
{
|
||||||
|
if (this.needToArriveAndDepart)
|
||||||
|
return "- The participants should have time to arrive and depart.";
|
||||||
|
|
||||||
|
return "- The participants do not need to arrive and depart.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptSocialActivity()
|
||||||
|
{
|
||||||
|
if (this.doingSocialActivity)
|
||||||
|
return "- The participants will engage in a social activity after the meeting or seminar. This can be a team-building exercise, a sightseeing tour, or a visit to a local attraction. Please make a recommendation for an activity at '{this.inputLocation}'.";
|
||||||
|
|
||||||
|
return "- The participants will not engage in a social activity after the meeting or seminar.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string SystemPromptSocialActivity()
|
||||||
|
{
|
||||||
|
if(this.doingSocialActivity)
|
||||||
|
return """
|
||||||
|
- 16:00 Departure to the social event [Consider the time needed to get to the location].
|
||||||
|
- 17:00 [Insert your advice for the social activity here].
|
||||||
|
""";
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string SystemPromptDinner()
|
||||||
|
{
|
||||||
|
if(this.goingToDinner)
|
||||||
|
return """
|
||||||
|
- 19:00 Departure to the restaurant [Consider the time needed to get to the restaurant].
|
||||||
|
- 20:00 [Insert your advice for the dinner here.].
|
||||||
|
""";
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptJoiningDinner()
|
||||||
|
{
|
||||||
|
if (this.goingToDinner)
|
||||||
|
return $"- The participants will join for a dinner after the meeting or seminar. Please make a recommendation for a restaurant at '{this.inputLocation}'.";
|
||||||
|
|
||||||
|
return "- The participants will not join for a dinner after the meeting or seminar.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptVirtualMeeting()
|
||||||
|
{
|
||||||
|
if (this.isMeetingVirtual)
|
||||||
|
return "- The meeting or seminar will be held virtually, e.g, a call or webinar. The participants will join online.";
|
||||||
|
|
||||||
|
return "- The meeting or seminar will be held in person.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptActiveParticipation()
|
||||||
|
{
|
||||||
|
if (this.activeParticipation)
|
||||||
|
return "- The participants should actively participate in the meeting or seminar. This can be done through discussions, questions, and contributions to the content.";
|
||||||
|
|
||||||
|
return "- The participants do not need to actively participate.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptGettingToKnowEachOther()
|
||||||
|
{
|
||||||
|
if (this.introduceParticipants)
|
||||||
|
return "- The participants should introduce themselves to get to know each other. This can be done in a round or in pairs. The moderator should ensure that everyone has the opportunity to speak.";
|
||||||
|
|
||||||
|
return "- The participants do not need to introduce themselves.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptFoci()
|
||||||
|
{
|
||||||
|
if (this.selectedFoci.Any())
|
||||||
|
{
|
||||||
|
return $"""
|
||||||
|
|
||||||
|
Out of this content, the following points should be focused on:
|
||||||
|
{this.ConvertItemsToMarkdown(this.selectedFoci)}
|
||||||
|
""";
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptBriefly()
|
||||||
|
{
|
||||||
|
if (this.justBriefly.Any())
|
||||||
|
{
|
||||||
|
return $"""
|
||||||
|
|
||||||
|
The following points should be just briefly mentioned:
|
||||||
|
{this.ConvertItemsToMarkdown(this.justBriefly)}
|
||||||
|
""";
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string PromptWhoIsPresenting()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.inputWhoIsPresenting))
|
||||||
|
{
|
||||||
|
return $"""
|
||||||
|
|
||||||
|
The following persons will present the content:
|
||||||
|
{this.inputWhoIsPresenting}
|
||||||
|
""";
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string ConvertItemsToMarkdown(IEnumerable<string> items)
|
||||||
|
{
|
||||||
|
var markdown = new StringBuilder();
|
||||||
|
foreach (var item in items)
|
||||||
|
markdown.AppendLine($"- {item}");
|
||||||
|
|
||||||
|
return markdown.ToString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
namespace AIStudio.Components.Pages.Agenda;
|
||||||
|
|
||||||
|
public enum NumberParticipants
|
||||||
|
{
|
||||||
|
NOT_SPECIFIED,
|
||||||
|
|
||||||
|
PEER_TO_PEER, // 2 participants
|
||||||
|
|
||||||
|
SMALL_GROUP, // 3 - 5 participants
|
||||||
|
LARGE_GROUP, // 6 - 12 participants
|
||||||
|
MULTIPLE_SMALL_GROUPS, // 13 - 20 participants
|
||||||
|
MULTIPLE_LARGE_GROUPS, // 21 - 30 participants
|
||||||
|
|
||||||
|
SYMPOSIUM, // 31 - 100 participants
|
||||||
|
CONFERENCE, // 101 - 200 participants
|
||||||
|
CONGRESS, // 201 - 1000 participants
|
||||||
|
LARGE_EVENT, // 1000+ participants
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
namespace AIStudio.Components.Pages.Agenda;
|
||||||
|
|
||||||
|
public static class NumberParticipantsExtensions
|
||||||
|
{
|
||||||
|
public static string Name(this NumberParticipants numberParticipants) => numberParticipants switch
|
||||||
|
{
|
||||||
|
NumberParticipants.NOT_SPECIFIED => "Please select how many participants are expected",
|
||||||
|
|
||||||
|
NumberParticipants.PEER_TO_PEER => "2 (peer to peer)",
|
||||||
|
|
||||||
|
NumberParticipants.SMALL_GROUP => "3 - 5 (small group)",
|
||||||
|
NumberParticipants.LARGE_GROUP => "6 - 12 (large group)",
|
||||||
|
NumberParticipants.MULTIPLE_SMALL_GROUPS => "13 - 20 (multiple small groups)",
|
||||||
|
NumberParticipants.MULTIPLE_LARGE_GROUPS => "21 - 30 (multiple large groups)",
|
||||||
|
|
||||||
|
NumberParticipants.SYMPOSIUM => "31 - 100 (symposium)",
|
||||||
|
NumberParticipants.CONFERENCE => "101 - 200 (conference)",
|
||||||
|
NumberParticipants.CONGRESS => "201 - 1,000 (congress)",
|
||||||
|
|
||||||
|
NumberParticipants.LARGE_EVENT => "1,000+ (large event)",
|
||||||
|
|
||||||
|
_ => "Unknown"
|
||||||
|
};
|
||||||
|
}
|
@ -18,6 +18,7 @@
|
|||||||
Business
|
Business
|
||||||
</MudText>
|
</MudText>
|
||||||
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
|
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
|
||||||
|
<AssistantBlock Name="Agenda Planner" Description="Generate an agenda for a given meeting, seminar, etc." Icon="@Icons.Material.Filled.CalendarToday" Link="/assistant/agenda"/>
|
||||||
<AssistantBlock Name="Icon Finder" Description="Using a LLM to find an icon for a given context." Icon="@Icons.Material.Filled.FindInPage" Link="/assistant/icons"/>
|
<AssistantBlock Name="Icon Finder" Description="Using a LLM to find an icon for a given context." Icon="@Icons.Material.Filled.FindInPage" Link="/assistant/icons"/>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
@page "/chat"
|
@page "/chat"
|
||||||
@using AIStudio.Chat
|
@using AIStudio.Chat
|
||||||
@using AIStudio.Settings
|
|
||||||
@using AIStudio.Settings.DataModel
|
@using AIStudio.Settings.DataModel
|
||||||
|
|
||||||
@inherits MSGComponentBase
|
@inherits MSGComponentBase
|
||||||
@ -16,13 +15,7 @@
|
|||||||
}
|
}
|
||||||
</MudText>
|
</MudText>
|
||||||
|
|
||||||
<MudSelect T="Provider" @bind-Value="@this.providerSettings" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-2 rounded-lg" Variant="Variant.Outlined">
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings"/>
|
||||||
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@provider"/>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
|
|
||||||
<InnerScrolling HeaderHeight="12.3em">
|
<InnerScrolling HeaderHeight="12.3em">
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
@if (this.chatThread is not null)
|
@if (this.chatThread is not null)
|
||||||
@ -39,14 +32,14 @@
|
|||||||
</MudPaper>
|
</MudPaper>
|
||||||
<MudPaper Class="mt-1" Outlined="@true">
|
<MudPaper Class="mt-1" Outlined="@true">
|
||||||
<MudToolBar WrapContent="true">
|
<MudToolBar WrapContent="true">
|
||||||
@if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="Your workspaces" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
<MudTooltip Text="Your workspaces" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.SnippetFolder" OnClick="() => this.ToggleWorkspaces()"/>
|
<MudIconButton Icon="@Icons.Material.Filled.SnippetFolder" OnClick="() => this.ToggleWorkspaces()"/>
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY)
|
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="Save chat" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
<MudTooltip Text="Save chat" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Save" OnClick="() => this.SaveThread()" Disabled="@(!this.CanThreadBeSaved)"/>
|
<MudIconButton Icon="@Icons.Material.Filled.Save" OnClick="() => this.SaveThread()" Disabled="@(!this.CanThreadBeSaved)"/>
|
||||||
@ -64,14 +57,14 @@
|
|||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="Delete this chat & start a new one" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
<MudTooltip Text="Delete this chat & start a new one" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Refresh" OnClick="() => this.StartNewChat(useSameWorkspace: true, deletePreviousChat: true)" Disabled="@(!this.CanThreadBeSaved)"/>
|
<MudIconButton Icon="@Icons.Material.Filled.Refresh" OnClick="() => this.StartNewChat(useSameWorkspace: true, deletePreviousChat: true)" Disabled="@(!this.CanThreadBeSaved)"/>
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="Move the chat to a workspace, or to another if it is already in one." Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
<MudTooltip Text="Move the chat to a workspace, or to another if it is already in one." Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.MoveToInbox" Disabled="@(!this.CanThreadBeSaved)" OnClick="() => this.MoveChatToWorkspace()"/>
|
<MudIconButton Icon="@Icons.Material.Filled.MoveToInbox" Disabled="@(!this.CanThreadBeSaved)" OnClick="() => this.MoveChatToWorkspace()"/>
|
||||||
@ -82,7 +75,7 @@
|
|||||||
</FooterContent>
|
</FooterContent>
|
||||||
</InnerScrolling>
|
</InnerScrolling>
|
||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior != WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior != WorkspaceStorageBehavior.DISABLE_WORKSPACES)
|
||||||
{
|
{
|
||||||
<MudDrawer @bind-Open="@this.workspacesVisible" Width="40em" Height="100%" Anchor="Anchor.Start" Variant="DrawerVariant.Temporary" Elevation="1">
|
<MudDrawer @bind-Open="@this.workspacesVisible" Width="40em" Height="100%" Anchor="Anchor.Start" Variant="DrawerVariant.Temporary" Elevation="1">
|
||||||
<MudDrawerHeader>
|
<MudDrawerHeader>
|
||||||
|
@ -57,9 +57,9 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
// Configure the spellchecking for the user input:
|
// Configure the spellchecking for the user input:
|
||||||
this.SettingsManager.InjectSpellchecking(USER_INPUT_ATTRIBUTES);
|
this.SettingsManager.InjectSpellchecking(USER_INPUT_ATTRIBUTES);
|
||||||
|
|
||||||
if (this.SettingsManager.ConfigurationData.PreselectChatOptions)
|
if (this.SettingsManager.ConfigurationData.Chat.PreselectOptions)
|
||||||
{
|
{
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedChatProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.Chat.PreselectedProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -120,7 +120,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Save the chat:
|
// Save the chat:
|
||||||
if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
||||||
{
|
{
|
||||||
await this.SaveThread();
|
await this.SaveThread();
|
||||||
this.hasUnsavedChanges = false;
|
this.hasUnsavedChanges = false;
|
||||||
@ -160,7 +160,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(), this.JsRuntime, this.SettingsManager, this.providerSettings.Model, this.chatThread);
|
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(), this.JsRuntime, this.SettingsManager, this.providerSettings.Model, this.chatThread);
|
||||||
|
|
||||||
// Save the chat:
|
// Save the chat:
|
||||||
if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
||||||
{
|
{
|
||||||
await this.SaveThread();
|
await this.SaveThread();
|
||||||
this.hasUnsavedChanges = false;
|
this.hasUnsavedChanges = false;
|
||||||
@ -183,7 +183,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
var isModifier = keyEvent.AltKey || keyEvent.CtrlKey || keyEvent.MetaKey || keyEvent.ShiftKey;
|
var isModifier = keyEvent.AltKey || keyEvent.CtrlKey || keyEvent.MetaKey || keyEvent.ShiftKey;
|
||||||
|
|
||||||
// Depending on the user's settings, might react to shortcuts:
|
// Depending on the user's settings, might react to shortcuts:
|
||||||
switch (this.SettingsManager.ConfigurationData.ShortcutSendBehavior)
|
switch (this.SettingsManager.ConfigurationData.Chat.ShortcutSendBehavior)
|
||||||
{
|
{
|
||||||
case SendBehavior.ENTER_IS_SENDING:
|
case SendBehavior.ENTER_IS_SENDING:
|
||||||
if (!isModifier && isEnter)
|
if (!isModifier && isEnter)
|
||||||
@ -232,7 +232,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
|
|
||||||
private async Task StartNewChat(bool useSameWorkspace = false, bool deletePreviousChat = false)
|
private async Task StartNewChat(bool useSameWorkspace = false, bool deletePreviousChat = false)
|
||||||
{
|
{
|
||||||
if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY && this.hasUnsavedChanges)
|
if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY && this.hasUnsavedChanges)
|
||||||
{
|
{
|
||||||
var dialogParameters = new DialogParameters
|
var dialogParameters = new DialogParameters
|
||||||
{
|
{
|
||||||
@ -294,7 +294,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
if(this.workspaces is null)
|
if(this.workspaces is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY && this.hasUnsavedChanges)
|
if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY && this.hasUnsavedChanges)
|
||||||
{
|
{
|
||||||
var confirmationDialogParameters = new DialogParameters
|
var confirmationDialogParameters = new DialogParameters
|
||||||
{
|
{
|
||||||
@ -385,7 +385,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
switch (triggeredEvent)
|
switch (triggeredEvent)
|
||||||
{
|
{
|
||||||
case Event.HAS_CHAT_UNSAVED_CHANGES:
|
case Event.HAS_CHAT_UNSAVED_CHANGES:
|
||||||
if(this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
if(this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
||||||
return Task.FromResult((TResult?) (object) false);
|
return Task.FromResult((TResult?) (object) false);
|
||||||
|
|
||||||
return Task.FromResult((TResult?)(object)this.hasUnsavedChanges);
|
return Task.FromResult((TResult?)(object)this.hasUnsavedChanges);
|
||||||
@ -400,7 +400,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
|
|||||||
|
|
||||||
public async ValueTask DisposeAsync()
|
public async ValueTask DisposeAsync()
|
||||||
{
|
{
|
||||||
if(this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
if(this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
|
||||||
{
|
{
|
||||||
await this.SaveThread();
|
await this.SaveThread();
|
||||||
this.hasUnsavedChanges = false;
|
this.hasUnsavedChanges = false;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@page "/assistant/coding"
|
@page "/assistant/coding"
|
||||||
@using AIStudio.Settings
|
|
||||||
@inherits AssistantBaseCore
|
@inherits AssistantBaseCore
|
||||||
|
|
||||||
<MudExpansionPanels Class="mb-3">
|
<MudExpansionPanels Class="mb-3">
|
||||||
@ -16,9 +15,7 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
|
|
||||||
<MudStack Row="@false" Class="mb-3">
|
<MudStack Row="@false" Class="mb-3">
|
||||||
<MudSwitch T="bool" @bind-Value="@this.provideCompilerMessages" Color="Color.Primary">
|
<MudTextSwitch Label="Do you want to provide compiler messages?" @bind-Value="@this.provideCompilerMessages" LabelOn="Yes, provide compiler messages" LabelOff="No, there are no compiler messages" />
|
||||||
@(this.provideCompilerMessages ? "Provide compiler messages" : "Provide no compiler messages")
|
|
||||||
</MudSwitch>
|
|
||||||
@if (this.provideCompilerMessages)
|
@if (this.provideCompilerMessages)
|
||||||
{
|
{
|
||||||
<MudTextField T="string" @bind-Text="@this.compilerMessages" Validation="@this.ValidatingCompilerMessages" AdornmentIcon="@Icons.Material.Filled.Error" Adornment="Adornment.Start" Label="Compiler messages" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.compilerMessages" Validation="@this.ValidatingCompilerMessages" AdornmentIcon="@Icons.Material.Filled.Error" Adornment="Adornment.Start" Label="Compiler messages" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
@ -26,13 +23,7 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
|
|
||||||
<MudTextField T="string" @bind-Text="@this.questions" Validation="@this.ValidateQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionMark" Adornment="Adornment.Start" Label="Your question(s)" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.questions" Validation="@this.ValidateQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionMark" Adornment="Adornment.Start" Label="Your question(s)" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
<MudSelect T="Provider" @bind-Value="@this.providerSettings" Validation="@this.ValidatingProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
|
||||||
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@provider"/>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
|
|
||||||
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="() => this.GetSupport()" Class="mb-3">
|
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="() => this.GetSupport()" Class="mb-3">
|
||||||
Get support
|
Get support
|
||||||
|
@ -33,10 +33,10 @@ public partial class AssistantCoding : AssistantBaseCore
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (this.SettingsManager.ConfigurationData.PreselectCodingOptions)
|
if (this.SettingsManager.ConfigurationData.Coding.PreselectOptions)
|
||||||
{
|
{
|
||||||
this.provideCompilerMessages = this.SettingsManager.ConfigurationData.PreselectCodingCompilerMessages;
|
this.provideCompilerMessages = this.SettingsManager.ConfigurationData.Coding.PreselectCompilerMessages;
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedCodingProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.Coding.PreselectedProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -68,8 +68,8 @@ public partial class AssistantCoding : AssistantBaseCore
|
|||||||
this.codingContexts.Add(new()
|
this.codingContexts.Add(new()
|
||||||
{
|
{
|
||||||
Id = $"Context {this.codingContexts.Count + 1}",
|
Id = $"Context {this.codingContexts.Count + 1}",
|
||||||
Language = this.SettingsManager.ConfigurationData.PreselectCodingOptions ? this.SettingsManager.ConfigurationData.PreselectedCodingLanguage : default,
|
Language = this.SettingsManager.ConfigurationData.Coding.PreselectOptions ? this.SettingsManager.ConfigurationData.Coding.PreselectedProgrammingLanguage : default,
|
||||||
OtherLanguage = this.SettingsManager.ConfigurationData.PreselectCodingOptions ? this.SettingsManager.ConfigurationData.PreselectedCodingOtherLanguage : string.Empty,
|
OtherLanguage = this.SettingsManager.ConfigurationData.Coding.PreselectOptions ? this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage : string.Empty,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@page "/assistant/icons"
|
@page "/assistant/icons"
|
||||||
@using AIStudio.Settings
|
|
||||||
@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"/>
|
||||||
@ -16,13 +15,7 @@
|
|||||||
<MudButton Href="@this.selectedIconSource.URL()" Target="_blank" Variant="Variant.Filled" Size="Size.Medium">Open website</MudButton>
|
<MudButton Href="@this.selectedIconSource.URL()" Target="_blank" Variant="Variant.Filled" Size="Size.Medium">Open website</MudButton>
|
||||||
}
|
}
|
||||||
</MudStack>
|
</MudStack>
|
||||||
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
<MudSelect T="Provider" @bind-Value="@this.providerSettings" Validation="@this.ValidatingProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
|
||||||
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@provider"/>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
|
|
||||||
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.FindIcon()">
|
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.FindIcon()">
|
||||||
Find icon
|
Find icon
|
||||||
|
@ -9,10 +9,10 @@ public partial class AssistantIconFinder : AssistantBaseCore
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (this.SettingsManager.ConfigurationData.PreselectIconOptions)
|
if (this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)
|
||||||
{
|
{
|
||||||
this.selectedIconSource = this.SettingsManager.ConfigurationData.PreselectedIconSource;
|
this.selectedIconSource = this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource;
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedIconProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
|
@ -8,146 +8,181 @@
|
|||||||
|
|
||||||
<MudText Typo="Typo.h3" Class="mb-12">Settings</MudText>
|
<MudText Typo="Typo.h3" Class="mb-12">Settings</MudText>
|
||||||
|
|
||||||
<InnerScrolling HeaderHeight="6em">
|
<InnerScrolling HeaderHeight="10em">
|
||||||
<MudPaper Class="pa-3 mb-8 border-solid border rounded-lg">
|
<MudExpansionPanels Class="mb-3" MultiExpansion="@false">
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">Configured Providers</MudText>
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Layers" HeaderText="Configure Providers">
|
||||||
<MudTable Items="@this.SettingsManager.ConfigurationData.Providers" Class="border-dashed border rounded-lg">
|
<MudText Typo="Typo.h4" Class="mb-3">Configured Providers</MudText>
|
||||||
<ColGroup>
|
<MudTable Items="@this.SettingsManager.ConfigurationData.Providers" Class="border-dashed border rounded-lg">
|
||||||
<col style="width: 3em;"/>
|
<ColGroup>
|
||||||
<col style="width: 12em;"/>
|
<col style="width: 3em;"/>
|
||||||
<col style="width: 12em;"/>
|
<col style="width: 12em;"/>
|
||||||
<col/>
|
<col style="width: 12em;"/>
|
||||||
<col style="width: 34em;"/>
|
<col/>
|
||||||
</ColGroup>
|
<col style="width: 34em;"/>
|
||||||
<HeaderContent>
|
</ColGroup>
|
||||||
<MudTh>#</MudTh>
|
<HeaderContent>
|
||||||
<MudTh>Instance Name</MudTh>
|
<MudTh>#</MudTh>
|
||||||
<MudTh>Provider</MudTh>
|
<MudTh>Instance Name</MudTh>
|
||||||
<MudTh>Model</MudTh>
|
<MudTh>Provider</MudTh>
|
||||||
<MudTh Style="text-align: left;">Actions</MudTh>
|
<MudTh>Model</MudTh>
|
||||||
</HeaderContent>
|
<MudTh Style="text-align: left;">Actions</MudTh>
|
||||||
<RowTemplate>
|
</HeaderContent>
|
||||||
<MudTd>@context.Num</MudTd>
|
<RowTemplate>
|
||||||
<MudTd>@context.InstanceName</MudTd>
|
<MudTd>@context.Num</MudTd>
|
||||||
<MudTd>@context.UsedProvider</MudTd>
|
<MudTd>@context.InstanceName</MudTd>
|
||||||
<MudTd>
|
<MudTd>@context.UsedProvider</MudTd>
|
||||||
@if (context.UsedProvider is not Providers.SELF_HOSTED)
|
<MudTd>
|
||||||
{
|
@if (context.UsedProvider is not Providers.SELF_HOSTED)
|
||||||
@this.GetProviderModelName(context)
|
{
|
||||||
}
|
@this.GetProviderModelName(context)
|
||||||
else if (context.UsedProvider is Providers.SELF_HOSTED && context.Host is not Host.LLAMACPP)
|
}
|
||||||
{
|
else if (context.UsedProvider is Providers.SELF_HOSTED && context.Host is not Host.LLAMACPP)
|
||||||
@this.GetProviderModelName(context)
|
{
|
||||||
}
|
@this.GetProviderModelName(context)
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
@("as selected by provider")
|
{
|
||||||
}
|
@("as selected by provider")
|
||||||
</MudTd>
|
}
|
||||||
<MudTd Style="text-align: left;">
|
</MudTd>
|
||||||
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.OpenInBrowser" Class="ma-2" Href="@this.GetProviderDashboardURL(context.UsedProvider)" Target="_blank" Disabled="@(!this.HasDashboard(context.UsedProvider))">
|
<MudTd Style="text-align: left;">
|
||||||
Open Dashboard
|
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.OpenInBrowser" Class="ma-2" Href="@this.GetProviderDashboardURL(context.UsedProvider)" Target="_blank" Disabled="@(!this.HasDashboard(context.UsedProvider))">
|
||||||
</MudButton>
|
Open Dashboard
|
||||||
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" Class="ma-2" OnClick="() => this.EditProvider(context)">
|
</MudButton>
|
||||||
Edit
|
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" Class="ma-2" OnClick="() => this.EditProvider(context)">
|
||||||
</MudButton>
|
Edit
|
||||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" Class="ma-2" OnClick="() => this.DeleteProvider(context)">
|
</MudButton>
|
||||||
Delete
|
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" Class="ma-2" OnClick="() => this.DeleteProvider(context)">
|
||||||
</MudButton>
|
Delete
|
||||||
</MudTd>
|
</MudButton>
|
||||||
</RowTemplate>
|
</MudTd>
|
||||||
</MudTable>
|
</RowTemplate>
|
||||||
|
</MudTable>
|
||||||
|
|
||||||
@if(this.SettingsManager.ConfigurationData.Providers.Count == 0)
|
@if(this.SettingsManager.ConfigurationData.Providers.Count == 0)
|
||||||
{
|
|
||||||
<MudText Typo="Typo.h6" Class="mt-3">No providers configured yet.</MudText>
|
|
||||||
}
|
|
||||||
|
|
||||||
<MudButton Variant="Variant.Filled" Color="@Color.Primary" StartIcon="@Icons.Material.Filled.AddRoad" Class="mt-3 mb-6" OnClick="@this.AddProvider">
|
|
||||||
Add Provider
|
|
||||||
</MudButton>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">App Options</MudText>
|
|
||||||
<ConfigurationOption OptionDescription="Save energy?" LabelOn="Energy saving is enabled" LabelOff="Energy saving is disabled" State="@(() => this.SettingsManager.ConfigurationData.IsSavingEnergy)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.IsSavingEnergy = updatedState)" OptionHelp="When enabled, streamed content from the AI is updated once every third second. When disabled, streamed content will be updated as soon as it is available."/>
|
|
||||||
<ConfigurationOption OptionDescription="Enable spellchecking?" LabelOn="Spellchecking is enabled" LabelOff="Spellchecking is disabled" State="@(() => this.SettingsManager.ConfigurationData.EnableSpellchecking)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.EnableSpellchecking = updatedState)" OptionHelp="When enabled, spellchecking will be active in all input fields. Depending on your operating system, errors may not be visually highlighted, but right-clicking may still offer possible corrections." />
|
|
||||||
<ConfigurationSelect OptionDescription="Check for updates" SelectedValue="@(() => this.SettingsManager.ConfigurationData.UpdateBehavior)" Data="@ConfigurationSelectDataFactory.GetUpdateBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.UpdateBehavior = selectedValue)" OptionHelp="How often should we check for app updates?"/>
|
|
||||||
<ConfigurationSelect OptionDescription="Navigation bar behavior" SelectedValue="@(() => this.SettingsManager.ConfigurationData.NavigationBehavior)" Data="@ConfigurationSelectDataFactory.GetNavBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.NavigationBehavior = selectedValue)" OptionHelp="Select the desired behavior for the navigation bar."/>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">Chat Options</MudText>
|
|
||||||
<ConfigurationSelect OptionDescription="Shortcut to send input" SelectedValue="@(() => this.SettingsManager.ConfigurationData.ShortcutSendBehavior)" Data="@ConfigurationSelectDataFactory.GetSendBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.ShortcutSendBehavior = selectedValue)" OptionHelp="Do you want to use any shortcut to send your input?"/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect chat options?" LabelOn="Chat options are preselected" LabelOff="No chat options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectChatOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectChatOptions = updatedState)" OptionHelp="When enabled, you can preselect chat options. This is might be useful when you prefer a specific provider."/>
|
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectChatOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedChatProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedChatProvider = selectedValue)"/>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">Workspace Options</MudText>
|
|
||||||
<ConfigurationSelect OptionDescription="Workspace behavior" SelectedValue="@(() => this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior)" Data="@ConfigurationSelectDataFactory.GetWorkspaceStorageBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.WorkspaceStorageBehavior = selectedValue)" OptionHelp="Should we store your chats?"/>
|
|
||||||
<ConfigurationSelect OptionDescription="Workspace maintenance" SelectedValue="@(() => this.SettingsManager.ConfigurationData.WorkspaceStorageTemporaryMaintenancePolicy)" Data="@ConfigurationSelectDataFactory.GetWorkspaceStorageTemporaryMaintenancePolicyData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.WorkspaceStorageTemporaryMaintenancePolicy = selectedValue)" OptionHelp="If and when should we delete your temporary chats?"/>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">Assistant Options</MudText>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3">Icon Finder Options</MudText>
|
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
|
||||||
<ConfigurationOption OptionDescription="Preselect icon options?" LabelOn="Icon options are preselected" LabelOff="No icon options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectIconOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectIconOptions = updatedState)" OptionHelp="When enabled, you can preselect the icon options. This is might be useful when you prefer a specific icon source or LLM model."/>
|
|
||||||
<ConfigurationSelect OptionDescription="Preselect the icon source" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectIconOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedIconSource)" Data="@ConfigurationSelectDataFactory.GetIconSourcesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedIconSource = selectedValue)" OptionHelp="Which icon source should be preselected?"/>
|
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectIconOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedIconProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedIconProvider = selectedValue)"/>
|
|
||||||
</MudPaper>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3">Translator Options</MudText>
|
|
||||||
<ConfigurationSlider T="int" OptionDescription="How fast should the live translation react?" Min="500" Max="3_000" Step="100" Unit="milliseconds" Value="@(() => this.SettingsManager.ConfigurationData.LiveTranslationDebounceIntervalMilliseconds)" ValueUpdate="@(updatedValue => this.SettingsManager.ConfigurationData.LiveTranslationDebounceIntervalMilliseconds = updatedValue)"/>
|
|
||||||
<ConfigurationOption OptionDescription="Hide the web content reader?" LabelOn="Web content reader is hidden" LabelOff="Web content reader is shown" State="@(() => this.SettingsManager.ConfigurationData.HideWebContentReaderForTranslation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.HideWebContentReaderForTranslation = updatedState)" OptionHelp="When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use."/>
|
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
|
||||||
<ConfigurationOption OptionDescription="Preselect translator options?" LabelOn="Translator options are preselected" LabelOff="No translator options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectTranslationOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectTranslationOptions = updatedState)" OptionHelp="When enabled, you can preselect the translator options. This is might be useful when you prefer a specific target language or LLM model."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect the web content reader?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions || this.SettingsManager.ConfigurationData.HideWebContentReaderForTranslation)" LabelOn="Web content reader is preselected" LabelOff="Web content reader is not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTranslation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTranslation = updatedState)" OptionHelp="When enabled, the web content reader is preselected. This is might be useful when you prefer to load content from the web very often."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect the content cleaner agent?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions || this.SettingsManager.ConfigurationData.HideWebContentReaderForTranslation)" LabelOn="Content cleaner agent is preselected" LabelOff="Content cleaner agent is not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTranslation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTranslation = updatedState)" OptionHelp="When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the content before translating it."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect live translation?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions)" LabelOn="Live translation is preselected" LabelOff="Live translation is not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectLiveTranslation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectLiveTranslation = updatedState)" />
|
|
||||||
<ConfigurationSelect OptionDescription="Preselect the target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedTranslationTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedTranslationTargetLanguage = selectedValue)" OptionHelp="Which target language should be preselected?"/>
|
|
||||||
@if (this.SettingsManager.ConfigurationData.PreselectedTranslationTargetLanguage is CommonLanguages.OTHER)
|
|
||||||
{
|
{
|
||||||
<ConfigurationText OptionDescription="Preselect another target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.PreselectTranslationOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PreselectTranslationOtherLanguage = updatedText)"/>
|
<MudText Typo="Typo.h6" Class="mt-3">No providers configured yet.</MudText>
|
||||||
}
|
}
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTranslationOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedTranslationProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedTranslationProvider = selectedValue)"/>
|
|
||||||
</MudPaper>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3">Coding Options</MudText>
|
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
|
||||||
<ConfigurationOption OptionDescription="Preselect coding options?" LabelOn="Coding options are preselected" LabelOff="No coding options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectCodingOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectCodingOptions = updatedState)" OptionHelp="When enabled, you can preselect the coding options. This is might be useful when you prefer a specific programming language or LLM model."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect compiler messages?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectCodingOptions)" LabelOn="Compiler messages are preselected" LabelOff="Compiler messages are not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectCodingCompilerMessages)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectCodingCompilerMessages = updatedState)" />
|
|
||||||
<ConfigurationSelect OptionDescription="Preselect a programming language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectCodingOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedCodingLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonCodingLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedCodingLanguage = selectedValue)" OptionHelp="Which programming language should be preselected for added contexts?"/>
|
|
||||||
@if (this.SettingsManager.ConfigurationData.PreselectedCodingLanguage is CommonCodingLanguages.OTHER)
|
|
||||||
{
|
|
||||||
<ConfigurationText OptionDescription="Preselect another programming language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectCodingOptions)" Icon="@Icons.Material.Filled.Code" Text="@(() => this.SettingsManager.ConfigurationData.PreselectedCodingOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PreselectedCodingOtherLanguage = updatedText)"/>
|
|
||||||
}
|
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectCodingOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedCodingProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedCodingProvider = selectedValue)"/>
|
|
||||||
</MudPaper>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3">Text Summarizer Options</MudText>
|
|
||||||
<ConfigurationOption OptionDescription="Hide the web content reader?" LabelOn="Web content reader is hidden" LabelOff="Web content reader is shown" State="@(() => this.SettingsManager.ConfigurationData.HideWebContentReaderForTextSummarizer)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.HideWebContentReaderForTextSummarizer = updatedState)" OptionHelp="When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use."/>
|
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
|
||||||
<ConfigurationOption OptionDescription="Preselect summarizer options?" LabelOn="Summarizer options are preselected" LabelOff="No summarizer options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions = updatedState)" OptionHelp="When enabled, you can preselect the text summarizer options. This is might be useful when you prefer a specific language, complexity, or LLM."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect the web content reader?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions || this.SettingsManager.ConfigurationData.HideWebContentReaderForTextSummarizer)" LabelOn="Web content reader is preselected" LabelOff="Web content reader is not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTextSummarizer)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTextSummarizer = updatedState)" OptionHelp="When enabled, the web content reader is preselected. This is might be useful when you prefer to load content from the web very often."/>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect the content cleaner agent?" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions || this.SettingsManager.ConfigurationData.HideWebContentReaderForTextSummarizer)" LabelOn="Content cleaner agent is preselected" LabelOff="Content cleaner agent is not preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTextSummarizer)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTextSummarizer = updatedState)" OptionHelp="When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the content before summarize it."/>
|
|
||||||
<ConfigurationSelect OptionDescription="Preselect the target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage = selectedValue)" OptionHelp="Which target language should be preselected?"/>
|
|
||||||
@if (this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage is CommonLanguages.OTHER)
|
|
||||||
{
|
|
||||||
<ConfigurationText OptionDescription="Preselect another target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerOtherLanguage = updatedText)"/>
|
|
||||||
}
|
|
||||||
<ConfigurationSelect OptionDescription="Preselect the summarizer complexity" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity)" Data="@ConfigurationSelectDataFactory.GetComplexityData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity = selectedValue)" OptionHelp="Which summarizer complexity should be preselected?"/>
|
|
||||||
@if(this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity is Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS)
|
|
||||||
{
|
|
||||||
<ConfigurationText OptionDescription="Preselect your expertise" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" Icon="@Icons.Material.Filled.Person" Text="@(() => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerExpertInField)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerExpertInField = updatedText)"/>
|
|
||||||
}
|
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedTextSummarizerProvider = selectedValue)"/>
|
|
||||||
</MudPaper>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mb-3">LLM Agent Options</MudText>
|
<MudButton Variant="Variant.Filled" Color="@Color.Primary" StartIcon="@Icons.Material.Filled.AddRoad" Class="mt-3 mb-6" OnClick="@this.AddProvider">
|
||||||
|
Add Provider
|
||||||
|
</MudButton>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Apps" HeaderText="App Options">
|
||||||
|
<ConfigurationOption OptionDescription="Save energy?" LabelOn="Energy saving is enabled" LabelOff="Energy saving is disabled" State="@(() => this.SettingsManager.ConfigurationData.App.IsSavingEnergy)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.App.IsSavingEnergy = updatedState)" OptionHelp="When enabled, streamed content from the AI is updated once every third second. When disabled, streamed content will be updated as soon as it is available."/>
|
||||||
|
<ConfigurationOption OptionDescription="Enable spellchecking?" LabelOn="Spellchecking is enabled" LabelOff="Spellchecking is disabled" State="@(() => this.SettingsManager.ConfigurationData.App.EnableSpellchecking)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.App.EnableSpellchecking = updatedState)" OptionHelp="When enabled, spellchecking will be active in all input fields. Depending on your operating system, errors may not be visually highlighted, but right-clicking may still offer possible corrections." />
|
||||||
|
<ConfigurationSelect OptionDescription="Check for updates" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.UpdateBehavior)" Data="@ConfigurationSelectDataFactory.GetUpdateBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.UpdateBehavior = selectedValue)" OptionHelp="How often should we check for app updates?"/>
|
||||||
|
<ConfigurationSelect OptionDescription="Navigation bar behavior" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.NavigationBehavior)" Data="@ConfigurationSelectDataFactory.GetNavBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.NavigationBehavior = selectedValue)" OptionHelp="Select the desired behavior for the navigation bar."/>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3">Text Content Cleaner Agent</MudText>
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Chat" HeaderText="Chat Options">
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
<ConfigurationSelect OptionDescription="Shortcut to send input" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.ShortcutSendBehavior)" Data="@ConfigurationSelectDataFactory.GetSendBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.ShortcutSendBehavior = selectedValue)" OptionHelp="Do you want to use any shortcut to send your input?"/>
|
||||||
<MudText Typo="Typo.body1" Class="mb-3">
|
<ConfigurationOption OptionDescription="Preselect chat options?" LabelOn="Chat options are preselected" LabelOff="No chat options are preselected" State="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Chat.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect chat options. This is might be useful when you prefer a specific provider."/>
|
||||||
Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things,
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider = selectedValue)"/>
|
||||||
and attempts to convert relative links into absolute links so that they can be used.
|
</ExpansionPanel>
|
||||||
</MudText>
|
|
||||||
<ConfigurationOption OptionDescription="Preselect text content cleaner options?" LabelOn="Options are preselected" LabelOff="No options are preselected" State="@(() => this.SettingsManager.ConfigurationData.PreselectAgentTextContentCleanerOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PreselectAgentTextContentCleanerOptions = updatedState)" OptionHelp="When enabled, you can preselect some agent options. This is might be useful when you prefer a LLM."/>
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Work" HeaderText="Workspace Options">
|
||||||
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PreselectAgentTextContentCleanerOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PreselectedAgentTextContentCleanerProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PreselectedAgentTextContentCleanerProvider = selectedValue)"/>
|
<ConfigurationSelect OptionDescription="Workspace behavior" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Workspace.StorageBehavior)" Data="@ConfigurationSelectDataFactory.GetWorkspaceStorageBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Workspace.StorageBehavior = selectedValue)" OptionHelp="Should we store your chats?"/>
|
||||||
</MudPaper>
|
<ConfigurationSelect OptionDescription="Workspace maintenance" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Workspace.StorageTemporaryMaintenancePolicy)" Data="@ConfigurationSelectDataFactory.GetWorkspaceStorageTemporaryMaintenancePolicyData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Workspace.StorageTemporaryMaintenancePolicy = selectedValue)" OptionHelp="If and when should we delete your temporary chats?"/>
|
||||||
</MudPaper>
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.FindInPage" HeaderText="Assistant: Icon Finder Options">
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect icon options?" LabelOn="Icon options are preselected" LabelOff="No icon options are preselected" State="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the icon options. This is might be useful when you prefer a specific icon source or LLM model."/>
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the icon source" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource)" Data="@ConfigurationSelectDataFactory.GetIconSourcesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource = selectedValue)" OptionHelp="Which icon source should be preselected?"/>
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Translate" HeaderText="Assistant: Translator Options">
|
||||||
|
<ConfigurationSlider T="int" OptionDescription="How fast should the live translation react?" Min="500" Max="3_000" Step="100" Unit="milliseconds" Value="@(() => this.SettingsManager.ConfigurationData.Translation.DebounceIntervalMilliseconds)" ValueUpdate="@(updatedValue => this.SettingsManager.ConfigurationData.Translation.DebounceIntervalMilliseconds = updatedValue)"/>
|
||||||
|
<ConfigurationOption OptionDescription="Hide the web content reader?" LabelOn="Web content reader is hidden" LabelOff="Web content reader is shown" State="@(() => this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Translation.HideWebContentReader = updatedState)" OptionHelp="When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use."/>
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect translator options?" LabelOn="Translator options are preselected" LabelOff="No translator options are preselected" State="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Translation.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the translator options. This is might be useful when you prefer a specific target language or LLM model."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect the web content reader?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions || this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)" LabelOn="Web content reader is preselected" LabelOff="Web content reader is not preselected" State="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Translation.PreselectWebContentReader = updatedState)" OptionHelp="When enabled, the web content reader is preselected. This is might be useful when you prefer to load content from the web very often."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect the content cleaner agent?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions || this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)" LabelOn="Content cleaner agent is preselected" LabelOff="Content cleaner agent is not preselected" State="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectContentCleanerAgent)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Translation.PreselectContentCleanerAgent = updatedState)" OptionHelp="When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the content before translating it."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect live translation?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" LabelOn="Live translation is preselected" LabelOff="Live translation is not preselected" State="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectLiveTranslation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Translation.PreselectLiveTranslation = updatedState)" />
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.PreselectedTargetLanguage = selectedValue)" OptionHelp="Which target language should be preselected?"/>
|
||||||
|
@if (this.SettingsManager.ConfigurationData.Translation.PreselectedTargetLanguage is CommonLanguages.OTHER)
|
||||||
|
{
|
||||||
|
<ConfigurationText OptionDescription="Preselect another target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage = updatedText)"/>
|
||||||
|
}
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Code" HeaderText="Assistant: Coding Options">
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect coding options?" LabelOn="Coding options are preselected" LabelOff="No coding options are preselected" State="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Coding.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the coding options. This is might be useful when you prefer a specific programming language or LLM model."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect compiler messages?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" LabelOn="Compiler messages are preselected" LabelOff="Compiler messages are not preselected" State="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectCompilerMessages)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Coding.PreselectCompilerMessages = updatedState)" />
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect a programming language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedProgrammingLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonCodingLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProgrammingLanguage = selectedValue)" OptionHelp="Which programming language should be preselected for added contexts?"/>
|
||||||
|
@if (this.SettingsManager.ConfigurationData.Coding.PreselectedProgrammingLanguage is CommonCodingLanguages.OTHER)
|
||||||
|
{
|
||||||
|
<ConfigurationText OptionDescription="Preselect another programming language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" Icon="@Icons.Material.Filled.Code" Text="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage = updatedText)"/>
|
||||||
|
}
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.TextSnippet" HeaderText="Assistant: Text Summarizer Options">
|
||||||
|
<ConfigurationOption OptionDescription="Hide the web content reader?" LabelOn="Web content reader is hidden" LabelOff="Web content reader is shown" State="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader = updatedState)" OptionHelp="When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use."/>
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect summarizer options?" LabelOn="Summarizer options are preselected" LabelOff="No summarizer options are preselected" State="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the text summarizer options. This is might be useful when you prefer a specific language, complexity, or LLM."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect the web content reader?" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions || this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)" LabelOn="Web content reader is preselected" LabelOff="Web content reader is not preselected" State="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectWebContentReader = updatedState)" OptionHelp="When enabled, the web content reader is preselected. This is might be useful when you prefer to load content from the web very often."/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect the content cleaner agent?" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions || this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)" LabelOn="Content cleaner agent is preselected" LabelOff="Content cleaner agent is not preselected" State="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectContentCleanerAgent)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectContentCleanerAgent = updatedState)" OptionHelp="When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the content before summarize it."/>
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedTargetLanguage = selectedValue)" OptionHelp="Which target language should be preselected?"/>
|
||||||
|
@if (this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedTargetLanguage is CommonLanguages.OTHER)
|
||||||
|
{
|
||||||
|
<ConfigurationText OptionDescription="Preselect another target language" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedOtherLanguage = updatedText)"/>
|
||||||
|
}
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the summarizer complexity" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedComplexity)" Data="@ConfigurationSelectDataFactory.GetComplexityData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedComplexity = selectedValue)" OptionHelp="Which summarizer complexity should be preselected?"/>
|
||||||
|
@if(this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedComplexity is Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS)
|
||||||
|
{
|
||||||
|
<ConfigurationText OptionDescription="Preselect your expertise" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" Icon="@Icons.Material.Filled.Person" Text="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedExpertInField)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedExpertInField = updatedText)"/>
|
||||||
|
}
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.CalendarToday" HeaderText="Assistant: Agenda Options">
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect agenda options?" LabelOn="Agenda options are preselected" LabelOff="No agenda options are preselected" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect most agenda options. This is might be useful when you need to create similar agendas often."/>
|
||||||
|
<ConfigurationText OptionDescription="Preselect a name?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Tag" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectName)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectName = updatedText)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect a topic?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.EventNote" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectTopic)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectTopic = updatedText)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect an objective?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Flag" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectObjective)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectObjective = updatedText)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect a moderator?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Person3" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectModerator)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectModerator = updatedText)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect a duration?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Schedule" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectDuration)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectDuration = updatedText)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect a start time?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Schedule" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectStartTime)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectStartTime = updatedText)" />
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether the participants should get to know each other" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="Participants should get to know each other" LabelOff="Participants do not need to get to know each other" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectIntroduceParticipants)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectIntroduceParticipants = updatedState)" />
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the number of participants" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectNumberParticipants)" Data="@ConfigurationSelectDataFactory.GetNumberParticipantsData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectNumberParticipants = selectedValue)" OptionHelp="How many participants should be preselected?"/>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether the participants should actively involved" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="Participants should be actively involved" LabelOff="Participants do not need to be actively involved" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectActiveParticipation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectActiveParticipation = updatedState)" />
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether the meeting is virtual" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="Meeting is virtual" LabelOff="Meeting is in person" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectIsMeetingVirtual)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectIsMeetingVirtual = updatedState)" />
|
||||||
|
<ConfigurationText OptionDescription="Preselect a location?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.MyLocation" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectLocation)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectLocation = updatedText)" />
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether there is a joint dinner" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="There is a joint dinner" LabelOff="There is no joint dinner" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectJointDinner)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectJointDinner = updatedState)" />
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether there is a social event" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="There is a social event" LabelOff="There is no social event" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectSocialActivity)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectSocialActivity = updatedState)" />
|
||||||
|
<ConfigurationOption OptionDescription="Preselect whether participants needs to arrive and depart" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" LabelOn="Participants need to arrive and depart" LabelOff="Participants do not need to arrive and depart" State="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectArriveAndDepart)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Agenda.PreselectArriveAndDepart = updatedState)" />
|
||||||
|
<ConfigurationSlider T="int" OptionDescription="Preselect the approx. lunch time" Min="30" Max="120" Step="5" Unit="minutes" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Value="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectLunchTime)" ValueUpdate="@(updatedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectLunchTime = updatedValue)" />
|
||||||
|
<ConfigurationSlider T="int" OptionDescription="Preselect the approx. break time" Min="10" Max="60" Step="5" Unit="minutes" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Value="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectBreakTime)" ValueUpdate="@(updatedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectBreakTime = updatedValue)" />
|
||||||
|
|
||||||
|
<ConfigurationSelect OptionDescription="Preselect the agenda language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesTranslationData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedTargetLanguage = selectedValue)" OptionHelp="Which agenda language should be preselected?"/>
|
||||||
|
@if (this.SettingsManager.ConfigurationData.Agenda.PreselectedTargetLanguage is CommonLanguages.OTHER)
|
||||||
|
{
|
||||||
|
<ConfigurationText OptionDescription="Preselect another agenda language" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage = updatedText)"/>
|
||||||
|
}
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.TextFields" HeaderText="Agent: Text Content Cleaner Options">
|
||||||
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<MudText Typo="Typo.body1" Class="mb-3">
|
||||||
|
Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things,
|
||||||
|
and attempts to convert relative links into absolute links so that they can be used.
|
||||||
|
</MudText>
|
||||||
|
<ConfigurationOption OptionDescription="Preselect text content cleaner options?" LabelOn="Options are preselected" LabelOff="No options are preselected" State="@(() => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = updatedState)" OptionHelp="When enabled, you can preselect some agent options. This is might be useful when you prefer a LLM."/>
|
||||||
|
<ConfigurationProviderSelection Data="@this.availableProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
</ExpansionPanel>
|
||||||
|
</MudExpansionPanels>
|
||||||
</InnerScrolling>
|
</InnerScrolling>
|
@ -1,47 +1,16 @@
|
|||||||
@page "/assistant/summarizer"
|
@page "/assistant/summarizer"
|
||||||
@using AIStudio.Settings
|
|
||||||
@using AIStudio.Tools
|
@using AIStudio.Tools
|
||||||
@inherits AssistantBaseCore
|
@inherits AssistantBaseCore
|
||||||
|
|
||||||
@if (!this.SettingsManager.ConfigurationData.HideWebContentReaderForTextSummarizer)
|
@if (!this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)
|
||||||
{
|
{
|
||||||
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" Preselect="@(this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions && this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTextSummarizer)" PreselectContentCleanerAgent="@(this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions && this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTextSummarizer)"/>
|
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" Preselect="@(this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions && this.SettingsManager.ConfigurationData.TextSummarizer.PreselectWebContentReader)" PreselectContentCleanerAgent="@(this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions && this.SettingsManager.ConfigurationData.TextSummarizer.PreselectContentCleanerAgent)"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.Name())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="Target language" AllowOther="@true" @bind-OtherInput="@this.customTargetLanguage" OtherValue="CommonLanguages.OTHER" LabelOther="Custom target language" ValidateOther="@this.ValidateCustomLanguage" />
|
||||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
<EnumSelection T="Complexity" NameFunc="@(complexity => complexity.Name())" @bind-Value="@this.selectedComplexity" Icon="@Icons.Material.Filled.Layers" Label="Target complexity" AllowOther="@true" @bind-OtherInput="@this.expertInField" OtherValue="Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS" LabelOther="Your expertise" ValidateOther="@this.ValidateExpertInField" />
|
||||||
<MudSelect T="CommonLanguages" @bind-Value="@this.selectedTargetLanguage" AdornmentIcon="@Icons.Material.Filled.Translate" Adornment="Adornment.Start" Label="Target language" Variant="Variant.Outlined" Margin="Margin.Dense">
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@foreach (var targetLanguage in Enum.GetValues<CommonLanguages>())
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@targetLanguage">@targetLanguage.Name()</MudSelectItem>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
@if (this.selectedTargetLanguage is CommonLanguages.OTHER)
|
|
||||||
{
|
|
||||||
<MudTextField T="string" @bind-Text="@this.customTargetLanguage" Validation="@this.ValidateCustomLanguage" Label="Custom target language" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
|
||||||
}
|
|
||||||
</MudStack>
|
|
||||||
|
|
||||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
|
||||||
<MudSelect T="Complexity" @bind-Value="@this.selectedComplexity" AdornmentIcon="@Icons.Material.Filled.Layers" Adornment="Adornment.Start" Label="Target complexity" Variant="Variant.Outlined" Margin="Margin.Dense">
|
|
||||||
@foreach (var targetComplexity in Enum.GetValues<Complexity>())
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@targetComplexity">@targetComplexity.Name()</MudSelectItem>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
@if (this.selectedComplexity is Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS)
|
|
||||||
{
|
|
||||||
<MudTextField T="string" @bind-Text="@this.expertInField" Validation="@this.ValidateExpertInField" Label="Your expertise" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
|
||||||
}
|
|
||||||
</MudStack>
|
|
||||||
|
|
||||||
<MudSelect T="Provider" Disabled="@this.isAgentRunning" @bind-Value="@this.providerSettings" Validation="@this.ValidatingProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
|
||||||
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@provider"/>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
|
|
||||||
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.SummarizeText()" Disabled="@this.isAgentRunning">
|
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.SummarizeText()" Disabled="@this.isAgentRunning">
|
||||||
Summarize
|
Summarize
|
||||||
|
@ -34,13 +34,13 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if(this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions)
|
if(this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)
|
||||||
{
|
{
|
||||||
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage;
|
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedTargetLanguage;
|
||||||
this.customTargetLanguage = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerOtherLanguage;
|
this.customTargetLanguage = this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedOtherLanguage;
|
||||||
this.selectedComplexity = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity;
|
this.selectedComplexity = this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedComplexity;
|
||||||
this.expertInField = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerExpertInField;
|
this.expertInField = this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedExpertInField;
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedTextSummarizerProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -81,7 +81,7 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
|
|||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
var time = this.AddUserRequest(
|
var time = this.AddUserRequest(
|
||||||
$"""
|
$"""
|
||||||
{this.selectedTargetLanguage.Prompt(this.customTargetLanguage)}
|
{this.selectedTargetLanguage.PromptSummarizing(this.customTargetLanguage)}
|
||||||
{this.selectedComplexity.Prompt(this.expertInField)}
|
{this.selectedComplexity.Prompt(this.expertInField)}
|
||||||
|
|
||||||
Please summarize the following text:
|
Please summarize the following text:
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
using AIStudio.Tools;
|
|
||||||
|
|
||||||
namespace AIStudio.Components.Pages.TextSummarizer;
|
|
||||||
|
|
||||||
public static class CommonLanguagePrompts
|
|
||||||
{
|
|
||||||
public static string Prompt(this CommonLanguages language, string customLanguage) => language switch
|
|
||||||
{
|
|
||||||
CommonLanguages.AS_IS => "Do not change the language of the text.",
|
|
||||||
CommonLanguages.OTHER => $"Output you summary in {customLanguage}.",
|
|
||||||
|
|
||||||
_ => $"Output your summary in {language.Name()} ({language}).",
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,54 +1,24 @@
|
|||||||
@page "/assistant/translation"
|
@page "/assistant/translation"
|
||||||
@using AIStudio.Settings
|
|
||||||
@using AIStudio.Tools
|
@using AIStudio.Tools
|
||||||
@inherits AssistantBaseCore
|
@inherits AssistantBaseCore
|
||||||
|
|
||||||
@if (!this.SettingsManager.ConfigurationData.HideWebContentReaderForTranslation)
|
@if (!this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)
|
||||||
{
|
{
|
||||||
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" Preselect="@(this.SettingsManager.ConfigurationData.PreselectTranslationOptions && this.SettingsManager.ConfigurationData.PreselectWebContentReaderForTranslation)" PreselectContentCleanerAgent="@(this.SettingsManager.ConfigurationData.PreselectTranslationOptions && this.SettingsManager.ConfigurationData.PreselectContentCleanerAgentForTranslation)"/>
|
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" Preselect="@(this.SettingsManager.ConfigurationData.Translation.PreselectOptions && this.SettingsManager.ConfigurationData.Translation.PreselectWebContentReader)" PreselectContentCleanerAgent="@(this.SettingsManager.ConfigurationData.Translation.PreselectOptions && this.SettingsManager.ConfigurationData.Translation.PreselectContentCleanerAgent)"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudField Label="Live translation" Variant="Variant.Outlined" Class="mb-3">
|
<MudTextSwitch Label="Live translation" @bind-Value="@this.liveTranslation" LabelOn="Live translation" LabelOff="No live translation"/>
|
||||||
<MudSwitch T="bool" @bind-Value="@this.liveTranslation" Color="Color.Primary">
|
|
||||||
@(this.liveTranslation ? "Live translation" : "No live translation")
|
|
||||||
</MudSwitch>
|
|
||||||
</MudField>
|
|
||||||
|
|
||||||
@if (this.liveTranslation)
|
@if (this.liveTranslation)
|
||||||
{
|
{
|
||||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" Immediate="@true" DebounceInterval="1_000" OnDebounceIntervalElapsed="() => this.TranslateText(force: false)" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" Immediate="@true" DebounceInterval="@this.SettingsManager.ConfigurationData.Translation.DebounceIntervalMilliseconds" OnDebounceIntervalElapsed="() => this.TranslateText(force: false)" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="Your input" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidatingTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="Target language" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="Custom target language" />
|
||||||
<MudSelect T="CommonLanguages" @bind-Value="@this.selectedTargetLanguage" Validation="@this.ValidatingTargetLanguage" AdornmentIcon="@Icons.Material.Filled.Translate" Adornment="Adornment.Start" Label="Target language" Variant="Variant.Outlined" Margin="Margin.Dense">
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@foreach (var targetLanguage in Enum.GetValues<CommonLanguages>())
|
|
||||||
{
|
|
||||||
if (targetLanguage is CommonLanguages.AS_IS)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@targetLanguage">Please select the target language</MudSelectItem>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@targetLanguage">@targetLanguage.Name()</MudSelectItem>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
@if (this.selectedTargetLanguage is CommonLanguages.OTHER)
|
|
||||||
{
|
|
||||||
<MudTextField T="string" @bind-Text="@this.customTargetLanguage" Validation="@this.ValidateCustomLanguage" Label="Custom target language" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
|
||||||
}
|
|
||||||
</MudStack>
|
|
||||||
|
|
||||||
<MudSelect T="Provider" @bind-Value="@this.providerSettings" Disabled="@this.isAgentRunning" Validation="@this.ValidatingProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
|
||||||
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
|
||||||
{
|
|
||||||
<MudSelectItem Value="@provider"/>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
|
|
||||||
<MudButton Disabled="@this.isAgentRunning" Variant="Variant.Filled" Class="mb-3" OnClick="() => this.TranslateText(force: true)">
|
<MudButton Disabled="@this.isAgentRunning" Variant="Variant.Filled" Class="mb-3" OnClick="() => this.TranslateText(force: true)">
|
||||||
Translate
|
Translate
|
||||||
|
@ -30,12 +30,12 @@ public partial class AssistantTranslation : AssistantBaseCore
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (this.SettingsManager.ConfigurationData.PreselectTranslationOptions)
|
if (this.SettingsManager.ConfigurationData.Translation.PreselectOptions)
|
||||||
{
|
{
|
||||||
this.liveTranslation = this.SettingsManager.ConfigurationData.PreselectLiveTranslation;
|
this.liveTranslation = this.SettingsManager.ConfigurationData.Translation.PreselectLiveTranslation;
|
||||||
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.PreselectedTranslationTargetLanguage;
|
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.Translation.PreselectedTargetLanguage;
|
||||||
this.customTargetLanguage = this.SettingsManager.ConfigurationData.PreselectTranslationOtherLanguage;
|
this.customTargetLanguage = this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage;
|
||||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedTranslationProvider);
|
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.Translation.PreselectedProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -66,7 +66,7 @@ public partial class AssistantTranslation : AssistantBaseCore
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TranslateText(bool force)
|
private async Task TranslateText(bool force)
|
||||||
{
|
{
|
||||||
if (!this.inputIsValid)
|
if (!this.inputIsValid)
|
||||||
@ -79,7 +79,7 @@ public partial class AssistantTranslation : AssistantBaseCore
|
|||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
var time = this.AddUserRequest(
|
var time = this.AddUserRequest(
|
||||||
$"""
|
$"""
|
||||||
{this.selectedTargetLanguage.Prompt(this.customTargetLanguage)}
|
{this.selectedTargetLanguage.PromptTranslation(this.customTargetLanguage)}
|
||||||
|
|
||||||
The given text is:
|
The given text is:
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
using AIStudio.Tools;
|
|
||||||
|
|
||||||
namespace AIStudio.Components.Pages.Translation;
|
|
||||||
|
|
||||||
public static class CommonLanguageExtension
|
|
||||||
{
|
|
||||||
public static string Prompt(this CommonLanguages language, string customLanguage) => language switch
|
|
||||||
{
|
|
||||||
CommonLanguages.OTHER => $"Translate the text in {customLanguage}.",
|
|
||||||
|
|
||||||
_ => $"Translate the given text in {language.Name()} ({language}).",
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,3 +1,4 @@
|
|||||||
|
using AIStudio.Components.Pages.Agenda;
|
||||||
using AIStudio.Components.Pages.Coding;
|
using AIStudio.Components.Pages.Coding;
|
||||||
using AIStudio.Components.Pages.IconFinder;
|
using AIStudio.Components.Pages.IconFinder;
|
||||||
using AIStudio.Components.Pages.TextSummarizer;
|
using AIStudio.Components.Pages.TextSummarizer;
|
||||||
@ -72,6 +73,15 @@ public static class ConfigurationSelectDataFactory
|
|||||||
yield return new(language.Name(), language);
|
yield return new(language.Name(), language);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IEnumerable<ConfigurationSelectData<CommonLanguages>> GetCommonLanguagesTranslationData()
|
||||||
|
{
|
||||||
|
foreach (var language in Enum.GetValues<CommonLanguages>())
|
||||||
|
if(language is CommonLanguages.AS_IS)
|
||||||
|
yield return new("Not yet specified", language);
|
||||||
|
else
|
||||||
|
yield return new(language.Name(), language);
|
||||||
|
}
|
||||||
|
|
||||||
public static IEnumerable<ConfigurationSelectData<CommonCodingLanguages>> GetCommonCodingLanguagesData()
|
public static IEnumerable<ConfigurationSelectData<CommonCodingLanguages>> GetCommonCodingLanguagesData()
|
||||||
{
|
{
|
||||||
foreach (var language in Enum.GetValues<CommonCodingLanguages>())
|
foreach (var language in Enum.GetValues<CommonCodingLanguages>())
|
||||||
@ -83,4 +93,10 @@ public static class ConfigurationSelectDataFactory
|
|||||||
foreach (var complexity in Enum.GetValues<Complexity>())
|
foreach (var complexity in Enum.GetValues<Complexity>())
|
||||||
yield return new(complexity.Name(), complexity);
|
yield return new(complexity.Name(), complexity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IEnumerable<ConfigurationSelectData<NumberParticipants>> GetNumberParticipantsData()
|
||||||
|
{
|
||||||
|
foreach (var number in Enum.GetValues<NumberParticipants>())
|
||||||
|
yield return new(number.Name(), number);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,8 +1,3 @@
|
|||||||
using AIStudio.Components.Pages.Coding;
|
|
||||||
using AIStudio.Components.Pages.IconFinder;
|
|
||||||
using AIStudio.Components.Pages.TextSummarizer;
|
|
||||||
using AIStudio.Tools;
|
|
||||||
|
|
||||||
namespace AIStudio.Settings.DataModel;
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -14,7 +9,7 @@ public sealed class Data
|
|||||||
/// The version of the settings file. Allows us to upgrade the settings
|
/// The version of the settings file. Allows us to upgrade the settings
|
||||||
/// when a new version is available.
|
/// when a new version is available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Version Version { get; init; } = Version.V3;
|
public Version Version { get; init; } = Version.V4;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List of configured providers.
|
/// List of configured providers.
|
||||||
@ -26,222 +21,21 @@ public sealed class Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public uint NextProviderNum { get; set; } = 1;
|
public uint NextProviderNum { get; set; } = 1;
|
||||||
|
|
||||||
#region App Settings
|
public DataApp App { get; init; } = new();
|
||||||
|
|
||||||
|
public DataChat Chat { get; init; } = new();
|
||||||
|
|
||||||
|
public DataWorkspace Workspace { get; init; } = new();
|
||||||
|
|
||||||
|
public DataIconFinder IconFinder { get; init; } = new();
|
||||||
|
|
||||||
|
public DataTranslation Translation { get; init; } = new();
|
||||||
|
|
||||||
|
public DataCoding Coding { get; init; } = new();
|
||||||
|
|
||||||
|
public DataTextSummarizer TextSummarizer { get; init; } = new();
|
||||||
|
|
||||||
|
public DataTextContentCleaner TextContentCleaner { get; init; } = new();
|
||||||
|
|
||||||
/// <summary>
|
public DataAgenda Agenda { get; init; } = new();
|
||||||
/// Should we save energy? When true, we will update content streamed
|
|
||||||
/// from the server, i.e., AI, less frequently.
|
|
||||||
/// </summary>
|
|
||||||
public bool IsSavingEnergy { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Should we enable spellchecking for all input fields?
|
|
||||||
/// </summary>
|
|
||||||
public bool EnableSpellchecking { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// If and when we should look for updates.
|
|
||||||
/// </summary>
|
|
||||||
public UpdateBehavior UpdateBehavior { get; set; } = UpdateBehavior.ONCE_STARTUP;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The navigation behavior.
|
|
||||||
/// </summary>
|
|
||||||
public NavBehavior NavigationBehavior { get; set; } = NavBehavior.EXPAND_ON_HOVER;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Chat Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Shortcuts to send the input to the AI.
|
|
||||||
/// </summary>
|
|
||||||
public SendBehavior ShortcutSendBehavior { get; set; } = SendBehavior.MODIFER_ENTER_IS_SENDING;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any chat options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectChatOptions { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Should we preselect a provider for the chat?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedChatProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Workspace Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The chat storage behavior.
|
|
||||||
/// </summary>
|
|
||||||
public WorkspaceStorageBehavior WorkspaceStorageBehavior { get; set; } = WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The chat storage maintenance behavior.
|
|
||||||
/// </summary>
|
|
||||||
public WorkspaceStorageTemporaryMaintenancePolicy WorkspaceStorageTemporaryMaintenancePolicy { get; set; } = WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_90_DAYS;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Assiatant: Icon Finder Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Do we want to preselect any icon options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectIconOptions { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The preselected icon source.
|
|
||||||
/// </summary>
|
|
||||||
public IconSources PreselectedIconSource { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The preselected icon provider.
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedIconProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Assistant: Translation Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The live translation interval for debouncing in milliseconds.
|
|
||||||
/// </summary>
|
|
||||||
public int LiveTranslationDebounceIntervalMilliseconds { get; set; } = 1_500;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Do we want to preselect any translator options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectTranslationOptions { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the live translation?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectLiveTranslation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Hide the web content reader?
|
|
||||||
/// </summary>
|
|
||||||
public bool HideWebContentReaderForTranslation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the web content reader?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectWebContentReaderForTranslation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the content cleaner agent?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectContentCleanerAgentForTranslation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the target language?
|
|
||||||
/// </summary>
|
|
||||||
public CommonLanguages PreselectedTranslationTargetLanguage { get; set; } = CommonLanguages.EN_US;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any other language?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectTranslationOtherLanguage { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The preselected translator provider.
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedTranslationProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Assistant: Coding Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any coding options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectCodingOptions { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the compiler messages?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectCodingCompilerMessages { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the coding language for new contexts?
|
|
||||||
/// </summary>
|
|
||||||
public CommonCodingLanguages PreselectedCodingLanguage { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Do you want to preselect any other language?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedCodingOtherLanguage { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Which coding provider should be preselected?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedCodingProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Assistant: Text Summarizer Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any text summarizer options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectTextSummarizerOptions { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Hide the web content reader?
|
|
||||||
/// </summary>
|
|
||||||
public bool HideWebContentReaderForTextSummarizer { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the web content reader?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectWebContentReaderForTextSummarizer { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the content cleaner agent?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectContentCleanerAgentForTextSummarizer { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the target language?
|
|
||||||
/// </summary>
|
|
||||||
public CommonLanguages PreselectedTextSummarizerTargetLanguage { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any other language?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedTextSummarizerOtherLanguage { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect the complexity?
|
|
||||||
/// </summary>
|
|
||||||
public Complexity PreselectedTextSummarizerComplexity { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any expertise in a field?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedTextSummarizerExpertInField { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect a text summarizer provider?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedTextSummarizerProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Agent: Text Content Cleaner Settings
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect any text content cleaner options?
|
|
||||||
/// </summary>
|
|
||||||
public bool PreselectAgentTextContentCleanerOptions { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Preselect a text content cleaner provider?
|
|
||||||
/// </summary>
|
|
||||||
public string PreselectedAgentTextContentCleanerProvider { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
59
app/MindWork AI Studio/Settings/DataModel/DataAgenda.cs
Normal file
59
app/MindWork AI Studio/Settings/DataModel/DataAgenda.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
using AIStudio.Components.Pages.Agenda;
|
||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataAgenda
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any agenda options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
public string PreselectName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string PreselectTopic { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string PreselectObjective { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string PreselectModerator { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string PreselectDuration { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string PreselectStartTime { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool PreselectIntroduceParticipants { get; set; }
|
||||||
|
|
||||||
|
public NumberParticipants PreselectNumberParticipants { get; set; } = NumberParticipants.NOT_SPECIFIED;
|
||||||
|
|
||||||
|
public bool PreselectActiveParticipation { get; set; }
|
||||||
|
|
||||||
|
public bool PreselectIsMeetingVirtual { get; set; } = true;
|
||||||
|
|
||||||
|
public string PreselectLocation { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool PreselectJointDinner { get; set; }
|
||||||
|
|
||||||
|
public bool PreselectSocialActivity { get; set; }
|
||||||
|
|
||||||
|
public bool PreselectArriveAndDepart { get; set; }
|
||||||
|
|
||||||
|
public int PreselectLunchTime { get; set; }
|
||||||
|
|
||||||
|
public int PreselectBreakTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the target language?
|
||||||
|
/// </summary>
|
||||||
|
public CommonLanguages PreselectedTargetLanguage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect a agenda provider?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
25
app/MindWork AI Studio/Settings/DataModel/DataApp.cs
Normal file
25
app/MindWork AI Studio/Settings/DataModel/DataApp.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataApp
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Should we save energy? When true, we will update content streamed
|
||||||
|
/// from the server, i.e., AI, less frequently.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSavingEnergy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we enable spellchecking for all input fields?
|
||||||
|
/// </summary>
|
||||||
|
public bool EnableSpellchecking { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If and when we should look for updates.
|
||||||
|
/// </summary>
|
||||||
|
public UpdateBehavior UpdateBehavior { get; set; } = UpdateBehavior.ONCE_STARTUP;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The navigation behavior.
|
||||||
|
/// </summary>
|
||||||
|
public NavBehavior NavigationBehavior { get; set; } = NavBehavior.EXPAND_ON_HOVER;
|
||||||
|
}
|
19
app/MindWork AI Studio/Settings/DataModel/DataChat.cs
Normal file
19
app/MindWork AI Studio/Settings/DataModel/DataChat.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataChat
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Shortcuts to send the input to the AI.
|
||||||
|
/// </summary>
|
||||||
|
public SendBehavior ShortcutSendBehavior { get; set; } = SendBehavior.MODIFER_ENTER_IS_SENDING;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any chat options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we preselect a provider for the chat?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
31
app/MindWork AI Studio/Settings/DataModel/DataCoding.cs
Normal file
31
app/MindWork AI Studio/Settings/DataModel/DataCoding.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using AIStudio.Components.Pages.Coding;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataCoding
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any coding options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the compiler messages?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectCompilerMessages { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the coding language for new contexts?
|
||||||
|
/// </summary>
|
||||||
|
public CommonCodingLanguages PreselectedProgrammingLanguage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Do you want to preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedOtherProgrammingLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Which coding provider should be preselected?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
21
app/MindWork AI Studio/Settings/DataModel/DataIconFinder.cs
Normal file
21
app/MindWork AI Studio/Settings/DataModel/DataIconFinder.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using AIStudio.Components.Pages.IconFinder;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataIconFinder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Do we want to preselect any icon options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected icon source.
|
||||||
|
/// </summary>
|
||||||
|
public IconSources PreselectedSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected icon provider.
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataTextContentCleaner
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any text content cleaner options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectAgentOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect a text content cleaner provider?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedAgentProvider { get; set; } = string.Empty;
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
using AIStudio.Components.Pages.TextSummarizer;
|
||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataTextSummarizer
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any text summarizer options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hide the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool HideWebContentReader { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectWebContentReader { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the content cleaner agent?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectContentCleanerAgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the target language?
|
||||||
|
/// </summary>
|
||||||
|
public CommonLanguages PreselectedTargetLanguage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the complexity?
|
||||||
|
/// </summary>
|
||||||
|
public Complexity PreselectedComplexity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any expertise in a field?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedExpertInField { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect a text summarizer provider?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
51
app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs
Normal file
51
app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataTranslation
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The live translation interval for debouncing in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
public int DebounceIntervalMilliseconds { get; set; } = 1_500;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Do we want to preselect any translator options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the live translation?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectLiveTranslation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hide the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool HideWebContentReader { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectWebContentReader { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the content cleaner agent?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectContentCleanerAgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the target language?
|
||||||
|
/// </summary>
|
||||||
|
public CommonLanguages PreselectedTargetLanguage { get; set; } = CommonLanguages.EN_US;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected translator provider.
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedProvider { get; set; } = string.Empty;
|
||||||
|
}
|
14
app/MindWork AI Studio/Settings/DataModel/DataWorkspace.cs
Normal file
14
app/MindWork AI Studio/Settings/DataModel/DataWorkspace.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
|
public sealed class DataWorkspace
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The chat storage behavior.
|
||||||
|
/// </summary>
|
||||||
|
public WorkspaceStorageBehavior StorageBehavior { get; set; } = WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The chat storage maintenance behavior.
|
||||||
|
/// </summary>
|
||||||
|
public WorkspaceStorageTemporaryMaintenancePolicy StorageTemporaryMaintenancePolicy { get; set; } = WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_90_DAYS;
|
||||||
|
}
|
@ -0,0 +1,247 @@
|
|||||||
|
using AIStudio.Components.Pages.Coding;
|
||||||
|
using AIStudio.Components.Pages.IconFinder;
|
||||||
|
using AIStudio.Components.Pages.TextSummarizer;
|
||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
namespace AIStudio.Settings.DataModel.PreviousModels;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The data model for the settings file.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class DataV1V3
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The version of the settings file. Allows us to upgrade the settings
|
||||||
|
/// when a new version is available.
|
||||||
|
/// </summary>
|
||||||
|
public Version Version { get; init; } = Version.V3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of configured providers.
|
||||||
|
/// </summary>
|
||||||
|
public List<Provider> Providers { get; init; } = [];
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The next provider number to use.
|
||||||
|
/// </summary>
|
||||||
|
public uint NextProviderNum { get; set; } = 1;
|
||||||
|
|
||||||
|
#region App Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we save energy? When true, we will update content streamed
|
||||||
|
/// from the server, i.e., AI, less frequently.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSavingEnergy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we enable spellchecking for all input fields?
|
||||||
|
/// </summary>
|
||||||
|
public bool EnableSpellchecking { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If and when we should look for updates.
|
||||||
|
/// </summary>
|
||||||
|
public UpdateBehavior UpdateBehavior { get; set; } = UpdateBehavior.ONCE_STARTUP;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The navigation behavior.
|
||||||
|
/// </summary>
|
||||||
|
public NavBehavior NavigationBehavior { get; set; } = NavBehavior.EXPAND_ON_HOVER;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Chat Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shortcuts to send the input to the AI.
|
||||||
|
/// </summary>
|
||||||
|
public SendBehavior ShortcutSendBehavior { get; set; } = SendBehavior.MODIFER_ENTER_IS_SENDING;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any chat options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectChatOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we preselect a provider for the chat?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedChatProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Workspace Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The chat storage behavior.
|
||||||
|
/// </summary>
|
||||||
|
public WorkspaceStorageBehavior WorkspaceStorageBehavior { get; set; } = WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The chat storage maintenance behavior.
|
||||||
|
/// </summary>
|
||||||
|
public WorkspaceStorageTemporaryMaintenancePolicy WorkspaceStorageTemporaryMaintenancePolicy { get; set; } = WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_90_DAYS;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Assiatant: Icon Finder Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Do we want to preselect any icon options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectIconOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected icon source.
|
||||||
|
/// </summary>
|
||||||
|
public IconSources PreselectedIconSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected icon provider.
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedIconProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Assistant: Translation Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The live translation interval for debouncing in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
public int LiveTranslationDebounceIntervalMilliseconds { get; set; } = 1_500;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Do we want to preselect any translator options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectTranslationOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the live translation?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectLiveTranslation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hide the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool HideWebContentReaderForTranslation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectWebContentReaderForTranslation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the content cleaner agent?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectContentCleanerAgentForTranslation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the target language?
|
||||||
|
/// </summary>
|
||||||
|
public CommonLanguages PreselectedTranslationTargetLanguage { get; set; } = CommonLanguages.EN_US;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectTranslationOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The preselected translator provider.
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedTranslationProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Assistant: Coding Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any coding options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectCodingOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the compiler messages?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectCodingCompilerMessages { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the coding language for new contexts?
|
||||||
|
/// </summary>
|
||||||
|
public CommonCodingLanguages PreselectedCodingLanguage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Do you want to preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedCodingOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Which coding provider should be preselected?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedCodingProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Assistant: Text Summarizer Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any text summarizer options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectTextSummarizerOptions { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hide the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool HideWebContentReaderForTextSummarizer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the web content reader?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectWebContentReaderForTextSummarizer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the content cleaner agent?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectContentCleanerAgentForTextSummarizer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the target language?
|
||||||
|
/// </summary>
|
||||||
|
public CommonLanguages PreselectedTextSummarizerTargetLanguage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any other language?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedTextSummarizerOtherLanguage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect the complexity?
|
||||||
|
/// </summary>
|
||||||
|
public Complexity PreselectedTextSummarizerComplexity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any expertise in a field?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedTextSummarizerExpertInField { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect a text summarizer provider?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedTextSummarizerProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Agent: Text Content Cleaner Settings
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect any text content cleaner options?
|
||||||
|
/// </summary>
|
||||||
|
public bool PreselectAgentTextContentCleanerOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preselect a text content cleaner provider?
|
||||||
|
/// </summary>
|
||||||
|
public string PreselectedAgentTextContentCleanerProvider { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
@ -107,13 +107,33 @@ public sealed class SettingsManager
|
|||||||
var settingsPath = Path.Combine(ConfigDirectory!, SETTINGS_FILENAME);
|
var settingsPath = Path.Combine(ConfigDirectory!, SETTINGS_FILENAME);
|
||||||
if(!File.Exists(settingsPath))
|
if(!File.Exists(settingsPath))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var settingsJson = await File.ReadAllTextAsync(settingsPath);
|
// We read the `"Version": "V3"` line to determine the version of the settings file:
|
||||||
var loadedConfiguration = JsonSerializer.Deserialize<Data>(settingsJson, JSON_OPTIONS);
|
await foreach (var line in File.ReadLinesAsync(settingsPath))
|
||||||
if(loadedConfiguration is null)
|
{
|
||||||
|
if (!line.Contains("""
|
||||||
|
"Version":
|
||||||
|
"""))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Extract the version from the line:
|
||||||
|
var settingsVersionText = line.Split('"')[3];
|
||||||
|
|
||||||
|
// Parse the version:
|
||||||
|
Enum.TryParse(settingsVersionText, out Version settingsVersion);
|
||||||
|
if(settingsVersion is Version.UNKNOWN)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: Unknown version of the settings file.");
|
||||||
|
this.ConfigurationData = new();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ConfigurationData = SettingsMigrations.Migrate(settingsVersion, await File.ReadAllTextAsync(settingsPath), JSON_OPTIONS);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.ConfigurationData = SettingsMigrations.Migrate(loadedConfiguration);
|
Console.WriteLine("Error: Failed to read the version of the settings file.");
|
||||||
|
this.ConfigurationData = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -132,5 +152,5 @@ public sealed class SettingsManager
|
|||||||
await File.WriteAllTextAsync(settingsPath, settingsJson);
|
await File.WriteAllTextAsync(settingsPath, settingsJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InjectSpellchecking(Dictionary<string, object?> attributes) => attributes["spellcheck"] = this.ConfigurationData.EnableSpellchecking ? "true" : "false";
|
public void InjectSpellchecking(Dictionary<string, object?> attributes) => attributes["spellcheck"] = this.ConfigurationData.App.EnableSpellchecking ? "true" : "false";
|
||||||
}
|
}
|
@ -1,4 +1,7 @@
|
|||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
using AIStudio.Settings.DataModel;
|
using AIStudio.Settings.DataModel;
|
||||||
|
using AIStudio.Settings.DataModel.PreviousModels;
|
||||||
|
|
||||||
using Host = AIStudio.Provider.SelfHosted.Host;
|
using Host = AIStudio.Provider.SelfHosted.Host;
|
||||||
|
|
||||||
@ -6,24 +9,57 @@ namespace AIStudio.Settings;
|
|||||||
|
|
||||||
public static class SettingsMigrations
|
public static class SettingsMigrations
|
||||||
{
|
{
|
||||||
public static Data Migrate(Data previousData)
|
public static Data Migrate(Version previousVersion, string configData, JsonSerializerOptions jsonOptions)
|
||||||
{
|
{
|
||||||
switch (previousData.Version)
|
switch (previousVersion)
|
||||||
{
|
{
|
||||||
case Version.V1:
|
case Version.V1:
|
||||||
previousData = MigrateV1ToV2(previousData);
|
var configV1 = JsonSerializer.Deserialize<DataV1V3>(configData, jsonOptions);
|
||||||
return MigrateV2ToV3(previousData);
|
if (configV1 is null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: failed to parse the configuration. Using default values.");
|
||||||
|
return new();
|
||||||
|
}
|
||||||
|
|
||||||
|
configV1 = MigrateV1ToV2(configV1);
|
||||||
|
configV1 = MigrateV2ToV3(configV1);
|
||||||
|
return MigrateV3ToV4(configV1);
|
||||||
|
|
||||||
case Version.V2:
|
case Version.V2:
|
||||||
return MigrateV2ToV3(previousData);
|
var configV2 = JsonSerializer.Deserialize<DataV1V3>(configData, jsonOptions);
|
||||||
|
if (configV2 is null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: failed to parse the configuration. Using default values.");
|
||||||
|
return new();
|
||||||
|
}
|
||||||
|
|
||||||
|
configV2 = MigrateV2ToV3(configV2);
|
||||||
|
return MigrateV3ToV4(configV2);
|
||||||
|
|
||||||
|
case Version.V3:
|
||||||
|
var configV3 = JsonSerializer.Deserialize<DataV1V3>(configData, jsonOptions);
|
||||||
|
if (configV3 is null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: failed to parse the configuration. Using default values.");
|
||||||
|
return new();
|
||||||
|
}
|
||||||
|
|
||||||
|
return MigrateV3ToV4(configV3);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Console.WriteLine("No migration needed.");
|
Console.WriteLine("No configuration migration needed.");
|
||||||
return previousData;
|
var configV4 = JsonSerializer.Deserialize<Data>(configData, jsonOptions);
|
||||||
|
if (configV4 is null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error: failed to parse the configuration. Using default values.");
|
||||||
|
return new();
|
||||||
|
}
|
||||||
|
|
||||||
|
return configV4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Data MigrateV1ToV2(Data previousData)
|
private static DataV1V3 MigrateV1ToV2(DataV1V3 previousData)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Summary:
|
// Summary:
|
||||||
@ -45,7 +81,7 @@ public static class SettingsMigrations
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Data MigrateV2ToV3(Data previousData)
|
private static DataV1V3 MigrateV2ToV3(DataV1V3 previousData)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Summary:
|
// Summary:
|
||||||
@ -73,4 +109,89 @@ public static class SettingsMigrations
|
|||||||
WorkspaceStorageTemporaryMaintenancePolicy = previousData.WorkspaceStorageTemporaryMaintenancePolicy,
|
WorkspaceStorageTemporaryMaintenancePolicy = previousData.WorkspaceStorageTemporaryMaintenancePolicy,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Data MigrateV3ToV4(DataV1V3 previousConfig)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Summary:
|
||||||
|
// We grouped the settings into different categories.
|
||||||
|
//
|
||||||
|
|
||||||
|
Console.WriteLine("Migrating from v3 to v4...");
|
||||||
|
return new()
|
||||||
|
{
|
||||||
|
Version = Version.V4,
|
||||||
|
Providers = previousConfig.Providers,
|
||||||
|
NextProviderNum = previousConfig.NextProviderNum,
|
||||||
|
|
||||||
|
App = new()
|
||||||
|
{
|
||||||
|
EnableSpellchecking = previousConfig.EnableSpellchecking,
|
||||||
|
IsSavingEnergy = previousConfig.IsSavingEnergy,
|
||||||
|
UpdateBehavior = previousConfig.UpdateBehavior,
|
||||||
|
NavigationBehavior = previousConfig.NavigationBehavior,
|
||||||
|
},
|
||||||
|
|
||||||
|
Chat = new()
|
||||||
|
{
|
||||||
|
ShortcutSendBehavior = previousConfig.ShortcutSendBehavior,
|
||||||
|
PreselectOptions = previousConfig.PreselectChatOptions,
|
||||||
|
PreselectedProvider = previousConfig.PreselectedChatProvider,
|
||||||
|
},
|
||||||
|
|
||||||
|
Workspace = new()
|
||||||
|
{
|
||||||
|
StorageBehavior = previousConfig.WorkspaceStorageBehavior,
|
||||||
|
StorageTemporaryMaintenancePolicy = previousConfig.WorkspaceStorageTemporaryMaintenancePolicy,
|
||||||
|
},
|
||||||
|
|
||||||
|
IconFinder = new()
|
||||||
|
{
|
||||||
|
PreselectOptions = previousConfig.PreselectIconOptions,
|
||||||
|
PreselectedProvider = previousConfig.PreselectedIconProvider,
|
||||||
|
PreselectedSource = previousConfig.PreselectedIconSource,
|
||||||
|
},
|
||||||
|
|
||||||
|
Translation = new()
|
||||||
|
{
|
||||||
|
PreselectLiveTranslation = previousConfig.PreselectLiveTranslation,
|
||||||
|
DebounceIntervalMilliseconds = previousConfig.LiveTranslationDebounceIntervalMilliseconds,
|
||||||
|
PreselectOptions = previousConfig.PreselectTranslationOptions,
|
||||||
|
PreselectedProvider = previousConfig.PreselectedTranslationProvider,
|
||||||
|
PreselectedTargetLanguage = previousConfig.PreselectedTranslationTargetLanguage,
|
||||||
|
PreselectOtherLanguage = previousConfig.PreselectTranslationOtherLanguage,
|
||||||
|
HideWebContentReader = previousConfig.HideWebContentReaderForTranslation,
|
||||||
|
PreselectContentCleanerAgent = previousConfig.PreselectContentCleanerAgentForTranslation,
|
||||||
|
PreselectWebContentReader = previousConfig.PreselectWebContentReaderForTranslation,
|
||||||
|
},
|
||||||
|
|
||||||
|
Coding = new()
|
||||||
|
{
|
||||||
|
PreselectOptions = previousConfig.PreselectCodingOptions,
|
||||||
|
PreselectedProvider = previousConfig.PreselectedCodingProvider,
|
||||||
|
PreselectedProgrammingLanguage = previousConfig.PreselectedCodingLanguage,
|
||||||
|
PreselectedOtherProgrammingLanguage = previousConfig.PreselectedCodingOtherLanguage,
|
||||||
|
PreselectCompilerMessages = previousConfig.PreselectCodingCompilerMessages,
|
||||||
|
},
|
||||||
|
|
||||||
|
TextSummarizer = new()
|
||||||
|
{
|
||||||
|
PreselectOptions = previousConfig.PreselectTextSummarizerOptions,
|
||||||
|
PreselectedComplexity = previousConfig.PreselectedTextSummarizerComplexity,
|
||||||
|
PreselectedProvider = previousConfig.PreselectedTextSummarizerProvider,
|
||||||
|
PreselectedTargetLanguage = previousConfig.PreselectedTextSummarizerTargetLanguage,
|
||||||
|
PreselectedOtherLanguage = previousConfig.PreselectedTextSummarizerOtherLanguage,
|
||||||
|
PreselectedExpertInField = previousConfig.PreselectedTextSummarizerExpertInField,
|
||||||
|
HideWebContentReader = previousConfig.HideWebContentReaderForTextSummarizer,
|
||||||
|
PreselectContentCleanerAgent = previousConfig.PreselectContentCleanerAgentForTextSummarizer,
|
||||||
|
PreselectWebContentReader = previousConfig.PreselectWebContentReaderForTextSummarizer,
|
||||||
|
},
|
||||||
|
|
||||||
|
TextContentCleaner = new()
|
||||||
|
{
|
||||||
|
PreselectAgentOptions = previousConfig.PreselectAgentTextContentCleanerOptions,
|
||||||
|
PreselectedAgentProvider = previousConfig.PreselectedAgentTextContentCleanerProvider,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
@ -11,4 +11,5 @@ public enum Version
|
|||||||
V1,
|
V1,
|
||||||
V2,
|
V2,
|
||||||
V3,
|
V3,
|
||||||
|
V4,
|
||||||
}
|
}
|
@ -19,4 +19,27 @@ public static class CommonLanguageExtensions
|
|||||||
|
|
||||||
_ => "Other",
|
_ => "Other",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static string PromptSummarizing(this CommonLanguages language, string customLanguage) => language switch
|
||||||
|
{
|
||||||
|
CommonLanguages.AS_IS => "Do not change the language of the text.",
|
||||||
|
CommonLanguages.OTHER => $"Output your summary in {customLanguage}.",
|
||||||
|
|
||||||
|
_ => $"Output your summary in {language.Name()} ({language}).",
|
||||||
|
};
|
||||||
|
|
||||||
|
public static string PromptTranslation(this CommonLanguages language, string customLanguage) => language switch
|
||||||
|
{
|
||||||
|
CommonLanguages.OTHER => $"Translate the text in {customLanguage}.",
|
||||||
|
|
||||||
|
_ => $"Translate the given text in {language.Name()} ({language}).",
|
||||||
|
};
|
||||||
|
|
||||||
|
public static string NameSelecting(this CommonLanguages language)
|
||||||
|
{
|
||||||
|
if(language is CommonLanguages.AS_IS)
|
||||||
|
return "Please select the target language";
|
||||||
|
|
||||||
|
return language.Name();
|
||||||
|
}
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ public class TemporaryChatService(SettingsManager settingsManager) : BackgroundS
|
|||||||
await Task.Delay(TimeSpan.FromSeconds(3), stoppingToken);
|
await Task.Delay(TimeSpan.FromSeconds(3), stoppingToken);
|
||||||
|
|
||||||
await settingsManager.LoadSettings();
|
await settingsManager.LoadSettings();
|
||||||
if(settingsManager.ConfigurationData.WorkspaceStorageTemporaryMaintenancePolicy is WorkspaceStorageTemporaryMaintenancePolicy.NO_AUTOMATIC_MAINTENANCE)
|
if(settingsManager.ConfigurationData.Workspace.StorageTemporaryMaintenancePolicy is WorkspaceStorageTemporaryMaintenancePolicy.NO_AUTOMATIC_MAINTENANCE)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Automatic maintenance of temporary chat storage is disabled. Exiting maintenance service.");
|
Console.WriteLine("Automatic maintenance of temporary chat storage is disabled. Exiting maintenance service.");
|
||||||
return;
|
return;
|
||||||
@ -46,7 +46,7 @@ public class TemporaryChatService(SettingsManager settingsManager) : BackgroundS
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var lastWriteTime = chatMetadata.LastWriteTimeUtc;
|
var lastWriteTime = chatMetadata.LastWriteTimeUtc;
|
||||||
var deleteChat = settingsManager.ConfigurationData.WorkspaceStorageTemporaryMaintenancePolicy switch
|
var deleteChat = settingsManager.ConfigurationData.Workspace.StorageTemporaryMaintenancePolicy switch
|
||||||
{
|
{
|
||||||
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_7_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(7),
|
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_7_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(7),
|
||||||
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_30_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(30),
|
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_30_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(30),
|
||||||
|
@ -37,7 +37,7 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
|
|||||||
while (!stoppingToken.IsCancellationRequested && !IS_INITIALIZED)
|
while (!stoppingToken.IsCancellationRequested && !IS_INITIALIZED)
|
||||||
await Task.Delay(TimeSpan.FromSeconds(3), stoppingToken);
|
await Task.Delay(TimeSpan.FromSeconds(3), stoppingToken);
|
||||||
|
|
||||||
this.updateInterval = this.settingsManager.ConfigurationData.UpdateBehavior switch
|
this.updateInterval = this.settingsManager.ConfigurationData.App.UpdateBehavior switch
|
||||||
{
|
{
|
||||||
UpdateBehavior.NO_CHECK => Timeout.InfiniteTimeSpan,
|
UpdateBehavior.NO_CHECK => Timeout.InfiniteTimeSpan,
|
||||||
UpdateBehavior.ONCE_STARTUP => Timeout.InfiniteTimeSpan,
|
UpdateBehavior.ONCE_STARTUP => Timeout.InfiniteTimeSpan,
|
||||||
@ -49,7 +49,7 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
|
|||||||
_ => TimeSpan.FromHours(1)
|
_ => TimeSpan.FromHours(1)
|
||||||
};
|
};
|
||||||
|
|
||||||
if(this.settingsManager.ConfigurationData.UpdateBehavior is UpdateBehavior.NO_CHECK)
|
if(this.settingsManager.ConfigurationData.App.UpdateBehavior is UpdateBehavior.NO_CHECK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
await this.CheckForUpdate();
|
await this.CheckForUpdate();
|
||||||
|
@ -6,4 +6,5 @@
|
|||||||
- Improved the readability of the settings.json file by using indentation and enum names instead of numbers
|
- Improved the readability of the settings.json file by using indentation and enum names instead of numbers
|
||||||
- Improved assistant overview; assistants will now wrap to the next line if there are too many to fit on the row
|
- Improved assistant overview; assistants will now wrap to the next line if there are too many to fit on the row
|
||||||
- Increased the default value for the live translation delay from 1,000 to 3_000 ms
|
- Increased the default value for the live translation delay from 1,000 to 3_000 ms
|
||||||
- Fixed random number generator usage to be thread-safe
|
- Fixed random number generator usage to be thread-safe
|
||||||
|
- Upgraded MudBlazor dependency
|
@ -1,2 +1,14 @@
|
|||||||
# v0.8.7, build 169
|
# v0.8.7, build 169 (2024-08-01 19:08 UTC)
|
||||||
- Restructuring of the assistant overview: the assistants are now displayed in different categories.
|
- Added an agenda planning assistant.
|
||||||
|
- Added the possibility to preselect most agenda planning options.
|
||||||
|
- Added a slider component to adjust values.
|
||||||
|
- Added a process visualization component.
|
||||||
|
- Restructuring of the assistant overview: the assistants are now displayed in different categories.
|
||||||
|
- Restructuring of the settings page: the settings are now displayed in different categories.
|
||||||
|
- Refactored switch component to unify the behavior.
|
||||||
|
- Refactored the language extensions into one extension class.
|
||||||
|
- Refactored the provider selection into a separate component.
|
||||||
|
- Refactored the configuration data model: the configuration is now stored in separate classes for each section.
|
||||||
|
- Fixed a bug where the configured live translation intervall was not applied.
|
||||||
|
- Fixed a bug where the option slider component was not handling min/max constraints correctly.
|
||||||
|
- Upgraded MudBlazor dependency
|
10
metadata.txt
10
metadata.txt
@ -1,9 +1,9 @@
|
|||||||
0.8.6
|
0.8.7
|
||||||
2024-08-01 19:50:02 UTC
|
2024-08-05 19:08:00 UTC
|
||||||
168
|
169
|
||||||
8.0.107 (commit 1bdaef7265)
|
8.0.107 (commit 1bdaef7265)
|
||||||
8.0.7 (commit 2aade6beb0)
|
8.0.7 (commit 2aade6beb0)
|
||||||
1.80.0 (commit 051478957)
|
1.80.0 (commit 051478957)
|
||||||
7.4.0
|
7.5.0
|
||||||
1.7.1
|
1.7.1
|
||||||
199be1e863f, release
|
bf0a75677d8, release
|
||||||
|
2
runtime/Cargo.lock
generated
2
runtime/Cargo.lock
generated
@ -2308,7 +2308,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mindwork-ai-studio"
|
name = "mindwork-ai-studio"
|
||||||
version = "0.8.6"
|
version = "0.8.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arboard",
|
"arboard",
|
||||||
"flexi_logger",
|
"flexi_logger",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mindwork-ai-studio"
|
name = "mindwork-ai-studio"
|
||||||
version = "0.8.6"
|
version = "0.8.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "MindWork AI Studio"
|
description = "MindWork AI Studio"
|
||||||
authors = ["Thorsten Sommer"]
|
authors = ["Thorsten Sommer"]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "MindWork AI Studio",
|
"productName": "MindWork AI Studio",
|
||||||
"version": "0.8.6"
|
"version": "0.8.7"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
Loading…
Reference in New Issue
Block a user