mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-21 12:01:36 +00:00
Fixed handling of paths in Pandoc exports (#674)
Some checks are pending
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
Some checks are pending
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
This commit is contained in:
parent
6f76c845f1
commit
af72a45035
@ -1,6 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
using AIStudio.Tools.Metadata;
|
||||
using AIStudio.Tools.Services;
|
||||
@ -74,36 +73,49 @@ public sealed class PandocProcessBuilder
|
||||
|
||||
public async Task<PandocPreparedProcess> BuildAsync(RustService rustService)
|
||||
{
|
||||
var sbArguments = new StringBuilder();
|
||||
|
||||
if (this.useStandaloneMode)
|
||||
sbArguments.Append(" --standalone ");
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(this.providedInputFile))
|
||||
sbArguments.Append(this.providedInputFile);
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(this.providedInputFormat))
|
||||
sbArguments.Append($" -f {this.providedInputFormat}");
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(this.providedOutputFormat))
|
||||
sbArguments.Append($" -t {this.providedOutputFormat}");
|
||||
|
||||
foreach (var additionalArgument in this.additionalArguments)
|
||||
sbArguments.Append($" {additionalArgument}");
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(this.providedOutputFile))
|
||||
sbArguments.Append($" -o {this.providedOutputFile}");
|
||||
|
||||
var pandocExecutable = await PandocExecutablePath(rustService);
|
||||
return new (new ProcessStartInfo
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = pandocExecutable.Executable,
|
||||
Arguments = sbArguments.ToString(),
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
}, pandocExecutable.IsLocalInstallation);
|
||||
};
|
||||
|
||||
// Use argument tokens instead of a single command string so paths with spaces
|
||||
// or Unicode characters are passed to Pandoc unchanged on all platforms.
|
||||
if (this.useStandaloneMode)
|
||||
startInfo.ArgumentList.Add("--standalone");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.providedInputFile))
|
||||
startInfo.ArgumentList.Add(this.providedInputFile);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.providedInputFormat))
|
||||
{
|
||||
startInfo.ArgumentList.Add("-f");
|
||||
startInfo.ArgumentList.Add(this.providedInputFormat);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.providedOutputFormat))
|
||||
{
|
||||
startInfo.ArgumentList.Add("-t");
|
||||
startInfo.ArgumentList.Add(this.providedOutputFormat);
|
||||
}
|
||||
|
||||
foreach (var additionalArgument in this.additionalArguments)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(additionalArgument))
|
||||
startInfo.ArgumentList.Add(additionalArgument);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.providedOutputFile))
|
||||
{
|
||||
startInfo.ArgumentList.Add("-o");
|
||||
startInfo.ArgumentList.Add(this.providedOutputFile);
|
||||
}
|
||||
|
||||
return new(startInfo, pandocExecutable.IsLocalInstallation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
- Fixed an issue where manually saving chats in workspace manual-storage mode could appear unreliable during response streaming. The save button is now disabled while streaming to prevent partial saves.
|
||||
- Fixed an issue where in some places "No profile" was displayed instead of the localized text.
|
||||
- Fixed a bug in the Responses API of our OpenAI provider implementation where streamed whitespace chunks were discarded. We thank Oliver Kunc `OliverKunc` for his first contribution in resolving this issue. We appreciate your help, Oliver.
|
||||
- Fixed a bug in the Microsoft Word export via Pandoc where target paths containing spaces or Unicode characters could be split into invalid command arguments, resulting in export failures.
|
||||
- Fixed the Google Gemini model API. Switched to the default OpenAI-compatible API to retrieve the model list after Google changed the previous API, which stopped working.
|
||||
- Upgraded to .NET 9.0.13 & Rust 1.93.1.
|
||||
- Upgraded dependencies.
|
||||
Loading…
Reference in New Issue
Block a user