module Unison.Codebase.Editor.HandleInput.Projects
( handleProjects,
)
where
import U.Codebase.Sqlite.Queries qualified as Queries
import Unison.Cli.Monad (Cli)
import Unison.Cli.Monad qualified as Cli
import Unison.Codebase.Editor.Output qualified as Output
handleProjects :: Cli ()
handleProjects :: Cli ()
handleProjects = do
[Project]
projects <- Transaction [Project] -> Cli [Project]
forall a. Transaction a -> Cli a
Cli.runTransaction Transaction [Project]
Queries.loadAllProjects
NumberedOutput -> Cli ()
Cli.respondNumbered ([Project] -> NumberedOutput
Output.ListProjects [Project]
projects)