Skip to content

feat: persistent REPL, package auto-installer, plot solution button (v0.3.0) - #3

Merged
singhharsh1708 merged 1 commit into
mainfrom
feat/repl-session-pkg-manager
Jun 18, 2026
Merged

singhharsh1708 merged 1 commit into
mainfrom
feat/repl-session-pkg-manager

Conversation

@singhharsh1708

Copy link
Copy Markdown
Owner

Summary

  • Persistent Julia REPL session (replSession.ts) — keeps one Julia process alive for the whole VS Code session. Code is sent via stdin with a unique end-sentinel per run. Eliminates the ~2-3s startup cost after the first block run. Falls back to one-shot subprocess on the very first run while the session warms up. New command: SciML: Restart Julia Session.

  • Package auto-installer (packageManager.ts) — on file open/save, scans using X / import X statements and checks which packages are missing. Offers a one-click notification to install them via Pkg.add inside the REPL session.

  • Plot Solution button — the Variable Inspector now shows a 📈 button next to any ODESolution, SDESolution, BVPSolution, or OptimizationSolution binding. Clicking it runs Plots.plot(varName) in the active REPL session and opens the result in the Plot Viewer.

New files

  • src/replSession.ts
  • src/packageManager.ts

Test plan

  • Open a .jl file → REPL session starts in background (no prompt)
  • Run Block once (subprocess) → run again → second run is noticeably faster (no startup cost)
  • Open a file with using Plots not installed → notification appears → click Install → installs successfully
  • Solve an ODE, open Variable Inspector → ODESolution row has 📈 button → click → Plot Viewer opens
  • SciML: Restart Julia Session → status bar shows restart message → session recovers
  • npx tsc -p . — no errors

🤖 Generated with Claude Code

…button (v0.3.0)

Persistent REPL session (replSession.ts)
- Single Julia process kept alive for the whole VS Code session
- Code sent via stdin; unique end-sentinel per execution so outputs
  never bleed across runs
- Startup code disables output truncation and Pkg precompile noise
- Run Block now uses the session when ready → no 2-3s Julia startup
  cost on the second and subsequent runs
- Falls back to one-shot subprocess on first run while session starts
- New command: SciML: Restart Julia Session (refreshes the process)

Package auto-installer (packageManager.ts)
- On file open / save, scans for `using X` / `import X` statements
- Asks Julia which packages are missing from the active environment
- Offers a one-click notification: "Install X, Y, Z"
- Runs Pkg.add inside the REPL session; shows status bar progress

Plot Solution button (variableInspector.ts + extension.ts)
- Variable inspector now shows 📈 button on any ODESolution /
  SDESolution / BVPSolution / OptimizationSolution binding
- Clicking it runs `Plots.plot(varName)` in the REPL session and
  opens the result in the Plot Viewer side panel
@singhharsh1708
singhharsh1708 merged commit 933d680 into main Jun 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant