Files
chatwoot/db/migrate/20260620165144_create_captain_message_generations.rb
PranavandClaude Opus 4.8 eb203bb144 feat(captain): capture and surface how a reply was generated
Records reasoning, citations (the FAQs the assistant found), the tool
path, and the model for each V1 Captain reply in a new
captain_message_generations table. The assistant reports the source IDs
it actually used so cited FAQs can be flagged, and handoff messages
capture the transfer reason.

Agents can expand any Captain message in the conversation (a sparkle
toggle on the timestamp line) to see this breakdown, fetched on demand
from a dedicated endpoint. Model is shown only in development.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 10:10:55 -07:00

17 lines
523 B
Ruby

class CreateCaptainMessageGenerations < ActiveRecord::Migration[7.1]
def change
create_table :captain_message_generations do |t|
t.references :message, null: false, index: { unique: true }
t.references :account, null: false
t.references :conversation, null: false
t.references :assistant, null: false
t.text :reasoning
t.string :model
t.jsonb :citations, null: false, default: []
t.jsonb :generation_path, null: false, default: []
t.timestamps
end
end
end