diff options
| author | t <t@tjp.lol> | 2026-06-04 09:46:49 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-04 12:09:09 -0600 |
| commit | 3f1ace16afc7877b0bfad374cb286d4d84140960 (patch) | |
| tree | a114a0081e147ef02f0188e408d79199f5e7dcfc /libpanto/src/conversation.zig | |
| parent | ac5c4898dfa0a9e57424336774893dfc72b132e9 (diff) | |
failure retries scheme
Diffstat (limited to 'libpanto/src/conversation.zig')
| -rw-r--r-- | libpanto/src/conversation.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpanto/src/conversation.zig b/libpanto/src/conversation.zig index 2c29f8e..f0c822d 100644 --- a/libpanto/src/conversation.zig +++ b/libpanto/src/conversation.zig @@ -71,6 +71,12 @@ pub const ResultPartStored = union(enum) { pub const ToolResultBlock = struct { tool_use_id: []const u8, parts: std.ArrayList(ResultPartStored) = .empty, + /// True when this result reports a tool failure rather than success. + /// Serialized to providers that support it (Anthropic's `is_error`); + /// recorded but unserialized for OpenAI Chat (the error text in `parts` + /// carries the signal there). Defaults to false for backward + /// compatibility with sessions written before this field existed. + is_error: bool = false, pub fn deinit(self: *ToolResultBlock, alloc: Allocator) void { alloc.free(self.tool_use_id); |
