query getCopilotHistories(
  $workspaceId: String!
  $docId: String
  $options: QueryChatHistoriesInput
) {
  currentUser {
    copilot(workspaceId: $workspaceId) {
      histories(docId: $docId, options: $options) {
        sessionId
        tokens
        action
        createdAt
        messages {
          role
          content
          attachments
          createdAt
        }
      }
    }
  }
}
