mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
* Add lookbook + viewcomponent, organize design system file * Build menu component * Button updates * More button fixes * Replace all menus with new ViewComponent * Checkpoint: fix tests, all buttons and menus converted * Split into Link and Button components for clarity * Button cleanup * Simplify custom confirmation configuration in views * Finalize button, link component API * Add toggle field to custom form builder + Component * Basic tabs component * Custom tabs, convert all menu / tab instances in app * Gem updates * Centralized icon helper * Update all icon usage to central helper * Lint fixes * Centralize all disclosure instances * Dialog replacements * Consolidation of all dialog styles * Test fixes * Fix app layout issues, move to component with slots * Layout simplification * Flakey test fix * Fix dashboard mobile issues * Finalize homepage * Lint fixes * Fix shadows and borders in dark mode * Fix tests * Remove stale class * Fix filled icon logic * Move transparent? to public interface
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
<div data-controller="chat hotkey">
|
|
<%= 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 pb-24 lg:pb-4" 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>
|
|
|
|
<%# DESKTOP - Chat form %>
|
|
<div class="p-4 lg:mt-auto fixed lg:static left-0 bottom-16 w-full bg-surface">
|
|
<%= render "messages/chat_form", chat: @chat %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|