A-gent-0.11.0.20: src/Agent/LLM/Action.hs
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE NoGeneralizedNewtypeDeriving #-}
{-# LANGUAGE Safe #-}
--------------------------------------------------------------------------------
-- |
-- Copyright : (c) 2026 SPISE MISU ApS
-- License : SSPL-1.0 OR AGPL-3.0-only
-- Maintainer : SPISE MISU <mail+hackage@spisemisu.com>
-- Stability : experimental
--------------------------------------------------------------------------------
module Agent.LLM.Action
( Action
, TextToFile
-- * LLM (Internal)
, File, FilePaths, Root
-- * Methods
, none
, exit
, file
, files
, paths
, branch
, branches
, root
, template
, tests
, text
)
where
--------------------------------------------------------------------------------
import Internal.LLM
( Branch
, Branches
, File
, FilePaths
, Root
, TestCases
)
import qualified Internal.LLM as INT
import Internal.LLM.Action ( Action, TextToFile )
import qualified Internal.LLM.Action as ACT
import qualified Agent.LLM.Message as MSG
--------------------------------------------------------------------------------
none :: Action
none =
ACT.None
exit :: Action
exit =
ACT.Exit
file :: File -> Action
file =
ACT.File
files :: [File] -> Action
files =
ACT.Files . INT.Files
paths :: FilePaths -> Action
paths =
ACT.Paths
branch :: Branch -> Action
branch =
ACT.Branches . INT.Branches . (:[])
branches :: Branches -> Action
branches =
ACT.Branches
root :: Root -> Action
root (INT.Root afp) =
ACT.Paths $ INT.FilePaths [afp]
template
:: TextToFile
-> [File]
-> [File]
-> [File]
-> Action
template =
ACT.Template
tests :: TestCases -> Action
tests =
ACT.Tests
text :: String -> Action
text =
ACT.Message . MSG.Text