| Age | Commit message (Collapse) | Author |
|
The build and tests pass. Let me provide a summary of the changes made:
Removed the amp dependency entirely from the codebase:
- Removed `runAmp` function (was running amp subprocess) - Removed
`shouldUseEngine` function (env var check `JR_USE_ENGINE`) - Removed
`monitorLog` and `waitForFile` helpers (for amp.log parsing) - Removed
unused imports: `System.IO`, `Data.Text.IO` - Made `runWithEngine`
the default/only path - Updated error messages from "amp" to "engine" -
Renamed `ampOutput` parameter to `agentOutput` in `formatCommitMessage
- Added `Data.IORef` import for `newIORef`, `modifyIORef'`, `readIORef`
- Removed amp.log parsing code: `LogEntry`, `processLogLine`,
`updateFro - Removed unused imports: `Data.Aeson`,
`Data.ByteString.Lazy`, `Data.Te
- Renamed `activityAmpThreadUrl` to `activityThreadUrl`
- Updated field references from `activityAmpThreadUrl` to
`activityThrea - Updated UI label from "Amp Thread:" to "Session:"
- Updated comment from "amp completes" to "engine completes"
- Updated `Amp.execute` to `Engine.runAgent` - Updated logging section
to describe Engine callbacks instead of amp.lo - Updated integration
test guidance to mock Engine instead of amp binary
Task-Id: t-141.6
|
|
All tests pass. Let me summarize what was implemented:
- Extended `TaskActivity` type with new fields:
- `activityAmpThreadUrl` - Link to amp thread - `activityStartedAt` -
Work start timestamp - `activityCompletedAt` - Work completion
timestamp - `activityCostCents` - API cost in cents -
`activityTokensUsed` - Token usage count
- Updated `SQL.FromRow` and `SQL.ToRow` instances for the new fields -
Updated schema to include new columns in `task_activity` table - Added
`logActivityWithMetrics` function to log activities with all met -
Added `updateActivityMetrics` function to update metrics on existing
a - Added `getLatestRunningActivity` helper function
- Captures execution timing (start/end timestamps) - Retrieves amp
thread URL from `AgentLog.getStatus` - Converts credits to cents
and logs to activity record - Uses `logActivityWithMetrics` and
`updateActivityMetrics` for tracking
- Added `getStatus` function to retrieve current status (thread
URL, cre
- Added `TaskMetricsPartial` type for HTMX auto-refresh - Extended
`TaskDetailPage` to include `RetryContext` - Added Execution Details
section on task detail page showing:
- Amp Thread URL (clickable link) - Duration (formatted as "Xm Ys")
- Cost (formatted as "$X.XX") - Retry Attempt count (if applicable)
- Last Activity timestamp
- Added `/partials/task/:id/metrics` endpoint for HTMX auto-refresh
- Auto-refresh enabled while task is InProgress (every 5s) - Added
`renderExecutionDetails` helper function
- Added `executionDetailsStyles` for metric rows and execution section
- Added dark mode support for execution details section
Task-Id: t-148.4
|
|
Task-Id: t-1o2g8gu6p8o
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-cb6b70cf-bfac-4ef2-bad9-280aa47efacf
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com>
|
|
https: //ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-5a2ca80d-5cba-409f-a262-6b5c652c257d
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-7109f8d0-feb4-4a24-bc4b-37743227e2cb
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID:
https://ampcode.com/threads/T-7109f8d0-feb4-4a24-bc4b-37743227e2cb
Co-authored-by: Amp <amp@ampcode.com>
|
|
|