2024-08-21 06:30:01 +00:00
|
|
|
using AIStudio.Assistants;
|
2024-08-13 06:57:58 +00:00
|
|
|
|
|
|
|
namespace AIStudio.Tools;
|
|
|
|
|
|
|
|
public static class JsRuntimeExtensions
|
|
|
|
{
|
|
|
|
public static async Task GenerateAndShowDiff(this IJSRuntime jsRuntime, string text1, string text2)
|
|
|
|
{
|
2024-09-15 20:46:48 +00:00
|
|
|
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantBase.RESULT_DIV_ID, AssistantBase.BEFORE_RESULT_DIV_ID);
|
2024-08-13 06:57:58 +00:00
|
|
|
}
|
2024-08-18 19:48:35 +00:00
|
|
|
|
|
|
|
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
|
|
|
{
|
|
|
|
await jsRuntime.InvokeVoidAsync("clearDiv", divId);
|
|
|
|
}
|
2024-08-13 06:57:58 +00:00
|
|
|
}
|