дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(notebook): add native Jupyter notebook editing and execution (#268)
Opens .ipynb files in a native notebook editor, in a project or LightEdit. - crates/ide-notebook: lossless nbformat documents (unchanged notebooks save byte-for-byte, unknown fields kept, external changes detected) and owned local kernels over ZMQ via kernelspec — the selected Python environment only needs ipykernel, no Jupyter server. - ide-host owns notebook documents per project incarnation and admits one execution batch at a time; outputs stream over IPC channels and kernel status is an IdeEvent. - src/features/notebook: virtualized Python/Markdown cells, insert/delete/move/change type, Run Cell / Run All (Shift+Enter), interrupt, restart, interpreter selection from ide-sdk discovery, shared split views. Raw/unknown cells stay read-only. - Custom editor kinds take part in dirty state, save/save all, undo/redo and Save/Don't Save/Cancel; closing editors from other features awaits that decision. - Outputs: text, tracebacks, PNG/JPEG and sanitized SVG inline; HTML sanitized in a sandboxed iframe without allow-same-origin; JavaScript output is shown as inert source. - Explicit launches (opening a notebook from the OS) win over session restoration. Closes #131 Co-authored-by: dvictor357 <[email protected]>
Цей коміт міститься в:
1 джерело
3a1e47d872
коміт
0d368ba947
68 files changed
+9689
-219
No files matched your search
@@ -5,7 +5,8 @@
|
||||
*/
|
||||
import { registerActions } from "@/platform/actions";
|
||||
import { disconnectRemote } from "@/platform/remote";
|
||||
import { registerOverlay } from "@/workbench/contributions";
|
||||
import { maybeEditorService, registerOverlay } from "@/workbench/contributions";
|
||||
import { confirmLeaveProject } from "@/platform/project";
|
||||
import { ConnectHost } from "./ConnectDialog";
|
||||
import { reloadEnvironment } from "./environment";
|
||||
import { closeConnectDialog, openConnectDialog } from "./model";
|
||||
@@ -29,7 +30,15 @@ export function activate(): () => void {
|
||||
category: "File",
|
||||
keywords: ["ssh", "remote", "close"],
|
||||
when: "projectOpen",
|
||||
run: () => disconnectRemote(),
|
||||
run: async () => {
|
||||
if (!(await confirmLeaveProject())) return;
|
||||
try {
|
||||
await disconnectRemote();
|
||||
} catch (e) {
|
||||
maybeEditorService()?.cancelClose?.();
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "remote.reloadEnvironment",
|
||||
|
||||
Reference in new issue
Заблокувати користувача