()
| 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) { |
no test coverage detected