more-compute 0.1.4__py3-none-any.whl → 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- frontend/app/globals.css +322 -77
- frontend/app/layout.tsx +98 -82
- frontend/components/Cell.tsx +234 -95
- frontend/components/Notebook.tsx +430 -199
- frontend/components/{AddCellButton.tsx → cell/AddCellButton.tsx} +0 -2
- frontend/components/cell/MonacoCell.tsx +726 -0
- frontend/components/layout/ConnectionBanner.tsx +41 -0
- frontend/components/{Sidebar.tsx → layout/Sidebar.tsx} +16 -11
- frontend/components/modals/ConfirmModal.tsx +154 -0
- frontend/components/modals/SuccessModal.tsx +140 -0
- frontend/components/output/MarkdownRenderer.tsx +116 -0
- frontend/components/popups/ComputePopup.tsx +674 -365
- frontend/components/popups/MetricsPopup.tsx +11 -7
- frontend/components/popups/SettingsPopup.tsx +11 -13
- frontend/contexts/PodWebSocketContext.tsx +247 -0
- frontend/eslint.config.mjs +11 -0
- frontend/lib/monaco-themes.ts +160 -0
- frontend/lib/settings.ts +128 -26
- frontend/lib/themes.json +9973 -0
- frontend/lib/websocket-native.ts +19 -8
- frontend/lib/websocket.ts +59 -11
- frontend/next.config.ts +8 -0
- frontend/package-lock.json +1705 -3
- frontend/package.json +8 -1
- frontend/styling_README.md +18 -0
- kernel_run.py +159 -42
- more_compute-0.2.0.dist-info/METADATA +126 -0
- more_compute-0.2.0.dist-info/RECORD +100 -0
- morecompute/__version__.py +1 -1
- morecompute/execution/executor.py +31 -20
- morecompute/execution/worker.py +68 -7
- morecompute/models/__init__.py +31 -0
- morecompute/models/api_models.py +197 -0
- morecompute/notebook.py +50 -7
- morecompute/server.py +574 -94
- morecompute/services/data_manager.py +379 -0
- morecompute/services/lsp_service.py +335 -0
- morecompute/services/pod_manager.py +122 -20
- morecompute/services/pod_monitor.py +138 -0
- morecompute/services/prime_intellect.py +87 -63
- morecompute/utils/config_util.py +59 -0
- morecompute/utils/special_commands.py +11 -5
- morecompute/utils/zmq_util.py +51 -0
- frontend/components/MarkdownRenderer.tsx +0 -84
- frontend/components/popups/PythonPopup.tsx +0 -292
- more_compute-0.1.4.dist-info/METADATA +0 -173
- more_compute-0.1.4.dist-info/RECORD +0 -86
- /frontend/components/{CellButton.tsx → cell/CellButton.tsx} +0 -0
- /frontend/components/{ErrorModal.tsx → modals/ErrorModal.tsx} +0 -0
- /frontend/components/{CellOutput.tsx → output/CellOutput.tsx} +0 -0
- /frontend/components/{ErrorDisplay.tsx → output/ErrorDisplay.tsx} +0 -0
- {more_compute-0.1.4.dist-info → more_compute-0.2.0.dist-info}/WHEEL +0 -0
- {more_compute-0.1.4.dist-info → more_compute-0.2.0.dist-info}/entry_points.txt +0 -0
- {more_compute-0.1.4.dist-info → more_compute-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {more_compute-0.1.4.dist-info → more_compute-0.2.0.dist-info}/top_level.txt +0 -0
frontend/app/layout.tsx
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
4
|
import Script from "next/script";
|
|
5
|
-
import Sidebar from "@/components/Sidebar";
|
|
5
|
+
import Sidebar from "@/components/layout/Sidebar";
|
|
6
6
|
import FolderPopup from "@/components/popups/FolderPopup";
|
|
7
7
|
import PackagesPopup from "@/components/popups/PackagesPopup";
|
|
8
|
-
import PythonPopup from "@/components/popups/PythonPopup";
|
|
9
8
|
import ComputePopup from "@/components/popups/ComputePopup";
|
|
10
9
|
import MetricsPopup from "@/components/popups/MetricsPopup";
|
|
11
10
|
import SettingsPopup from "@/components/popups/SettingsPopup";
|
|
11
|
+
import { ConnectionBanner } from "@/components/layout/ConnectionBanner";
|
|
12
|
+
import {
|
|
13
|
+
PodWebSocketProvider,
|
|
14
|
+
usePodWebSocket,
|
|
15
|
+
} from "@/contexts/PodWebSocketContext";
|
|
16
|
+
import { loadSettings, applyTheme } from "@/lib/settings";
|
|
12
17
|
import "./globals.css";
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
children,
|
|
16
|
-
}: Readonly<{
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
}>) {
|
|
19
|
+
function AppContent({ children }: { children: React.ReactNode }) {
|
|
19
20
|
const [appSettings, setAppSettings] = useState({});
|
|
20
|
-
const [pythonEnvironment, setPythonEnvironment] = useState(null);
|
|
21
21
|
const [activePopup, setActivePopup] = useState<string | null>(null);
|
|
22
|
+
const { connectionState, gpuPods, connectingPodId } = usePodWebSocket();
|
|
23
|
+
|
|
24
|
+
// Apply theme on initial mount
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const settings = loadSettings();
|
|
27
|
+
applyTheme(settings.theme);
|
|
28
|
+
}, []);
|
|
22
29
|
|
|
23
30
|
const handleSettingsChange = (settings: any) => {
|
|
24
31
|
console.log("Settings updated:", settings);
|
|
25
32
|
setAppSettings(settings);
|
|
26
33
|
};
|
|
27
34
|
|
|
28
|
-
const handleEnvironmentSwitch = (env: any) => {
|
|
29
|
-
console.log("Switching to environment:", env);
|
|
30
|
-
setPythonEnvironment(env);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
35
|
const togglePopup = (popupType: string) => {
|
|
34
36
|
setActivePopup((prev) => (prev === popupType ? null : popupType));
|
|
35
37
|
};
|
|
@@ -47,13 +49,6 @@ export default function RootLayout({
|
|
|
47
49
|
return <FolderPopup {...props} />;
|
|
48
50
|
case "packages":
|
|
49
51
|
return <PackagesPopup {...props} />;
|
|
50
|
-
case "python":
|
|
51
|
-
return (
|
|
52
|
-
<PythonPopup
|
|
53
|
-
{...props}
|
|
54
|
-
onEnvironmentSwitch={handleEnvironmentSwitch}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
52
|
case "compute":
|
|
58
53
|
return <ComputePopup {...props} />;
|
|
59
54
|
case "metrics":
|
|
@@ -73,10 +68,8 @@ export default function RootLayout({
|
|
|
73
68
|
return "Files";
|
|
74
69
|
case "packages":
|
|
75
70
|
return "Packages";
|
|
76
|
-
case "python":
|
|
77
|
-
return "Python Environment";
|
|
78
71
|
case "compute":
|
|
79
|
-
return "
|
|
72
|
+
return "Kernel";
|
|
80
73
|
case "metrics":
|
|
81
74
|
return "System Metrics";
|
|
82
75
|
case "settings":
|
|
@@ -86,6 +79,84 @@ export default function RootLayout({
|
|
|
86
79
|
}
|
|
87
80
|
};
|
|
88
81
|
|
|
82
|
+
// Get connecting pod name
|
|
83
|
+
const connectingPod = connectingPodId
|
|
84
|
+
? gpuPods.find((p) => p.id === connectingPodId)
|
|
85
|
+
: null;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<>
|
|
89
|
+
<ConnectionBanner
|
|
90
|
+
connectionState={connectionState}
|
|
91
|
+
podName={connectingPod?.name}
|
|
92
|
+
/>
|
|
93
|
+
<div id="app">
|
|
94
|
+
<Sidebar onTogglePopup={togglePopup} activePopup={activePopup} />
|
|
95
|
+
<div
|
|
96
|
+
id="popup-overlay"
|
|
97
|
+
className="popup-overlay"
|
|
98
|
+
style={{ display: activePopup ? "flex" : "none" }}
|
|
99
|
+
>
|
|
100
|
+
{activePopup && (
|
|
101
|
+
<div className="popup-content">
|
|
102
|
+
<div className="popup-header">
|
|
103
|
+
<h2 className="popup-title">{getPopupTitle()}</h2>
|
|
104
|
+
<button className="popup-close" onClick={closePopup}>
|
|
105
|
+
×
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
<div className="popup-body">{renderPopup()}</div>
|
|
109
|
+
</div>
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
<div
|
|
113
|
+
id="kernel-banner"
|
|
114
|
+
className="kernel-banner"
|
|
115
|
+
style={{ display: "none" }}
|
|
116
|
+
>
|
|
117
|
+
<div className="kernel-message">
|
|
118
|
+
<span className="kernel-status-text">🔴 Kernel Disconnected</span>
|
|
119
|
+
<span className="kernel-subtitle">
|
|
120
|
+
The notebook kernel has stopped running. Restart to continue.
|
|
121
|
+
</span>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div className="kernel-status-bar">
|
|
125
|
+
<div className="kernel-status-indicator">
|
|
126
|
+
<span
|
|
127
|
+
id="kernel-status-dot"
|
|
128
|
+
className="status-dot connecting"
|
|
129
|
+
></span>
|
|
130
|
+
<span id="kernel-status-text" className="status-text">
|
|
131
|
+
Connecting...
|
|
132
|
+
</span>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div className="main-content">{children}</div>
|
|
136
|
+
<div style={{ display: "none" }}>
|
|
137
|
+
<span id="connection-status">Connected</span>
|
|
138
|
+
<span id="kernel-status">Ready</span>
|
|
139
|
+
<img
|
|
140
|
+
id="copy-icon-template"
|
|
141
|
+
src="/assets/icons/copy.svg"
|
|
142
|
+
alt="Copy"
|
|
143
|
+
/>
|
|
144
|
+
<img
|
|
145
|
+
id="check-icon-template"
|
|
146
|
+
src="/assets/icons/check.svg"
|
|
147
|
+
alt="Copied"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export default function RootLayout({
|
|
156
|
+
children,
|
|
157
|
+
}: Readonly<{
|
|
158
|
+
children: React.ReactNode;
|
|
159
|
+
}>) {
|
|
89
160
|
const notebookPath = process.env.NEXT_PUBLIC_NOTEBOOK_PATH || "";
|
|
90
161
|
const notebookRoot = process.env.NEXT_PUBLIC_NOTEBOOK_ROOT || "";
|
|
91
162
|
|
|
@@ -104,64 +175,9 @@ export default function RootLayout({
|
|
|
104
175
|
/>
|
|
105
176
|
</head>
|
|
106
177
|
<body data-notebook-path={notebookPath} data-notebook-root={notebookRoot}>
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
id="popup-overlay"
|
|
111
|
-
className="popup-overlay"
|
|
112
|
-
style={{ display: activePopup ? "flex" : "none" }}
|
|
113
|
-
>
|
|
114
|
-
{activePopup && (
|
|
115
|
-
<div className="popup-content">
|
|
116
|
-
<div className="popup-header">
|
|
117
|
-
<h2 className="popup-title">{getPopupTitle()}</h2>
|
|
118
|
-
<button className="popup-close" onClick={closePopup}>
|
|
119
|
-
×
|
|
120
|
-
</button>
|
|
121
|
-
</div>
|
|
122
|
-
<div className="popup-body">{renderPopup()}</div>
|
|
123
|
-
</div>
|
|
124
|
-
)}
|
|
125
|
-
</div>
|
|
126
|
-
<div
|
|
127
|
-
id="kernel-banner"
|
|
128
|
-
className="kernel-banner"
|
|
129
|
-
style={{ display: "none" }}
|
|
130
|
-
>
|
|
131
|
-
<div className="kernel-message">
|
|
132
|
-
<span className="kernel-status-text">🔴 Kernel Disconnected</span>
|
|
133
|
-
<span className="kernel-subtitle">
|
|
134
|
-
The notebook kernel has stopped running. Restart to continue.
|
|
135
|
-
</span>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
<div className="kernel-status-bar">
|
|
139
|
-
<div className="kernel-status-indicator">
|
|
140
|
-
<span
|
|
141
|
-
id="kernel-status-dot"
|
|
142
|
-
className="status-dot connecting"
|
|
143
|
-
></span>
|
|
144
|
-
<span id="kernel-status-text" className="status-text">
|
|
145
|
-
Connecting...
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
<div className="main-content">{children}</div>
|
|
150
|
-
<div style={{ display: "none" }}>
|
|
151
|
-
<span id="connection-status">Connected</span>
|
|
152
|
-
<span id="kernel-status">Ready</span>
|
|
153
|
-
<img
|
|
154
|
-
id="copy-icon-template"
|
|
155
|
-
src="/assets/icons/copy.svg"
|
|
156
|
-
alt="Copy"
|
|
157
|
-
/>
|
|
158
|
-
<img
|
|
159
|
-
id="check-icon-template"
|
|
160
|
-
src="/assets/icons/check.svg"
|
|
161
|
-
alt="Copied"
|
|
162
|
-
/>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
178
|
+
<PodWebSocketProvider>
|
|
179
|
+
<AppContent>{children}</AppContent>
|
|
180
|
+
</PodWebSocketProvider>
|
|
165
181
|
<Script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js" />
|
|
166
182
|
<Script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/python/python.min.js" />
|
|
167
183
|
<Script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/addon/edit/closebrackets.min.js" />
|