mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 16:27:21 +00:00
Allowed moving local data sources without embedding them again (#1091)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f6e48e95f3
commit
5d6e48ef93
49 files changed
+2280
-297
No files matched your search
@@ -13,9 +13,10 @@ public sealed partial class RustService
|
||||
async () =>
|
||||
{
|
||||
var encodedTitle = Uri.EscapeDataString(title);
|
||||
var result = initialDirectory is null
|
||||
var startDirectory = initialDirectory is null ? null : PathTools.FindNearestExistingPath(initialDirectory);
|
||||
var result = startDirectory is null
|
||||
? await this.http.PostAsync($"/select/directory?title={encodedTitle}", null)
|
||||
: await this.http.PostAsJsonAsync($"/select/directory?title={encodedTitle}", new PreviousDirectory(initialDirectory), this.jsonRustSerializerOptions);
|
||||
: await this.http.PostAsJsonAsync($"/select/directory?title={encodedTitle}", new PreviousDirectory(startDirectory), this.jsonRustSerializerOptions);
|
||||
|
||||
if (result.IsSuccessStatusCode)
|
||||
return await result.Content.ReadFromJsonAsync<DirectorySelectionResponse>(this.jsonRustSerializerOptions);
|
||||
@@ -54,10 +55,11 @@ public sealed partial class RustService
|
||||
"select file",
|
||||
async () =>
|
||||
{
|
||||
var startPath = initialFile is null ? null : PathTools.FindNearestExistingPath(initialFile);
|
||||
var payload = new SelectFileOptions
|
||||
{
|
||||
Title = title,
|
||||
PreviousFile = initialFile is null ? null : new (initialFile),
|
||||
PreviousFile = startPath is null ? null : new (startPath),
|
||||
Filter = FileTypes.ToFileDialogFilter(filter)
|
||||
};
|
||||
|
||||
@@ -77,10 +79,11 @@ public sealed partial class RustService
|
||||
"select files",
|
||||
async () =>
|
||||
{
|
||||
var startPath = initialFile is null ? null : PathTools.FindNearestExistingPath(initialFile);
|
||||
var payload = new SelectFileOptions
|
||||
{
|
||||
Title = title,
|
||||
PreviousFile = initialFile is null ? null : new (initialFile),
|
||||
PreviousFile = startPath is null ? null : new (startPath),
|
||||
Filter = FileTypes.ToFileDialogFilter(filter)
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user