in src/persistence/store.ts [28:53]
export function storeHistory(
notebookModel: INotebookModel,
executionLog: ExecutionLogSlicer<LogCell>
) {
let cellExecutionsJson: JSONArray = [];
for (let cellExecution of executionLog.cellExecutions) {
let cell = cellExecution.cell;
let cellJson = new Object(null) as CellJson;
cellJson.id = cell.id;
cellJson.persistentId = cell.persistentId;
cellJson.executionEventId = cell.executionEventId;
cellJson.executionCount = cell.executionCount;
cellJson.hasError = cell.hasError;
cellJson.text = cell.text;
cellJson.outputs = cell.outputs;
let cellExecutionJson = new Object(null) as CellExecutionJson;
cellExecutionJson.cell = cellJson;
cellExecutionJson.executionTime = cellExecution.executionTime.toISOString();
cellExecutionsJson.push(cellExecutionJson);
}
notebookModel.metadata.set(EXECUTION_HISTORY_METADATA_KEY, cellExecutionsJson);
}