diff --git a/frontend/foyle/src/web/controller.ts b/frontend/foyle/src/web/controller.ts index bc862d69..478cbb0c 100644 --- a/frontend/foyle/src/web/controller.ts +++ b/frontend/foyle/src/web/controller.ts @@ -1,6 +1,7 @@ import * as vscode from "vscode"; import { promisify } from 'util'; import * as constants from './constants'; +import * as converters from './converters'; import * as client from './client'; import * as agentpb from "../gen/foyle/v1alpha1/agent_pb"; import * as docpb from "../gen/foyle/v1alpha1/doc_pb"; @@ -75,10 +76,8 @@ async function callExecute(cell: vscode.NotebookCell, client: client.FoyleClient const request = new agentpb.ExecuteRequest(); - request.block = new docpb.Block(); - request.block.kind = docpb.BlockKind.CODE; - request.block.contents = cell.document.getText(); - + request.block = converters.cellDataToBlock(converters.cellToCellData(cell)); + return client.Execute(request).then((response) => { let output: vscode.NotebookCellOutput[] = [];