summaryrefslogtreecommitdiff
path: root/libpanto/src/agent.zig
diff options
context:
space:
mode:
Diffstat (limited to 'libpanto/src/agent.zig')
-rw-r--r--libpanto/src/agent.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/libpanto/src/agent.zig b/libpanto/src/agent.zig
index e689924..faf0a4a 100644
--- a/libpanto/src/agent.zig
+++ b/libpanto/src/agent.zig
@@ -443,13 +443,8 @@ pub const Agent = struct {
self._persisted_through = end;
}
- /// Persist the messages a turn produced. When the turn auto-compacted,
- /// message indices shifted (the conversation was rewritten to
fn hasToolUseBlock(msg: conversation.Message) bool {
- for (msg.content.items) |block| {
- if (block == .ToolUse) return true;
- }
- return false;
+ return toolUseCount(msg) > 0;
}
/// Open one provider response with the configured retry policy, pushing