feat(runs,ui): the trail shows each model request and response, connector calls and delivery attempts

The run trail exposes the model request the journal recorded and its finish reason. Each model and tool step opens a Request and a Response, and each decision lists the connector calls behind it. The composer lists each delivery attempt with its outcome and response.
This commit is contained in:
sam committed 2026-11-16 12:06:05 +11:00
1 parent db36d853ce
commit 46372b51d5
5 files changed
+115 -18

No files matched your search

+11 -5
View File
@@ -101,11 +101,16 @@ type TrailEntry struct {
Reasoning string `json:"reasoning,omitzero"`
ToolCalls []ToolCallView `json:"tool_calls,omitzero"`
Usage *chat.Usage `json:"usage,omitzero"`
Input string `json:"input,omitzero"`
Output string `json:"output,omitzero"`
Value jsontext.Value `json:"value,omitzero"`
Error string `json:"error,omitzero"`
Unknown bool `json:"unknown,omitzero"`
// Request is the model request exactly as it was sent: the messages, the
// tools offered and the sampling settings.
Request jsontext.Value `json:"request,omitzero"`
// FinishReason is the wire finish reason of a model call.
FinishReason string `json:"finish_reason,omitzero"`
Input string `json:"input,omitzero"`
Output string `json:"output,omitzero"`
Value jsontext.Value `json:"value,omitzero"`
Error string `json:"error,omitzero"`
Unknown bool `json:"unknown,omitzero"`
}
// ToolCallView is a tool call a model asked for.
@@ -331,6 +336,7 @@ func entry(s store.Recorded) TrailEntry {
if je.Kind == agentloop.EntryCompact {
e.Kind = "compaction"
}
e.Request, e.FinishReason = je.Request, je.FinishReason
usage := je.Usage
e.Usage = &usage
if je.Message != nil {