packages feed

A-gent-0.11.0.20: src/Agent/LLM/Message.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.Message
  ( Message(..)
  , AbsoluteFilePath
  , Files
  , Filter
  )
where

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

import           Internal.LLM ( AbsoluteFilePath, Files, Filter, Label, UUID )

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

data Message
  = Atom !String !Files
  | List !(Maybe Filter)
  | Path !Bool !(Maybe AbsoluteFilePath)
  | Repo
  | Root
  | Send ![String]
  | Text !String
  | Tmpl !(Maybe [AbsoluteFilePath])
  | Fill !(Maybe [AbsoluteFilePath])
  | Tail
  | Desc !UUID !Label
  | Diff !UUID
  | Disp
  | Meld
  | Pull
  | Push
  | Shed
  | Test !UUID

instance Show Message where
  show (Atom _ _) = "Atom"
  show (List _)   = "List"
  show (Path _ _) = "Path"
  show  Repo      = "Repo"
  show  Root      = "Root"
  show (Send _)   = "Send"
  show (Text _)   = "Text"
  show (Tmpl _)   = "Tmpl"
  show (Fill _)   = "Fill"
  show  Tail      = "Tail"
  show (Desc _ _) = "Desc"
  show (Diff _)   = "Diff"
  show  Disp      = "Disp"
  show  Meld      = "Meld"
  show  Pull      = "Pull"
  show  Push      = "Push"
  show  Shed      = "Shed"
  show (Test _)   = "Test"