summaryrefslogtreecommitdiff
path: root/vrsite/templates/page-session.tmpl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-30 17:05:12 -0300
committerGabriel Schneider <[email protected]>2026-07-30 17:56:23 -0300
commit8ec4e135e318c7799b2576a8729493c063da4a97 (patch)
treeab37cdbb7f478eb996264cf941891f127f303c85 /vrsite/templates/page-session.tmpl
parentcb05c363045bf0e7af5858f6d7bc26f026fa9d70 (diff)
downloadnotevi-8ec4e135e318c7799b2576a8729493c063da4a97.tar.gz
notevi-8ec4e135e318c7799b2576a8729493c063da4a97.zip
Diffstat (limited to 'vrsite/templates/page-session.tmpl')
-rw-r--r--vrsite/templates/page-session.tmpl70
1 files changed, 70 insertions, 0 deletions
diff --git a/vrsite/templates/page-session.tmpl b/vrsite/templates/page-session.tmpl
new file mode 100644
index 0000000..9a35e8d
--- /dev/null
+++ b/vrsite/templates/page-session.tmpl
@@ -0,0 +1,70 @@
+{{/* One session's conversation, with its vr log woven in by time. */}}
+{{define "page-session"}}
+{{$c := .Conv}}
+<header class="filehead">
+ <h1>
+ {{if $c.Agent}}<span class="chip am{{$c.Bit}}">{{$c.Agent}}</span> {{end}}
+ <code title="{{$c.Session}}">{{short $c.Session}}</code>
+ </h1>
+ <p class="meta">
+ {{if $c.Model}}{{$c.Model}} · {{end}}{{$c.Reads}} reads · {{$c.Greps}} greps · {{$c.Notes}} notes
+ {{if $c.Dir}} · <span title="{{$c.Dir}}">{{base $c.Dir}}</span>{{end}}
+ {{if $c.Harness}} · {{$c.Harness}}{{end}}
+ </p>
+ {{if $c.Path}}
+ <p class="meta"><code>{{$c.Path}}</code></p>
+ {{else}}
+ <p class="meta hint">no transcript found for this session — searched
+ {{if $c.Roots}}{{range $i, $r := $c.Roots}}{{if $i}}, {{end}}<code>{{$r}}</code>{{end}}{{else}}nowhere: <code>-transcripts</code> is empty{{end}} ·
+ showing the vr log alone</p>
+ {{end}}
+ {{if $c.Err}}<p class="err">{{$c.Err}}</p>{{end}}
+</header>
+
+<section class="convpage">
+ {{if $c.Windowed}}
+ <p class="meta">
+ 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}}<a href="{{$c.AllHref}}">show the whole conversation</a>{{end}}
+ </p>
+ {{end}}
+
+ <div class="conv" data-anchor="{{$c.Anchor}}">
+ {{range $c.Turns}}
+ {{if .Note}}
+ <div class="turn t-note{{if .Here}} here{{end}}">
+ <span class="role">note</span><time>{{.Clock}}</time>
+ {{if .Note.File}}
+ <div class="notewrap" data-href="{{$.NoteHref .Note}}" tabindex="0" role="link"
+ title="open this note on the code it is about">{{template "note" (dict "N" .Note "P" $)}}</div>
+ {{else}}
+ <div class="notewrap">{{template "note" (dict "N" .Note "P" $)}}</div>
+ {{end}}
+ </div>
+ {{else if eq .Role "vr"}}
+ <div class="turn t-vr">
+ <span class="role">vr</span><time>{{.Clock}}</time>
+ {{if .File}}<a class="what" href="{{$.Href "code" .File}}">{{.Text}}</a>
+ {{else}}<span class="what">{{.Text}}</span>{{end}}
+ </div>
+ {{else if eq .Role "tool"}}
+ <div class="turn t-tool">
+ <span class="role">{{.Tool}}</span><time>{{.Clock}}</time>
+ <code class="what">{{.Detail}}</code>
+ </div>
+ {{else if eq .Role "result"}}
+ <div class="turn t-result{{if eq .Kind "error"}} bad{{end}}">
+ <span class="role">→{{if .Tool}} {{.Tool}}{{end}}</span><time></time>
+ <code class="what">{{.Detail}}</code>
+ </div>
+ {{else}}
+ <div class="turn t-say t-{{.Role}}">
+ <span class="role">{{.Role}}</span><time>{{.Clock}}</time>
+ <p>{{.Text}}</p>
+ </div>
+ {{end}}
+ {{end}}
+ {{if not $c.Turns}}<p class="meta hint">nothing recorded for this session</p>{{end}}
+ </div>
+</section>
+{{end}}