import type { Chat } from "../types/chat"
import type { LlmModel } from "../types/llm"
import type { ToolName } from "../types/stream"
import type { WebSearchEngine } from "../types/web"


/**
 * Request payload for sending a message.
 */
export interface SendMessageRequestPayload {
  query: string
  messageId: string
  rootId?: string
  model: LlmModel
  webSearchEngine: WebSearchEngine
  enabledTools?: ToolName[]
  useDeepResearch?: boolean
  /**
   * Composed at submit time from the active page (when a surface is open)
   * plus any selected canvas nodes. The backend prepends this to the user
   * message so the agent knows what the user is looking at.
   */
  messageContext?: string
}


/**
 * Response type for sending a message.
 */
export interface VoidSuccessResponse {
  success: boolean
}


/**
 * Response type for listing chats.
 */
export interface ListChatsResponse extends VoidSuccessResponse {
  data: {
    chats: Chat[]
  }
}
