Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibondarev committed Sep 29, 2024
1 parent 05d4b12 commit 8d9cb81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def create_controller_file
def create_view_files
template "assistant/views/_message.html.erb", "app/views/assistants/_message.html.erb"
template "assistant/views/_message_form.html.erb", "app/views/assistants/_message_form.html.erb"
template "assistant/views/chat.turbo_stream.erb", "app/views/assistants/chat.turbo_stream.erb"
template "assistant/views/index.html.erb", "app/views/assistants/index.html.erb"
template "assistant/views/new.html.erb", "app/views/assistants/new.html.erb"
template "assistant/views/show.html.erb", "app/views/assistants/show.html.erb"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<%%= turbo_stream.append "chat-messages", partial: "assistants/message", locals: { message: @message } %>
<%%= turbo_stream.append "chat-messages", partial: "assistants/message", locals: { message: @response } %>
<%%= turbo_stream.replace "new_message" do %>
<%%= render "assistants/message_form" %>
<%% end %>

0 comments on commit 8d9cb81

Please sign in to comment.