summaryrefslogtreecommitdiff
path: root/bs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-22 16:31:45 -0500
committerBen Sima <ben@bensima.com>2025-11-22 16:31:45 -0500
commitbb15513a94140c22aa3aea510314f60c94df4d97 (patch)
treee9ef6649236eadeb58f6dc445aba302e72edfb9c /bs
parent6f4b2c97a24967508f3970b46999052fd1f44e67 (diff)
feat: implement t-1o2bxd11zv9
The task to fix missing Time, Thread, and Credits in the Agent Log has been completed. **Changes Implemented:** 1. **`Omni/Agent/Log.hs`**: * Added `Data.Aeson` and `Data.ByteString` imports for JSON parsing. * Updated `Status` data type to include `statusThread`. * Implemented `LogEntry` data type and `FromJSON` instance to match the `amp` log format. * Added `processLogLine` function to parse JSON log lines and update the global status. * Updated `render` function to display the Thread ID. * Added logic to extract and format `Time` and `Credits` from log entries. 2. **`Omni/Agent/Worker.hs`**: * Added a log monitoring thread using `forkIO` in `runAmp`. * Implemented `monitorLog` to tail the `_/llm/amp.log` file and pass lines to `AgentLog.processLogLine`. * Added `waitForFile` to ensure the log monitor waits for the log file to be created. **Verification:** * Verified that both `Omni/Agent/Log.hs` and `Omni/Agent/Worker.hs` compile successfully using `bild` (ignoring the expected "no main" error for library modules). * Ran `lint` on both files with no errors. The agent status bar should now correctly display the Thread ID, elapsed/current Time, and Credits usage as parsed from the `amp` logs.
Diffstat (limited to 'bs')
0 files changed, 0 insertions, 0 deletions