mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:47:22 +00:00
Added importing of configurations exported from AI Studio (#1007)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f8c0232cfd
commit
22065783c2
49 files changed
+3257
-263
No files matched your search
@@ -94,6 +94,33 @@
|
||||
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
|
||||
@T("You can attach files that will be automatically included when using this chat template. These files will be added to the first message sent in any chat using this template.")
|
||||
</MudJustifiedText>
|
||||
@if (!this.IsEditing && !this.IsReadOnly)
|
||||
{
|
||||
@if (this.HasUnresolvedAttachments)
|
||||
{
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Filled" Icon="@Icons.Material.Filled.WarningAmber" Class="mb-3">
|
||||
@T("Some attachments of this chat template are not on this computer. Please relink or remove them before you add the template.")
|
||||
</MudAlert>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(this.relinkIssue))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-2">@this.relinkIssue</MudAlert>
|
||||
}
|
||||
@for (var index = 0; index < this.attachmentsToRelink.Count; index++)
|
||||
{
|
||||
var currentIndex = index;
|
||||
var attachment = this.attachmentsToRelink[index];
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Class="mb-2">
|
||||
<MudTextField T="string" Value="@attachment.ReplacementPath"
|
||||
ValueChanged="@(value => this.UpdateRelinkPath(currentIndex, value))"
|
||||
Label="@string.Format(T("Relink attachment: {0}"), attachment.OriginalPath)"
|
||||
HelperText="@T("Enter the full path of a file on this computer, or remove the attachment.")" Variant="Variant.Outlined" Immediate="@true" />
|
||||
<MudTooltip Text="@T("Remove this attachment")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@(() => this.RemoveAttachmentToRelink(currentIndex))" />
|
||||
</MudTooltip>
|
||||
</MudStack>
|
||||
}
|
||||
}
|
||||
<AttachDocuments
|
||||
Name="ChatTemplateFileAttachments"
|
||||
@bind-DocumentPaths="@this.fileAttachments"
|
||||
@@ -252,7 +279,7 @@
|
||||
|
||||
@if (!this.isInlineEditOnGoing)
|
||||
{
|
||||
<MudButton OnClick="@this.Store" Variant="Variant.Filled" Color="Color.Primary">
|
||||
<MudButton OnClick="@this.Store" Variant="Variant.Filled" Color="Color.Primary" Disabled="@this.HasUnresolvedAttachments">
|
||||
@if (this.IsEditing)
|
||||
{
|
||||
@T("Update")
|
||||
|
||||
Reference in new issue
Block a user