{{template "app-header" .}}
{{icon "chevron-left"}}

Session: {{.Session.Summary.SessionID}}

CWD: {{.Session.Summary.CWD}} Branch: {{.Session.Summary.GitBranch}} Mode: {{if .Session.Summary.ReviewMode}}{{.Session.Summary.ReviewMode}}{{else}}-{{end}} {{if eq .Session.Summary.ReviewMode "range"}} From: {{.Session.Summary.DiffFrom}} To: {{.Session.Summary.DiffTo}} {{end}} {{if eq .Session.Summary.ReviewMode "commit"}} Commit: {{.Session.Summary.DiffCommit}} {{end}} Model: {{.Session.Summary.Model}} Duration: {{formatDuration .Session.Summary.DurationSec}} Files: {{.Session.Summary.FileCount}} Status: {{template "meta-status" .Session.Summary}}
{{if .Session.Summary.RunManifest}}

Coverage

Selected
{{.Session.Summary.SelectedCount}}
Completed
{{.Session.Summary.CompletedCount}}
Reused
{{.Session.Summary.ReusedCount}}
Failed
{{.Session.Summary.FailedCount}}
Waived
{{.Session.Summary.WaivedCount}}
{{end}}

Token Usage

Prompt Tokens
{{formatNumber .Session.TokenUsage.TotalPromptTokens}}
Completion Tokens
{{formatNumber .Session.TokenUsage.TotalCompletionTokens}}
Total Tokens
{{formatNumber (add .Session.TokenUsage.TotalPromptTokens .Session.TokenUsage.TotalCompletionTokens)}}
LLM Requests
{{formatNumber .Session.TokenUsage.RequestCount}}
{{if or .Session.TokenUsage.TotalCacheReadTokens .Session.TokenUsage.TotalCacheWriteTokens}}
Cache Read
{{formatNumber .Session.TokenUsage.TotalCacheReadTokens}}
Cache Write
{{formatNumber .Session.TokenUsage.TotalCacheWriteTokens}}
{{end}} {{if .Session.Summary.LLMFailures}}
LLM Failures
{{.Session.Summary.LLMFailures}}
{{end}}
{{with .Session.TokenUsage.FileTokenBreakdown}}
File breakdown {{countLabel (len .) "file" "files"}}
{{if or $.Session.TokenUsage.TotalCacheReadTokens $.Session.TokenUsage.TotalCacheWriteTokens}}{{end}} {{range .}} {{if or $.Session.TokenUsage.TotalCacheReadTokens $.Session.TokenUsage.TotalCacheWriteTokens}}{{end}} {{end}}
FilePromptCompletionCache ReadCache WriteTotal
{{sessionTaskLabel .FilePath | truncate 60}} {{formatNumber .PromptTokens}} {{formatNumber .CompletionTokens}}{{formatNumber .CacheReadTokens}}{{formatNumber .CacheWriteTokens}}{{formatNumber (add .PromptTokens .CompletionTokens)}}
{{end}}
{{if .Session.Comments}}

Review Comments ({{len .Session.Comments}} findings)

{{with severityCounts .Session.Comments}}
Severity: {{if .Critical}}{{end}} {{if .High}}{{end}} {{if .Medium}}{{end}} {{if .Low}}{{end}}
{{end}} {{with categoryCounts .Session.Comments}}
Category: {{if .Bug}}{{end}} {{if .Security}}{{end}} {{if .Performance}}{{end}} {{if .Maintainability}}{{end}} {{if .Test}}{{end}} {{if .Style}}{{end}} {{if .Documentation}}{{end}} {{if .Other}}{{end}}
{{end}}
{{range groupCommentsByFile .Session.Comments}}
{{.FilePath}} {{len .Comments}} comments
{{range .Comments}} {{$lines := numberedCodeLines .ExistingCode .StartLine .EndLine}} {{$numbered := and $lines (index $lines 0).Num}}
{{if .Category}}{{.Category}}{{end}} {{if .Severity}}{{.Severity}}{{end}} {{if .StartLine}}L{{.StartLine}}{{if and .EndLine (ne .EndLine .StartLine)}}-L{{.EndLine}}{{end}}{{end}}
{{.Content}}
{{if or .ExistingCode .SuggestionCode}}
{{if .ExistingCode}}
Existing Code
{{if $numbered}}
{{range $i, $l := $lines}}{{if $i}}
{{end}}{{$l.Text}}{{end}}
{{else}}
{{.ExistingCode}}
{{end}}
{{end}} {{if .SuggestionCode}}
Suggested Change
{{.SuggestionCode}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}} {{if .Session.Summary.FilesReviewed}}
Files Reviewed {{countLabel (len .Session.Summary.FilesReviewed) "file" "files"}}
    {{range .Session.Summary.FilesReviewed}}
  • {{.}}
  • {{end}}
{{end}} {{if .Session.SessionTasks}}
Session Tasks {{countLabel (len .Session.SessionTasks) "task" "tasks"}}
{{range .Session.SessionTasks}} {{template "task-cards" .}} {{end}}
{{end}} {{if .Session.Files}}
Conversations {{countLabel (len .Session.Files) "file" "files"}}
{{range .Session.Files}} {{template "task-cards" .}} {{end}}
{{end}}
{{define "breadcrumbs"}}/{{.RepoName}}/{{.Session.Summary.SessionID | truncate 12}}{{end}} {{/* Terminal-state rendering for the meta bar: classed by outcome, unclassed for unrecognized states. Invoked with .Session.Summary as dot. */}} {{define "meta-status"}}{{if .Aborted}}aborted{{else if .Legacy}}legacy{{else if eq .TerminalState "complete"}}complete{{else if eq .TerminalState "partial"}}partial{{else if eq .TerminalState "failed"}}failed{{else if eq .TerminalState "skipped"}}skipped{{else}}{{.TerminalState}}{{end}}{{end}} {{define "task-cards"}}
{{sessionTaskLabel .FilePath}} {{countLabel (cardCount .Tasks) "request" "requests"}}
{{range $tg := orderedTasks .Tasks}}

{{$tg.Type}}

{{range $tg.Cards}} {{$card := .}}
Request #{{.RequestNo}} {{if .Model}}{{.Model}}{{end}} {{if or .PromptTokens .CompletionTokens}}P:{{formatNumber .PromptTokens}} C:{{formatNumber .CompletionTokens}}{{if or .CacheReadTokens .CacheWriteTokens}} CR:{{formatNumber .CacheReadTokens}} CW:{{formatNumber .CacheWriteTokens}}{{end}}{{end}} {{if .DurationMs}}{{.DurationMs}}ms{{end}} {{if .Error}}Error{{end}}
{{if .Error}}
Error Detail
{{.Error}}
{{end}} {{with .ReasoningContent}}
Reasoning
{{.}}
{{end}} {{if isGrouping $tg.Type}} {{with groupingView $card}}
{{range .}}
{{.Label}}
    {{range .Files}} {{if .Resolved}}
  • {{.Path}}
  • {{else}}
  • #{{.Index}}
  • {{end}} {{end}}
{{end}}
{{with $card.ResponseContent}}
Raw LLM response
{{.}}
{{end}} {{else}} {{template "responseBody" $card.ResponseContent}} {{end}} {{else}} {{template "responseBody" .ResponseContent}} {{end}} {{if .ToolCalls}}
Tool Calls ({{len .ToolCalls}})
{{range .ToolCalls}}
{{.Name}} {{if .DurationMs}}{{.DurationMs}}ms{{end}} {{if not .Ok}}Failed{{end}}
Show Details
{{.Arguments}}
{{if .Result}}
{{.Result}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}} {{define "responseBody"}} {{with .}}
{{.}}
{{end}} {{end}}