Skip to content

Commit

Permalink
Improved grammar & spelling check and rewrite assistants (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
SommerEngineering authored Sep 15, 2024
1 parent 95da4c6 commit 8715054
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions app/MindWork AI Studio/Assistants/AssistantBase.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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)"/>
Expand Down
3 changes: 2 additions & 1 deletion app/MindWork AI Studio/Assistants/AssistantBase.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Germany and German in Austria differ. You receive text as input. You check the s
""";

protected override bool AllowProfiles => false;

protected override bool ShowResult => false;

protected override bool ShowDedicatedProgress => true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ text. You can also correct spelling and grammar issues. You never add additional

protected override bool AllowProfiles => false;

protected override bool ShowResult => false;

protected override bool ShowDedicatedProgress => true;

protected override Func<string> Result2Copy => () => this.rewrittenText;
Expand Down
2 changes: 1 addition & 1 deletion app/MindWork AI Studio/Tools/JsRuntimeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions app/MindWork AI Studio/wwwroot/changelog/v0.9.12.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 8715054

Please sign in to comment.