feat(foreign): raw stdin, per-cell inputs and interrupt

Persistent Python/Node kernels receive raw program stdin per eval; foreign.session accepts an inputs table and view exposes per-cell stdin. Add session interrupt host API and view control.
This commit is contained in:
cflmy committed 2026-10-18 14:37:45 +08:00
1 parent c85f1a2829
commit 064522a338
9 files changed
+86 -2

No files matched your search

+4
View File
@@ -170,6 +170,10 @@ where
}
}
pub fn api_interrupt(root: &Path, body: &str) -> serde_json::Value {
with_session(root, body, "interrupted", |s| s.interrupt())
}
pub fn api_clear_cell(root: &Path, body: &str) -> serde_json::Value {
let v = body_value(body);
let cell = v.get("cell").and_then(|x| x.as_str()).unwrap_or("");