3131 }
3232 pre {
3333 margin : 0 ;
34+ white-space : pre-wrap;
3435 }
3536 .widget {
3637 font-family : monospace;
3738 }
39+ .response-text {
40+ white-space : pre-wrap;
41+ }
42+ summary {
43+ font-weight : bold;
44+ font-size : large;
45+ cursor : pointer;
46+ }
3847 </ style >
3948 < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css ">
4049 < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js "> </ script >
4150 < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/lua.min.js "> </ script >
51+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/json.min.js "> </ script >
4252</ head >
4353< body >
4454< h1 > Reported thread</ h1 >
@@ -52,16 +62,16 @@ <h1>Reported thread</h1>
5262< div class ="context-storage ">
5363 < h2 > Context Storage</ h2 >
5464 {{if .ContextStorage.POIs}}
55- < h3 > POIs</ h3 >
56- < ol >
57- {{range .ContextStorage.POIs}}
58- < li > < code > {{.}}</ code > </ li >
59- {{end}}
60- </ ol >
65+ < details >
66+ < summary > POIs</ summary >
67+ < pre > {{jsonify .ContextStorage.POIs}}</ pre >
68+ </ details >
6169 {{end}}
6270 {{if .ContextStorage.LastRoute}}
63- < h3 > Last Route</ h3 >
64- < p > < code > {{.ContextStorage.LastRoute}}</ code > </ p >
71+ < details >
72+ < summary > Last Route</ summary >
73+ < pre > {{jsonify .ContextStorage.LastRoute}}</ pre >
74+ </ details >
6575 {{end}}
6676</ div >
6777{{end}}
@@ -101,21 +111,7 @@ <h3>Last Route</h3>
101111 {{else if .FunctionResponse}}
102112 < div class ="turn function ">
103113 < p class ="speaker "> Function: < code > {{.FunctionResponse.Name}}</ code > </ p >
104- < div class ="function_args ">
105- < table >
106- < tr >
107- < th > Key</ th >
108- < th > Value</ th >
109- </ tr >
110- {{$fn:=.FunctionResponse.Name}}
111- {{range $key, $value := .FunctionResponse.Response}}
112- < tr >
113- < td > < code > {{$key}}</ code > </ td >
114- < td > < pre class ="arg-{{$fn}}-{{$key}} "> {{$value}}</ pre > </ td >
115- </ tr >
116- {{end}}
117- </ table >
118- </ div >
114+ < pre class ="language-json "> {{jsonify .FunctionResponse.Response}}</ pre > </ td >
119115 </ div >
120116 {{end}}
121117 {{end}}
@@ -131,6 +127,14 @@ <h3>Last Route</h3>
131127 for ( let code of luaCode ) {
132128 hljs . highlightElement ( code ) ;
133129 }
130+ let nonLuaCode = document . querySelectorAll ( '.turn.function pre' ) ;
131+ for ( let code of nonLuaCode ) {
132+ hljs . highlightElement ( code ) ;
133+ }
134+ var storedContext = document . querySelectorAll ( '.context-storage pre' ) ;
135+ for ( let code of storedContext ) {
136+ hljs . highlightElement ( code ) ;
137+ }
134138</ script >
135139</ body >
136140</ html >
0 commit comments