mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-03-14 10:09:06 +00:00
17 lines
565 B
C#
17 lines
565 B
C#
using AIStudio.Assistants;
|
|
using AIStudio.Dialogs.Settings;
|
|
|
|
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<NoComponent>.RESULT_DIV_ID, AssistantBase<NoComponent>.BEFORE_RESULT_DIV_ID);
|
|
}
|
|
|
|
public static async Task ClearDiv(this IJSRuntime jsRuntime, string divId)
|
|
{
|
|
await jsRuntime.InvokeVoidAsync("clearDiv", divId);
|
|
}
|
|
} |