mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:49:06 +00:00
Improved grammar & spelling check and rewrite assistants (#154)
This commit is contained in:
parent
95da4c6410
commit
8715054dda
@ -32,6 +32,9 @@
|
||||
<div id="@RESULT_DIV_ID" class="mr-2 mt-3">
|
||||
</div>
|
||||
|
||||
<div id="@BEFORE_RESULT_DIV_ID" class="mt-3">
|
||||
</div>
|
||||
|
||||
@if (this.ShowResult && this.resultingContentBlock is not null)
|
||||
{
|
||||
<ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@(this.resultingContentBlock.Content)"/>
|
||||
|
@ -37,8 +37,9 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
[Inject]
|
||||
private MessageBus MessageBus { get; init; } = null!;
|
||||
|
||||
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||
internal const string RESULT_DIV_ID = "assistantResult";
|
||||
internal const string BEFORE_RESULT_DIV_ID = "beforeAssistantResult";
|
||||
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||
|
||||
protected abstract string Title { get; }
|
||||
|
||||
|
@ -24,8 +24,6 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore
|
||||
""";
|
||||
|
||||
protected override bool AllowProfiles => false;
|
||||
|
||||
protected override bool ShowResult => false;
|
||||
|
||||
protected override bool ShowDedicatedProgress => true;
|
||||
|
||||
|
@ -26,8 +26,6 @@ public partial class AssistantRewriteImprove : AssistantBaseCore
|
||||
|
||||
protected override bool AllowProfiles => false;
|
||||
|
||||
protected override bool ShowResult => false;
|
||||
|
||||
protected override bool ShowDedicatedProgress => true;
|
||||
|
||||
protected override Func<string> Result2Copy => () => this.rewrittenText;
|
||||
|
@ -6,7 +6,7 @@ public static class JsRuntimeExtensions
|
||||
{
|
||||
public static async Task GenerateAndShowDiff(this IJSRuntime jsRuntime, string text1, string text2)
|
||||
{
|
||||
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantBase.RESULT_DIV_ID, AssistantBase.AFTER_RESULT_DIV_ID);
|
||||
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantBase.RESULT_DIV_ID, AssistantBase.BEFORE_RESULT_DIV_ID);
|
||||
}
|
||||
|
||||
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# v0.9.12, build 187 (2024-09-xx xx:xx UTC)
|
||||
- Added a job posting assistant to the business category.
|
||||
- Improved text diff viewer by line-through deleted text.
|
||||
- Improved grammar & spelling check and rewrite assistants by showing the final text as well.
|
||||
- Fixed the dark theme for the text diff viewer, e.g., in the grammar check assistant.
|
||||
- Fixed margin-related issue in the `ConfigurationText` component.
|
||||
- Fixed chat conversion of job posting, legal check, and my task assistants.
|
||||
|
Loading…
Reference in New Issue
Block a user