Count the tool conversation while it is in flight

This commit is contained in:
Thorsten Sommer committed 2026-09-14 18:39:52 +02:00
1 parent 3b6fd41bda
commit b8b8e3f66d
8 files changed
+96 -7

No files matched your search

@@ -1270,7 +1270,7 @@ public abstract class BaseProvider : IProvider, ISecretId
var toolRegistry = Program.SERVICE_PROVIDER.GetService<ToolRegistry>();
var toolExecutor = Program.SERVICE_PROVIDER.GetService<ToolExecutor>();
var currentAssistantContent = chatThread.Blocks.LastOrDefault(x => x.Role is ChatRole.AI)?.Content as ContentText;
currentAssistantContent?.ToolInvocations.Clear();
currentAssistantContent?.BeginToolRun();
TextMessage systemPrompt;
if (toolRegistry is not null && toolExecutor is not null)