diff options
Diffstat (limited to 'src/system_prompt.zig')
| -rw-r--r-- | src/system_prompt.zig | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/system_prompt.zig b/src/system_prompt.zig index b5423f8..6104034 100644 --- a/src/system_prompt.zig +++ b/src/system_prompt.zig @@ -467,12 +467,12 @@ fn openTmpSession(arena: Allocator, root: []const u8) !panto.session_manager.Ses return panto.session_manager.SessionManager.init(testing.allocator, testing.io, sessions, "/cwd"); } -/// Minimal agent harness for system-prompt tests: an empty registry and a -/// throwaway provider config, wrapping a session store and (optionally) an -/// adopted conversation. Holds the registry/config so the agent's borrowed -/// pointers stay valid for the agent's lifetime. +/// Minimal agent harness for system-prompt tests: a throwaway provider +/// config wrapping a session store and (optionally) an adopted +/// conversation. Post-R1 the agent owns its own (empty) tool registry, so +/// the harness only holds the config to keep the agent's borrowed pointer +/// valid for its lifetime. const SPAgentHarness = struct { - registry: panto.ToolRegistry, config: panto.config.Config, agent: panto.agent.Agent, @@ -481,17 +481,14 @@ const SPAgentHarness = struct { store: panto.session_store.SessionStore, adopted: ?panto.conversation.Conversation, ) void { - self.registry = panto.ToolRegistry.init(testing.allocator); self.config = .{ .provider = .{ .openai_chat = .{ .api_key = "k", .base_url = "u", .model = "m" } }, - .registry = &self.registry, }; self.agent = panto.agent.Agent.init(testing.allocator, testing.io, &self.config, store, adopted); } fn deinit(self: *SPAgentHarness) void { self.agent.deinit(); - self.registry.deinit(); } }; |
