diff options
| author | t <t@tjp.lol> | 2026-06-03 09:11:36 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-03 12:34:13 -0600 |
| commit | ac5c4898dfa0a9e57424336774893dfc72b132e9 (patch) | |
| tree | 03eb8e32a001845dbaec163dfd4905ffc23d9fa6 /libpanto/src/session_manager.zig | |
| parent | 2416a308c0e467f8dbdbe09942aa903bca751c0e (diff) | |
image uploads
Diffstat (limited to 'libpanto/src/session_manager.zig')
| -rw-r--r-- | libpanto/src/session_manager.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libpanto/src/session_manager.zig b/libpanto/src/session_manager.zig index c6256e0..bbc996b 100644 --- a/libpanto/src/session_manager.zig +++ b/libpanto/src/session_manager.zig @@ -1518,9 +1518,11 @@ test "SessionManager: tool-use round-trip — assistant w/ ToolUse, user w/ Tool // Tool-result user message. const tr = try testing.allocator.alloc(DiskContentBlock, 1); + const trp = try testing.allocator.alloc(session_mod.DiskResultPart, 1); + trp[0] = .{ .text = try testing.allocator.dupe(u8, "a.txt\nb.txt") }; tr[0] = .{ .tool_result = .{ .tool_use_id = try testing.allocator.dupe(u8, "tool_abc"), - .content = try testing.allocator.dupe(u8, "a.txt\nb.txt"), + .parts = trp, } }; _ = try mgr.appendMessage(.{ .role = .user, .content = tr }, "openai", "gpt-4o"); @@ -1551,7 +1553,7 @@ test "SessionManager: tool-use round-trip — assistant w/ ToolUse, user w/ Tool try testing.expectEqualStrings("openai", entries[2].message.provider.?); try testing.expect(entries[2].message.message.content[0] == .tool_result); try testing.expectEqualStrings("tool_abc", entries[2].message.message.content[0].tool_result.tool_use_id); - try testing.expectEqualStrings("a.txt\nb.txt", entries[2].message.message.content[0].tool_result.content); + try testing.expectEqualStrings("a.txt\nb.txt", entries[2].message.message.content[0].tool_result.parts[0].text); // Conversation rebuild yields the same shape. var conv = try resumed.rebuildConversation(); |
