Commit ac76fef
Changed files (2)
lib
elelem
plugins
lib/elelem/plugins/builtins.rb
@@ -49,8 +49,7 @@ Elelem::Plugins.register(:builtins) do |agent|
Keep it minimal. No fluff.
PROMPT
- sub = Agent.new(agent.client, toolbox: agent.toolbox, terminal: agent.terminal, system_prompt: system_prompt)
- sub.turn("Generate AGENTS.md for this project")
+ agent.fork(system_prompt: system_prompt).turn("Generate AGENTS.md for this project")
end
agent.commands.register("reload", description: "Reload plugins and source") do
lib/elelem/agent.rb
@@ -33,6 +33,10 @@ module Elelem
@conversation.to_a(system_prompt: system_prompt)
end
+ def fork(system_prompt:)
+ Agent.new(client, toolbox: toolbox, terminal: terminal, system_prompt: system_prompt)
+ end
+
def turn(input)
@conversation.add(role: "user", content: input)
ctx = []