MCPcopy
hub / github.com/srcbookdev/srcbook / runCell

Function runCell

packages/web/src/components/cells/code.tsx:275–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273 };
274
275 function runCell() {
276 if (!channel) {
277 return false;
278 }
279 if (cell.status === 'running') {
280 return false;
281 }
282
283 setShowStdio(true);
284
285 // Update client side only. The server will know it's running from the 'cell:exec' event.
286 updateCellOnClient({ ...cell, status: 'running' });
287 clearOutput(cell.id);
288
289 // Add artificial delay to allow debounced updates to propagate
290 // TODO: Handle this in a more robust way
291 setTimeout(() => {
292 channel.push('cell:exec', {
293 cellId: cell.id,
294 });
295 }, DEBOUNCE_DELAY + 10);
296 }
297
298 function stopCell() {
299 if (!channel) {

Callers 1

ControlledCodeCellFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected