feat: add embedded ClojureScript REPL for interactive graph querying by andrewaylett · Pull Request #12393 · logseq/logseq

@andrewaylett @claude

The existing code block evaluation creates a fresh SCI context each time,
so defs don't accumulate and exploratory work is lost. This adds a
persistent, notebook-style REPL that maintains state across cells and
navigation, and exposes the graph's DataScript database for interactive
querying.

Accessible from the right sidebar (developer mode) and a dedicated /repl
route (dev builds only). Cells use CodeMirror with Clojure mode and
Shift+Enter to evaluate. Top-level convenience bindings (q, pull, entity,
db) and namespaced DataScript access (d/q, d/pull, etc.) are provided.

Ctrl+Space triggers autocomplete from the SCI context — includes initial
bindings, namespace-qualified symbols, and any user-defined vars.
Clojure-aware auto-indentation is enabled via smartIndent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>