Improve sidecar client flow and S2T runtime behavior

This commit is contained in:
Jacob Schmidt 2026-02-28 23:42:57 -06:00
parent 14c2c4bceb
commit b1f0791f04
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ public sealed class PythonSidecarClient(JournalConfig config)
for (var i = lines.Length - 1; i >= 0; i--)
{
var line = lines[i].Trim();
if (line.StartsWith("{", StringComparison.Ordinal) && line.EndsWith("}", StringComparison.Ordinal))
if (line.StartsWith('{') && line.EndsWith('}'))
return line;
}

View File

@ -217,7 +217,7 @@ public sealed class SidecarCli(IVaultStorageService vaultStorage, IEntrySearchSe
return false;
}
if (!token.StartsWith("-", StringComparison.Ordinal))
if (!token.StartsWith('-'))
{
if (parsed.Query is null)
{

View File

@ -47,7 +47,7 @@ public sealed class LocalWhisperS2TService : IS2TService, IDisposable
{
_factory ??= WhisperFactory.FromPath(modelPath);
_segmentBuffer = new MemoryStream();
_chunkQueue = new BlockingCollection<byte[]>();
_chunkQueue = [];
_cts = new CancellationTokenSource();
var waveFormat = new WaveFormat(SampleRate, Bits, Channels);