summaryrefslogtreecommitdiff
path: root/Omni/Agent/Worker.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-29 22:57:03 -0500
committerBen Sima <ben@bensima.com>2025-11-29 22:57:03 -0500
commitc74182c97355696db9028160bea2398df64d4246 (patch)
tree3ef61a035c032bfb9287963399f5a57da55eda1a /Omni/Agent/Worker.hs
parentf31e5845ed274be018bc7ffd27bb611d14f94956 (diff)
Inject task comments into agent context during work and review
Build and lint both pass. The implementation: 1. Updated `formatTask` in [Omni/Agent/Worker.hs](file:///home/ben/omni/ 2. Extracted deps formatting to a separate `formatDeps` helper for consi 3. Added `formatComments` and `formatComment` helpers that show timestam Task-Id: t-184
Diffstat (limited to 'Omni/Agent/Worker.hs')
-rw-r--r--Omni/Agent/Worker.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs
index 62ad4da..c07ed71 100644
--- a/Omni/Agent/Worker.hs
+++ b/Omni/Agent/Worker.hs
@@ -319,9 +319,15 @@ formatTask t =
<> Text.pack (show (TaskCore.taskUpdatedAt t))
<> "\n"
<> (if Text.null (TaskCore.taskDescription t) then "" else "Description:\n" <> TaskCore.taskDescription t <> "\n\n")
- <> (if null (TaskCore.taskDependencies t) then "" else "\nDependencies:\n" <> Text.unlines (map formatDep (TaskCore.taskDependencies t)))
+ <> formatDeps (TaskCore.taskDependencies t)
+ <> formatComments (TaskCore.taskComments t)
where
+ formatDeps [] = ""
+ formatDeps deps = "\nDependencies:\n" <> Text.unlines (map formatDep deps)
formatDep dep = " - " <> TaskCore.depId dep <> " [" <> Text.pack (show (TaskCore.depType dep)) <> "]"
+ formatComments [] = ""
+ formatComments cs = "\nComments/Notes:\n" <> Text.unlines (map formatComment cs)
+ formatComment c = " [" <> Text.pack (show (TaskCore.commentCreatedAt c)) <> "] " <> TaskCore.commentText c
formatCommitMessage :: TaskCore.Task -> Text -> Text
formatCommitMessage task ampOutput =