feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557)

- Add API support for creating a thread
- Add API support for creating a message
- Remove uuid from thread (no longer required, we will use existing
websocket connection to send messages)
- Update message_type to a column (user, assistant, assistant_thinking)
This commit is contained in:
Pranav
2025-05-22 22:25:05 -07:00
committed by GitHub
parent e92f72b318
commit 8c0885e1d2
29 changed files with 505 additions and 52 deletions

View File

@@ -29,6 +29,7 @@ class Captain::Assistant < ApplicationRecord
has_many :inboxes,
through: :captain_inboxes
has_many :messages, as: :sender, dependent: :nullify
has_many :copilot_threads, dependent: :destroy_async
validates :name, presence: true
validates :description, presence: true