Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -502,17 +502,18 @@
const continueTooltip = { text: "Continue", shortcut: "Shift+Enter" };

onMount(() => {
// Auto-detect same-origin Flask backend (pip package mode), then check URL params
autoDetectBackend().then(() => initBackendFromUrl());

// Re-install runtime toolboxes from previous sessions and seed any
// preloaded catalog entries on first launch. Internally short-circuits
// when there's no work to do, so we can call it unconditionally.
// Bring up the Python backend the moment the page loads so the
// runtime is ready by the time the user clicks Run. Order matters:
// detect the active backend first, then initialise it, then run
// the toolbox bootstrap on top.
(async () => {
try {
await autoDetectBackend();
await initBackendFromUrl();
await initPyodide();
await bootstrapToolboxes();
} catch (e) {
console.error('[toolbox bootstrap]', e);
console.error('[startup]', e);
}
})();

Expand Down
Loading