← Back to task

Commit c74182c9

commit c74182c97355696db9028160bea2398df64d4246
Author: Ben Sima <ben@bensima.com>
Date:   Sat Nov 29 22:57:03 2025

    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

diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs
index 62ad4dac..c07ed711 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 =