From c2f727e188c1558bcc6b34569af2feab3b0366c0 Mon Sep 17 00:00:00 2001 From: T Date: Mon, 25 May 2026 22:54:43 -0600 Subject: phase 3 part 1 --- libpanto/src/provider.zig | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'libpanto/src/provider.zig') diff --git a/libpanto/src/provider.zig b/libpanto/src/provider.zig index 6d97bb7..177fc2f 100644 --- a/libpanto/src/provider.zig +++ b/libpanto/src/provider.zig @@ -1,6 +1,9 @@ const std = @import("std"); -const conversation = @import("conversation.zig"); + const config_mod = @import("config.zig"); +const conversation = @import("conversation.zig"); +const tool_registry_mod = @import("tool_registry.zig"); +pub const ToolRegistry = tool_registry_mod.ToolRegistry; pub const ContentBlockType = enum { Text, @@ -66,7 +69,12 @@ pub const Receiver = struct { }; pub const ProviderVTable = struct { - streamStep: *const fn (*anyopaque, *conversation.Conversation, *Receiver) anyerror!void, + streamStep: *const fn ( + *anyopaque, + *conversation.Conversation, + *const ToolRegistry, + *Receiver, + ) anyerror!void, deinit: *const fn (*anyopaque) void, }; @@ -103,8 +111,13 @@ pub const Provider = struct { } } - pub fn streamStep(self: Provider, conv: *conversation.Conversation, receiver: *Receiver) anyerror!void { - return self.vtable.streamStep(self.ptr, conv, receiver); + pub fn streamStep( + self: Provider, + conv: *conversation.Conversation, + tools: *const ToolRegistry, + receiver: *Receiver, + ) anyerror!void { + return self.vtable.streamStep(self.ptr, conv, tools, receiver); } pub fn deinit(self: Provider) void { -- cgit v1.3