From d6572b754cda7adb5567c519a64e6285090fe252 Mon Sep 17 00:00:00 2001 From: Jeremy Lewi Date: Tue, 16 Apr 2024 18:47:08 -0700 Subject: [PATCH] Fix bug with Execute request not sending the blockId if there is one. --- frontend/foyle/src/web/controller.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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[] = [];