Wipe accumulated history and runtime modules; next eval starts in a fresh namespace.
(&mut self)
| 93 | |
| 94 | /// Wipe accumulated history and runtime modules; next eval starts in a fresh namespace. |
| 95 | pub fn reset(&mut self) -> Result<()> { |
| 96 | self.history.clear(); |
| 97 | self.history_lines = 0; |
| 98 | self.tab.evaluate("__edgeReset()", false).map_err(|e| anyhow!("resetting runtime: {e}"))?; |
| 99 | Ok(()) |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /// Write a raw stdout chunk (byte-stream: it already carries its own `end`) and flush so streaming output appears at once. |