         (= command ":stack")
         (do (print-stack session)
             :stay)
+        (= command ":frame")
+        (do (print-frame session)
+            :stay)
         (= command ":lang")
         (do (set-locale arg)
             :stay)

    ":home - Navigate to the home menu of the app"
    ":lang <lang> - change the language to <lang> (e.g. :lang en)"
    ":today <date> - change the date returned by today()/now() (e.g. :today 2015-07-25). ':today' resets to today's date"
    ":stack - Show the current session frame stack"
    ":help - Show this message"))

(defn build-restore-user-sandbox [prototype-factory restore-file]

        (recur session))
      :else (throw (RuntimeException. "Unexpected frame request")))))

(defn print-frame-inner [steps]
  (doall
    (map
      (fn [step] (if (= (.getType step) SessionFrame/STATE_COMMAND_ID)
                   (println "COMMAND: " (.getId step))
                   (println "DATUM: " (.getId step) " - " (.getValue step))))
      steps)))

(defn print-frame [session]
  (let
    [frame (.getFrame session)
     steps (.getSteps frame)]
    (print-frame-inner steps)))

(defn print-stack [session]
  (let
    [frame-stack (.getFrameStack session)]
    (println "------- current frame -------")
    (print-frame session)
    (println "-----------------------------")
    (doall
      (map (fn [frame] (println "-------")
             (print-frame-inner (.getSteps frame))
             (println "-------")))
      frame-stack)))

;; String -> BuildType
;; where BuildType is one of
;; - :save, latest saved version of app
;; - :build, latest built version of app
;; - :release, latests starred version of app
