mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:27: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,45 @@
|
||||
@using AIStudio.Tools.RAG
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@if (this.Passage.Category is RetrievalContentCategory.IMAGE)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined">
|
||||
@T("An image matched here. The AI was told about it and where to find it, but it did not receive the image itself.")
|
||||
</MudAlert>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (this.isStoreUnavailable)
|
||||
{
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Class="mb-2">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap">
|
||||
<MudText>@T("At the moment, AI Studio cannot read the text of this passage that the AI received, e.g., while AI Studio is still starting.")</MudText>
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Warning" StartIcon="@Icons.Material.Filled.Refresh" OnClick="@this.ReadTextAgainAsync">
|
||||
@T("Try again")
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</MudAlert>
|
||||
}
|
||||
else if (this.isTextMissing)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Class="mb-2">
|
||||
@T("AI Studio no longer has the text of this passage that the AI received. Only where it was found is still known.")
|
||||
</MudAlert>
|
||||
}
|
||||
else if (this.isReadingText)
|
||||
{
|
||||
<MudProgressLinear Indeterminate="@true" Color="Color.Primary" Size="Size.Small" Class="mb-2"/>
|
||||
}
|
||||
|
||||
<ContentViewer Text="@this.text" MaxHeight="@this.MaxHeight">
|
||||
<Toolbar>
|
||||
@* The heading takes the free width, so the button stands right, next to the views. The
|
||||
title of the dialog warns about a file which is no longer at its place. *@
|
||||
<MudText Typo="Typo.subtitle2" Class="flex-grow-1">
|
||||
@this.heading
|
||||
</MudText>
|
||||
|
||||
<FileActions Path="@this.openPath" PageNumber="@this.openPage" ShowCopy="@false" ShowFileManager="@false" WarnIfMissing="@false"/>
|
||||
</Toolbar>
|
||||
</ContentViewer>
|
||||
}
|
||||
Reference in new issue
Block a user