{{/* One session's conversation, with its notevi log woven in by time. */}} {{define "page-session"}} {{$c := .Conv}}

{{if $c.Agent}}{{$c.Agent}} {{end}} {{short $c.Session}}

{{if $c.Model}}{{$c.Model}} · {{end}}{{$c.Reads}} reads · {{$c.Greps}} greps · {{$c.Notes}} notes {{if $c.Dir}} · {{base $c.Dir}}{{end}} {{if $c.Harness}} · {{$c.Harness}}{{end}}

{{if $c.Path}}

{{$c.Path}}

{{else}}

no transcript found for this session — searched {{if $c.Roots}}{{range $i, $r := $c.Roots}}{{if $i}}, {{end}}{{$r}}{{end}}{{else}}nowhere: -transcripts is empty{{end}} · showing the notevi log alone

{{end}} {{if $c.Err}}

{{$c.Err}}

{{end}}
{{if $c.Windowed}}

moments {{$c.From}}–{{$c.To}} of {{$c.Total}}{{if $c.Anchor}}, around the note{{end}} · {{if $c.Incomplete}}the rest is beyond what one page renders{{else}}show the whole conversation{{end}}

{{end}}
{{range $c.Turns}} {{if .Note}}
note {{if .Note.File}}
{{template "note" (dict "N" .Note "P" $)}}
{{else}}
{{template "note" (dict "N" .Note "P" $)}}
{{end}}
{{else if eq .Role "notevi"}}
notevi {{if .File}}{{.Text}} {{else}}{{.Text}}{{end}}
{{else if eq .Role "tool"}}
{{.Tool}} {{.Detail}}
{{else if eq .Role "result"}}
→{{if .Tool}} {{.Tool}}{{end}} {{.Detail}}
{{else}}
{{.Role}}

{{.Text}}

{{end}} {{end}} {{if not $c.Turns}}

nothing recorded for this session

{{end}}
{{end}}