mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 18:09:07 +00:00
16 lines
506 B
C#
16 lines
506 B
C#
using AIStudio.Assistants;
|
|
|
|
namespace AIStudio.Tools;
|
|
|
|
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.BEFORE_RESULT_DIV_ID);
|
|
}
|
|
|
|
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
|
{
|
|
await jsRuntime.InvokeVoidAsync("clearDiv", divId);
|
|
}
|
|
} |