From 1b3545abb2cdbba3eb3b147781770bdfffc7b832 Mon Sep 17 00:00:00 2001 From: PJ Date: Fri, 12 Jun 2026 10:29:09 +0530 Subject: [PATCH] feat(trace): record action Source and LLMReasoning --- internal/trace/writer.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/trace/writer.go b/internal/trace/writer.go index 970d8be..77f10a2 100644 --- a/internal/trace/writer.go +++ b/internal/trace/writer.go @@ -82,6 +82,11 @@ type Action struct { Selector string `json:"selector,omitempty"` ResolvedBounds *BoundsRecord `json:"resolved_bounds,omitempty"` TapPoint *PointRecord `json:"tap_point,omitempty"` + // Source names the backend that chose this action: "llm" when the LLM + // action backend selected it, empty for the seeded picker. LLMReasoning is + // the model's short rationale, shown by the replay UI to explain the pick. + Source string `json:"source,omitempty"` + LLMReasoning string `json:"llm_reasoning,omitempty"` } type BoundsRecord struct {