mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 19:19:47 +00:00
Added possibility to change the result area and to add content after
This commit is contained in:
parent
1dec7de24e
commit
2c05af1d5b
@ -17,9 +17,19 @@
|
|||||||
</MudForm>
|
</MudForm>
|
||||||
<Issues IssuesData="@this.inputIssues"/>
|
<Issues IssuesData="@this.inputIssues"/>
|
||||||
|
|
||||||
@if (this.ShowResult && this.resultingContentBlock is not null)
|
@if (this.isProcessing)
|
||||||
{
|
{
|
||||||
<ContentBlockComponent Role="@this.resultingContentBlock.Role" Type="@this.resultingContentBlock.ContentType" Time="@this.resultingContentBlock.Time" Content="@this.resultingContentBlock.Content" Class="mr-2"/>
|
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-6" />
|
||||||
|
}
|
||||||
|
<div id="@ASSISTANT_RESULT_DIV_ID" class="mr-2 mt-3">
|
||||||
|
@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"/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="@AFTER_RESULT_DIV_ID" class="mt-3">
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</ChildContent>
|
</ChildContent>
|
||||||
</InnerScrolling>
|
</InnerScrolling>
|
@ -18,6 +18,9 @@ public abstract partial class AssistantBase : ComponentBase
|
|||||||
[Inject]
|
[Inject]
|
||||||
protected ThreadSafeRandom RNG { get; init; } = null!;
|
protected ThreadSafeRandom RNG { get; init; } = null!;
|
||||||
|
|
||||||
|
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||||
|
internal const string ASSISTANT_RESULT_DIV_ID = "assistantResult";
|
||||||
|
|
||||||
protected abstract string Title { get; }
|
protected abstract string Title { get; }
|
||||||
|
|
||||||
protected abstract string Description { get; }
|
protected abstract string Description { get; }
|
||||||
@ -131,5 +134,12 @@ public abstract partial class AssistantBase : ComponentBase
|
|||||||
// Return the AI response:
|
// Return the AI response:
|
||||||
return aiText.Text;
|
return aiText.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string? GetButtonIcon(string icon)
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(icon))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return icon;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user