Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/generators/erb/agent_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def copy_view_files
end
end

instructions_path = File.join(view_base_path, "instructions.text.erb")
template "instructions.text.erb.tt", instructions_path

actions.each do |action|
@action = action

Expand Down
1 change: 1 addition & 0 deletions lib/generators/erb/templates/instructions.text.erb.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Instructions for an AI agent
7 changes: 7 additions & 0 deletions test/generators/erb/agent_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,11 @@ class Erb::Generators::AgentGeneratorTest < Rails::Generators::TestCase
assert_match(/properties:/, content)
end
end

test "adds intruction view to agents view directory " do
run_generator [ "user" ]

assert_directory "app/views/user_agent"
assert_file "app/views/user_agent/instructions.text.erb"
end
end
Loading