packages feed

A-gent-0.11.0.20: src/Internal/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 Internal.LLM.Action
  ( Action (..)
  , TextToFile
  )
where

--------------------------------------------------------------------------------

import qualified Internal.LLM      as INT

import qualified Agent.LLM.Message as MSG

--------------------------------------------------------------------------------

type TextToFile = String -> Either [String] [(FilePath, [INT.FileLine])]

data Action
  = None
  | Branch !String !INT.Files
  | Exit
  | Drop
  | File  !INT.File
  | Files !INT.Files
  | Help
  | Hist    !(Bool, Bool)
  | Message !MSG.Message
  | Mode    !Char !String
  | Paths   !INT.FilePaths
  | Pile
  --
  | Branches !INT.Branches
  --
  | Prompt !String
  | Batch  !String
  | Status
  | Sync
  | Stop
  --
  | Discover
  | Hole !(Maybe INT.AbsoluteFilePath)
  | Refine
  --
  | Ruck       !String
  | Template   !TextToFile ![INT.File] ![INT.File] ![INT.File]
  | UnknownCmd !String
  | Wipe
  --
  | Tests !INT.TestCases
  --
  | Exec
  | Halt