mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 22:47:21 +00:00
Added a way to read what the AI received from your sources (#1100)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
e0d8e18f34
commit
cbc4ce5413
229 files changed
+12739
-1269
No files matched your search
@@ -0,0 +1,55 @@
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@* One element around everything, so that a layout around the viewer can give it its place. *@
|
||||
<div class="content-viewer">
|
||||
@if (this.cutOffCharacters > 0 && this.CutOffNotice is not null)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Class="my-2">
|
||||
@this.CutOffNotice(this.cutOffCharacters)
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
<MudPaper Outlined="@true" Class="content-viewer-frame">
|
||||
<div class="content-viewer-toolbar">
|
||||
<div class="content-viewer-toolbar-start">
|
||||
@this.Toolbar
|
||||
</div>
|
||||
|
||||
@if (this.views.Count > 1)
|
||||
{
|
||||
<MudToggleGroup T="ContentView" @bind-Value="@this.view" SelectionMode="SelectionMode.SingleSelection" Size="Size.Small" Color="Color.Primary">
|
||||
@foreach (var offeredView in this.views)
|
||||
{
|
||||
<MudToggleItem Value="@offeredView" Text="@this.GetViewName(offeredView)"/>
|
||||
}
|
||||
</MudToggleGroup>
|
||||
}
|
||||
</div>
|
||||
|
||||
@* MathJax leaves this alone, even when something else on the page has it typeset everything:
|
||||
it would replace elements Blazor renders here, and the next render of them would fail. *@
|
||||
<div class="content-viewer-body mathjax_ignore" style="@($"max-height: {this.MaxHeight};")">
|
||||
@switch (this.view)
|
||||
{
|
||||
case ContentView.MEDIA:
|
||||
<MudImage ObjectFit="ObjectFit.ScaleDown" Style="width: 100%;" Src="@this.MediaUrl"/>
|
||||
break;
|
||||
|
||||
case ContentView.FORMATTED:
|
||||
<MudMarkdown Value="@this.shownText" Props="Markdown.DefaultConfig" Styling="@this.MarkdownStyling" MarkdownPipeline="Markdown.CONTENT_MARKDOWN_PIPELINE"/>
|
||||
break;
|
||||
|
||||
default:
|
||||
<pre class="content-viewer-plain">@this.shownText</pre>
|
||||
break;
|
||||
}
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(this.HelperText))
|
||||
{
|
||||
<MudText Typo="Typo.caption" Class="mt-1 px-1 mud-text-secondary">
|
||||
@this.HelperText
|
||||
</MudText>
|
||||
}
|
||||
</div>
|
||||
Reference in new issue
Block a user