   (let [buttons (-> pane .getChildren (.get 0) .getChildren seq)
         webview (-> pane .getChildren (.get 1))]
     (shortcuts/add-tooltips! buttons)
-    (init-console! webview runtime-state)))
+    (init-console! webview runtime-state clojure.main/repl)))

                (Platform/runLater
                  (fn []
                    (.executeScript engine cmd)))
                (recur (.read in-pipe ca))))))))
    (.start
      (Thread.
        (fn []
          (binding [*out* out
                    *err* out
                    *in* (LineNumberingPushbackReader. in)]
            (clojure.main/repl)))))))

(fdef init-console!
  :args (s/cat :webview spec/node? :runtime-state map?))
(defn init-console! [webview runtime-state]
  (let [engine (.getEngine webview)]
    (.load engine (str "http://localhost:"
                      (:web-port runtime-state)

          (proxy [Bridge] []
            (onload []
              (try
                (onload engine work-fn)
                (catch Exception e (.printStackTrace e)))))))))

(fdef init-builder!
