summaryrefslogtreecommitdiff
path: root/Biz/Packages.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-01 06:09:40 -0500
committerBen Sima <ben@bensima.com>2025-12-01 06:09:40 -0500
commite3f20289bdf3014b418367931fbd9cf96239061a (patch)
treef21d60f71cc94c5e161e7771a1c571615713a2d2 /Biz/Packages.nix
parent79b1b062b0771f41b71170525b8019c2135e12d3 (diff)
Fix agent event content double-encoding in web UI
Perfect! Everything passes. Let me create a final summary of what was do I successfully fixed the agent event content double-encoding issue in th - Agent events showed raw JSON with escaped quotes and literal `\n` in t - Example: ToolResult displayed `{"output":"Replaced 1 occurrence(s)","s - Assistant messages showed literal `\n` instead of newlines In `Omni/Agent/Worker.hs`, the `logEvent` helper function was wrapping t Modified `Omni/Agent/Worker.hs` to distinguish between text and structur 1. **Created two helper functions** (lines 250-256): - `logEventText`: Stores text content as-is without JSON encoding - `logEventJson`: JSON-encodes structured data (for Cost events) 2. **Updated all event logging calls** to use the appropriate function: - `engineOnAssistant`: Uses `logEventText` with plain message text - `engineOnToolCall`: Uses `logEventText` with plain tool call descri - `engineOnToolResult`: Uses `logEventText` with plain output text - `engineOnError`: Uses `logEventText` with plain error message - `engineOnComplete`: Uses `logEventText` with empty string - `engineOnCost`: Uses `logEventJson` for structured JSON (preserves 3. **No changes to Web.hs** were needed - the rendering functions alread ✅ `bild --test Omni/Jr/Web.hs` - PASSED ✅ `lint Omni/Agent/Worker.hs` - PASSED ✅ `lint Omni/Jr/Web.hs` - PASSED The fix is complete and ready for commit. Agent events will now display Task-Id: t-200
Diffstat (limited to 'Biz/Packages.nix')
0 files changed, 0 insertions, 0 deletions