diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 18:15:19 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 18:15:19 -0500 |
| commit | 12d099d7e2323ab1d2e06a0f9317814e4050c498 (patch) | |
| tree | 892295dbba0344a0e1c723b29333c9579ccb3e6f /Omni | |
| parent | 50f94ed0228ee98550ed1b8ff7d8e7cb6059efb6 (diff) | |
fix: fix compilation and lint errors
Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'Omni')
| -rw-r--r-- | Omni/Agent/Core.hs | 1 | ||||
| -rw-r--r-- | Omni/Agent/Log.hs | 15 | ||||
| -rw-r--r-- | Omni/Agent/Worker.hs | 1 |
3 files changed, 7 insertions, 10 deletions
diff --git a/Omni/Agent/Core.hs b/Omni/Agent/Core.hs index 2d09e39..a2594d6 100644 --- a/Omni/Agent/Core.hs +++ b/Omni/Agent/Core.hs @@ -1,7 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-core module Omni.Agent.Core where import Alpha diff --git a/Omni/Agent/Log.hs b/Omni/Agent/Log.hs index 07770d0..c78dc4b 100644 --- a/Omni/Agent/Log.hs +++ b/Omni/Agent/Log.hs @@ -2,10 +2,11 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-log +-- | Status of the agent for the UI module Omni.Agent.Log where import Alpha +import Control.Applicative ((<$>), (<*>)) import Data.Aeson ((.:), (.:?)) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as BL @@ -133,17 +134,15 @@ data LogEntry = LogEntry instance Aeson.FromJSON LogEntry where parseJSON = Aeson.withObject "LogEntry" <| \v -> - LogEntry - </ v - .: "message" + (LogEntry </ (v .: "message")) <*> v - .:? "threadId" + .:? "threadId" <*> v - .:? "credits" + .:? "credits" <*> v - .:? "totalCredits" + .:? "totalCredits" <*> v - .:? "timestamp" + .:? "timestamp" -- | Parse a log line and update status processLogLine :: Text -> IO () diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs index 9f9e3bb..a29feb4 100644 --- a/Omni/Agent/Worker.hs +++ b/Omni/Agent/Worker.hs @@ -1,7 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-worker module Omni.Agent.Worker where import Alpha |
