feat(foreign): own view sessions and clear outputs

foreign.session returns a handle from ordinary kernel/cell tables; view consumes only the 会话 binding. Sessions live in host foreign_doc. Without 会话, view cells run stateless one-shot. Add /api/session/clear and a Clear outputs button for every view page; clearing keeps persistent kernel state.
This commit is contained in:
cflmy committed 2026-10-18 12:42:15 +08:00
1 parent 01468ad976
commit fb28eee62f
21 files changed
+379 -75

No files matched your search

+5
View File
@@ -189,6 +189,11 @@ fn handle(root: &ViewRoot, request: Request) -> Result<()> {
notebook_api::api_close(&root.root, body)
})
}
"/api/session/clear" => {
return api_debug_post(request, |body| {
notebook_api::api_clear(&root.root, body)
})
}
"/api/session/cell/run" => {
return api_debug_post(request, |body| {
notebook_api::api_cell_run(&root.root, body)