// tslint:disable:max-line-length import { Action, ErrorAction, HasCell, HasContent, HasKernel, makeActionFunction, makeErrorActionFunction, makeZeroArgActionFunction, MaybeHasContent } from "../utils"; import { CellId } from "@nteract/commutable"; export const SEND_EXECUTE_REQUEST = "SEND_EXECUTE_REQUEST"; export const EXECUTE_CELL = "EXECUTE_CELL"; export const EXECUTE_ALL_CELLS = "EXECUTE_ALL_CELLS"; export const EXECUTE_ALL_CELLS_ABOVE = "EXECUTE_ALL_CELLS_ABOVE"; export const EXECUTE_ALL_CELLS_BELOW = "EXECUTE_ALL_CELLS_BELOW"; export const EXECUTE_FOCUSED_CELL = "EXECUTE_FOCUSED_CELL"; export const EXECUTE_CANCELED = "EXECUTE_CANCELED"; export const EXECUTE_FAILED = "EXECUTE_FAILED"; export const SET_EXECUTION_STATE = "SET_EXECUTION_STATE"; export const ENQUEUE_ACTION = "ENQUEUE_ACTION"; export const CLEAR_MESSAGE_QUEUE = "CLEAR_MESSAGE_QUEUE"; export type SendExecuteRequest = Action ; export type ExecuteCell = Action ; export type ExecuteAllCells = Action ; export type ExecuteAllCellsAbove = Action ; export type ExecuteAllCellsBelow = Action ; export type ExecuteFocusedCell = Action ; export type ExecuteCanceled = Action ; export type ExecuteFailed = ErrorAction; export type SetExecutionStateAction = Action ; export type EnqueueAction = Action ; export type ClearMessageQueue = Action ; export const sendExecuteRequest = makeActionFunction (SEND_EXECUTE_REQUEST); export const executeCell = makeActionFunction (EXECUTE_CELL); export const executeAllCells = makeActionFunction (EXECUTE_ALL_CELLS); export const executeAllCellsAbove = makeActionFunction (EXECUTE_ALL_CELLS_ABOVE); export const executeAllCellsBelow = makeActionFunction (EXECUTE_ALL_CELLS_BELOW); export const executeFocusedCell = makeActionFunction (EXECUTE_FOCUSED_CELL); export const executeCanceled = makeActionFunction (EXECUTE_CANCELED); export const executeFailed = makeErrorActionFunction (EXECUTE_FAILED); export const setExecutionState = makeActionFunction (SET_EXECUTION_STATE); export const enqueueAction = makeActionFunction (ENQUEUE_ACTION); export const clearMessageQueue = makeZeroArgActionFunction (CLEAR_MESSAGE_QUEUE);