diff --git a/app/controllers/chats_controller.rb b/app/controllers/chats_controller.rb index b000747a..b1f3dafa 100644 --- a/app/controllers/chats_controller.rb +++ b/app/controllers/chats_controller.rb @@ -23,10 +23,7 @@ class ChatsController < ApplicationController set_last_viewed_chat(@chat) - # TODO: Enable again - # ProcessAiResponseJob.perform_later(@message) - - redirect_to chat_path(@chat, thinking: true) + redirect_to chat_path(@chat) end def edit diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 26fab93a..d4324cdf 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -5,9 +5,6 @@ class MessagesController < ApplicationController def create @message = @chat.messages.create!(message_params) - # TODO: Enable again - # ProcessAiResponseJob.perform_later(@message) - respond_to do |format| format.html { redirect_to chat_path(@chat) } format.turbo_stream diff --git a/app/jobs/process_ai_response_job.rb b/app/jobs/process_ai_response_job.rb index a9a6f029..08c32f1c 100644 --- a/app/jobs/process_ai_response_job.rb +++ b/app/jobs/process_ai_response_job.rb @@ -14,9 +14,6 @@ class ProcessAiResponseJob < ApplicationJob chat.update(title: new_title) end - # Show initial thinking indicator - use replace instead of update to ensure it works for follow-up messages - update_thinking_indicator(chat, "Thinking...") - # Processing steps with progress updates begin # Step 1: Preparing request @@ -93,20 +90,9 @@ class ProcessAiResponseJob < ApplicationJob def update_thinking_indicator(chat, message) Turbo::StreamsChannel.broadcast_replace_to( chat, - target: "thinking", - html: <<~HTML -
Thinking...
+<%= message %>