1
0

feat: Implement history tracking with new CLI commands for viewing past transcripts and usage statistics.

This commit is contained in:
2026-02-28 14:06:58 +01:00
parent eadbd8d46d
commit a08838fbc4
12 changed files with 349 additions and 4 deletions

View File

@@ -46,8 +46,9 @@ public static class TextInjector
}
}
public static async Task InjectStreamAsync(IAsyncEnumerable<string> tokenStream, string backend)
public static async Task<string> InjectStreamAsync(IAsyncEnumerable<string> tokenStream, string backend)
{
string fullText = string.Empty;
try
{
ProcessStartInfo pInfo;
@@ -77,13 +78,14 @@ public static class TextInjector
}
using var process = Process.Start(pInfo);
if (process == null) return;
if (process == null) return string.Empty;
Logger.LogDebug("Started stream injection process, waiting for tokens...");
await foreach (var token in tokenStream)
{
Logger.LogDebug($"Injecting token: '{token}'");
fullText += token;
await process.StandardInput.WriteAsync(token);
await process.StandardInput.FlushAsync();
}
@@ -97,5 +99,6 @@ public static class TextInjector
Console.WriteLine($"[TextInjector] Error injecting text stream: {ex.Message}");
Notifications.Notify("Injection Error", "Could not type text stream into window.");
}
return fullText;
}
}