mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-09 23:13:48 +00:00
Added description fields to local data sources (#583)
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
This commit is contained in:
1 parent
ab9b27f1f4
commit
7fecbec0d5
15 files changed
+159
-9
No files matched your search
@@ -18,6 +18,24 @@
|
||||
AdornmentIcon="@Icons.Material.Filled.Lightbulb"
|
||||
AdornmentColor="Color.Info"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
/>
|
||||
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataDescription"
|
||||
Label="@T("Description")"
|
||||
Class="mb-6"
|
||||
MaxLength="200"
|
||||
Counter="200"
|
||||
Immediate="@true"
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.Description"
|
||||
AdornmentColor="Color.Info"
|
||||
HelperText="@T("Describe what data this directory contains to help the AI select it.")"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
Lines="3"
|
||||
/>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
|
||||
@@ -37,6 +37,7 @@ public partial class DataSourceLocalDirectoryDialog : MSGComponentBase
|
||||
private uint dataNum;
|
||||
private string dataId = Guid.NewGuid().ToString();
|
||||
private string dataName = string.Empty;
|
||||
private string dataDescription = string.Empty;
|
||||
private bool dataUserAcknowledgedCloudEmbedding;
|
||||
private string dataEmbeddingId = string.Empty;
|
||||
private string dataPath = string.Empty;
|
||||
@@ -73,6 +74,7 @@ public partial class DataSourceLocalDirectoryDialog : MSGComponentBase
|
||||
this.dataNum = this.DataSource.Num;
|
||||
this.dataId = this.DataSource.Id;
|
||||
this.dataName = this.DataSource.Name;
|
||||
this.dataDescription = this.DataSource.Description;
|
||||
this.dataEmbeddingId = this.DataSource.EmbeddingId;
|
||||
this.dataPath = this.DataSource.Path;
|
||||
this.dataSecurityPolicy = this.DataSource.SecurityPolicy;
|
||||
@@ -101,6 +103,7 @@ public partial class DataSourceLocalDirectoryDialog : MSGComponentBase
|
||||
Id = this.dataId,
|
||||
Num = this.dataNum,
|
||||
Name = this.dataName,
|
||||
Description = this.dataDescription,
|
||||
Type = DataSourceType.LOCAL_DIRECTORY,
|
||||
EmbeddingId = this.dataEmbeddingId,
|
||||
Path = this.dataPath,
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.Tag" Label="@T("Data source name")" Value="@this.DataSource.Name" ClipboardTooltipSubject="@T("the data source name")"/>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(this.DataSource.Description))
|
||||
{
|
||||
<TextInfoLines Label="@T("Description")" Value="@this.DataSource.Description" MaxLines="5" ClipboardTooltipSubject="@T("the description")"/>
|
||||
}
|
||||
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("Path")" Value="@this.DataSource.Path" ClipboardTooltipSubject="@T("this path")"/>
|
||||
@if (!this.IsDirectoryAvailable)
|
||||
{
|
||||
@@ -37,7 +41,7 @@
|
||||
<TextInfoLine Label="@T("Maximum matches per query")" Value="@this.DataSource.MaxMatches.ToString()" ClipboardTooltipSubject="@T("the maximum number of matches per query")"/>
|
||||
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.SquareFoot" Label="@T("Number of files")" Value="@this.NumberFilesInDirectory" ClipboardTooltipSubject="@T("the number of files in the directory")"/>
|
||||
<TextInfoLines Label="@T("Files list")" MaxLines="14" Value="@this.directoryFiles.ToString()" ClipboardTooltipSubject="@T("the files list")"/>
|
||||
<TextInfoLines Label="@T("Files list")" MaxLines="14" Value="@this.directoryFilesText" ClipboardTooltipSubject="@T("the files list")"/>
|
||||
@if (this.directorySizeNumFiles > 100)
|
||||
{
|
||||
<MudJustifiedText Typo="Typo.body1" Color="Color.Warning" Class="mb-3">
|
||||
|
||||
@@ -51,6 +51,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
|
||||
private long directorySizeBytes;
|
||||
private long directorySizeNumFiles;
|
||||
private readonly StringBuilder directoryFiles = new();
|
||||
private string directoryFilesText = string.Empty;
|
||||
private Task directorySizeTask = Task.CompletedTask;
|
||||
|
||||
private bool IsOperationInProgress { get; set; } = true;
|
||||
@@ -63,6 +64,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
|
||||
{
|
||||
this.directoryFiles.Append("- ");
|
||||
this.directoryFiles.AppendLine(file);
|
||||
this.directoryFilesText = this.directoryFiles.ToString();
|
||||
}
|
||||
|
||||
private void UpdateDirectorySize(long size)
|
||||
|
||||
@@ -18,6 +18,24 @@
|
||||
AdornmentIcon="@Icons.Material.Filled.Lightbulb"
|
||||
AdornmentColor="Color.Info"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
/>
|
||||
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataDescription"
|
||||
Label="@T("Description")"
|
||||
Class="mb-6"
|
||||
MaxLength="200"
|
||||
Counter="200"
|
||||
Immediate="@true"
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.Description"
|
||||
AdornmentColor="Color.Info"
|
||||
HelperText="@T("Describe what data this file contains to help the AI select it.")"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
Lines="3"
|
||||
/>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
|
||||
@@ -37,6 +37,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
private uint dataNum;
|
||||
private string dataId = Guid.NewGuid().ToString();
|
||||
private string dataName = string.Empty;
|
||||
private string dataDescription = string.Empty;
|
||||
private bool dataUserAcknowledgedCloudEmbedding;
|
||||
private string dataEmbeddingId = string.Empty;
|
||||
private string dataFilePath = string.Empty;
|
||||
@@ -73,6 +74,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
this.dataNum = this.DataSource.Num;
|
||||
this.dataId = this.DataSource.Id;
|
||||
this.dataName = this.DataSource.Name;
|
||||
this.dataDescription = this.DataSource.Description;
|
||||
this.dataEmbeddingId = this.DataSource.EmbeddingId;
|
||||
this.dataFilePath = this.DataSource.FilePath;
|
||||
this.dataSecurityPolicy = this.DataSource.SecurityPolicy;
|
||||
@@ -101,6 +103,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
Id = this.dataId,
|
||||
Num = this.dataNum,
|
||||
Name = this.dataName,
|
||||
Description = this.dataDescription,
|
||||
Type = DataSourceType.LOCAL_FILE,
|
||||
EmbeddingId = this.dataEmbeddingId,
|
||||
FilePath = this.dataFilePath,
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.Tag" Label="@T("Data source name")" Value="@this.DataSource.Name" ClipboardTooltipSubject="@T("the data source name")"/>
|
||||
@if (!string.IsNullOrWhiteSpace(this.DataSource.Description))
|
||||
{
|
||||
<TextInfoLines Label="@T("Description")" Value="@this.DataSource.Description" MaxLines="5" ClipboardTooltipSubject="@T("the description")"/>
|
||||
}
|
||||
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("File path")" Value="@this.DataSource.FilePath" ClipboardTooltipSubject="@T("this path")"/>
|
||||
@if (!this.IsFileAvailable)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user