2024-08-21 08:30:01 +02:00
|
|
|
using AIStudio.Assistants;
|
2024-08-13 08:57:58 +02:00
|
|
|
|
|
|
|
|
namespace AIStudio.Tools;
|
|
|
|
|
|
|
|
|
|
public static class JsRuntimeExtensions
|
|
|
|
|
{
|
|
|
|
|
public static async Task GenerateAndShowDiff(this IJSRuntime jsRuntime, string text1, string text2)
|
|
|
|
|
{
|
2025-03-12 18:05:27 +01:00
|
|
|
await jsRuntime.InvokeVoidAsync("generateDiff", text1, text2, AssistantLowerBase.RESULT_DIV_ID, AssistantLowerBase.BEFORE_RESULT_DIV_ID);
|
2024-08-13 08:57:58 +02:00
|
|
|
}
|
2024-08-18 21:48:35 +02:00
|
|
|
|
|
|
|
|
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
|
|
|
|
{
|
|
|
|
|
await jsRuntime.InvokeVoidAsync("clearDiv", divId);
|
|
|
|
|
}
|
2024-08-13 08:57:58 +02:00
|
|
|
}
|