mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
* WIP * WIP * WIP * WIP * WIP * WIP * WIP * format * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * fix conflict * fix conflict * chore: run rubocop * fix test * update PWA logo * fix tests * chore: lint * fix test * Refactor: Remove duplicate data attribute in activity partial and add chat form rendering in chats index --------- Co-authored-by: Josh Pigford <josh@joshpigford.com>
35 lines
1,018 B
Text
35 lines
1,018 B
Text
<%= turbo_frame_tag chat_frame do %>
|
|
<%= turbo_stream_from @chat %>
|
|
|
|
<h1 class="sr-only"><%= @chat.title %></h1>
|
|
|
|
<div class="flex flex-col h-full">
|
|
<div class="md:p-4">
|
|
<%= render "chats/chat_nav", chat: @chat %>
|
|
</div>
|
|
|
|
<div id="messages" class="grow overflow-y-auto p-4 space-y-6" data-chat-target="messages">
|
|
<% if @chat.conversation_messages.any? %>
|
|
<% @chat.conversation_messages.ordered.each do |message| %>
|
|
<%= render message %>
|
|
<% end %>
|
|
<% else %>
|
|
<div class="mt-auto">
|
|
<%= render "chats/ai_greeting", context: "chat" %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if params[:thinking].present? %>
|
|
<%= render "chats/thinking_indicator", chat: @chat %>
|
|
<% end %>
|
|
|
|
<% if @chat.error.present? && @chat.needs_assistant_response? %>
|
|
<%= render "chats/error", chat: @chat %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="p-4">
|
|
<%= render "messages/chat_form", chat: @chat %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|