Merge branch 'main' into pr/654

This commit is contained in:
Thorsten Sommer 2026-02-20 14:42:16 +01:00
commit b0a3bbd594
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 37 additions and 24 deletions

View File

@ -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>

View File

@ -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.