import type { GraphData } from '@/types/graph'
import type { ResearchReference } from '@/types/document'

export type QAChunkType = 'thinking' | 'text' | 'reference' | 'graph' | 'done' | 'error'

export interface QAChunk {
  type: QAChunkType
  content?: string
  doc_id?: string
  title?: string
  doc_number?: string
  chunk_index?: number
  relevance_score?: number
  nodes?: GraphData['nodes']
  edges?: GraphData['edges']
}

export interface QAReference extends ResearchReference {}

export interface QAMessage {
  role: 'user' | 'assistant'
  content: string
  references?: QAReference[]
  graphData?: GraphData
  suggestions?: string[]
  timestamp: number
}