@@ -0,0 +1,4256 @@
1+<!DOCTYPE html>
2+<html lang="en">
3+<head>
4+ <meta charset="UTF-8">
5+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6+ <title>Session Export</title>
7+ <style>
8+ :root {
9+ --accent: #8abeb7;
10+ --border: #5f87ff;
11+ --borderAccent: #00d7ff;
12+ --borderMuted: #505050;
13+ --success: #b5bd68;
14+ --error: #cc6666;
15+ --warning: #ffff00;
16+ --muted: #808080;
17+ --dim: #666666;
18+ --text: #d4d4d4;
19+ --thinkingText: #808080;
20+ --selectedBg: #3a3a4a;
21+ --userMessageBg: #343541;
22+ --userMessageText: #d4d4d4;
23+ --customMessageBg: #2d2838;
24+ --customMessageText: #d4d4d4;
25+ --customMessageLabel: #9575cd;
26+ --toolPendingBg: #282832;
27+ --toolSuccessBg: #283228;
28+ --toolErrorBg: #3c2828;
29+ --toolTitle: #d4d4d4;
30+ --toolOutput: #808080;
31+ --mdHeading: #f0c674;
32+ --mdLink: #81a2be;
33+ --mdLinkUrl: #666666;
34+ --mdCode: #8abeb7;
35+ --mdCodeBlock: #b5bd68;
36+ --mdCodeBlockBorder: #808080;
37+ --mdQuote: #808080;
38+ --mdQuoteBorder: #808080;
39+ --mdHr: #808080;
40+ --mdListBullet: #8abeb7;
41+ --toolDiffAdded: #b5bd68;
42+ --toolDiffRemoved: #cc6666;
43+ --toolDiffContext: #808080;
44+ --syntaxComment: #6A9955;
45+ --syntaxKeyword: #569CD6;
46+ --syntaxFunction: #DCDCAA;
47+ --syntaxVariable: #9CDCFE;
48+ --syntaxString: #CE9178;
49+ --syntaxNumber: #B5CEA8;
50+ --syntaxType: #4EC9B0;
51+ --syntaxOperator: #D4D4D4;
52+ --syntaxPunctuation: #D4D4D4;
53+ --thinkingOff: #505050;
54+ --thinkingMinimal: #6e6e6e;
55+ --thinkingLow: #5f87af;
56+ --thinkingMedium: #81a2be;
57+ --thinkingHigh: #b294bb;
58+ --thinkingXhigh: #d183e8;
59+ --bashMode: #b5bd68;
60+ --exportPageBg: #18181e;
61+ --exportCardBg: #1e1e24;
62+ --exportInfoBg: #3c3728;
63+ --body-bg: #18181e;
64+ --container-bg: #1e1e24;
65+ --info-bg: #3c3728;
66+ }
67+
68+ * { margin: 0; padding: 0; box-sizing: border-box; }
69+
70+ :root {
71+ --line-height: 18px; /* 12px font * 1.5 */
72+ --sidebar-width: 400px;
73+ --sidebar-min-width: 240px;
74+ --sidebar-max-width: 840px;
75+ --sidebar-resizer-width: 6px;
76+ }
77+
78+ body {
79+ font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
80+ font-size: 12px;
81+ line-height: var(--line-height);
82+ color: var(--text);
83+ background: var(--body-bg);
84+ }
85+
86+ body.sidebar-resizing {
87+ cursor: col-resize;
88+ user-select: none;
89+ }
90+
91+ #app {
92+ display: flex;
93+ min-height: 100vh;
94+ }
95+
96+ /* Sidebar */
97+ #sidebar {
98+ width: var(--sidebar-width);
99+ min-width: var(--sidebar-width);
100+ max-width: var(--sidebar-width);
101+ background: var(--container-bg);
102+ flex-shrink: 0;
103+ display: flex;
104+ flex-direction: column;
105+ position: sticky;
106+ top: 0;
107+ height: 100vh;
108+ border-right: 1px solid var(--dim);
109+ }
110+
111+ #sidebar-resizer {
112+ width: var(--sidebar-resizer-width);
113+ flex-shrink: 0;
114+ position: sticky;
115+ top: 0;
116+ height: 100vh;
117+ cursor: col-resize;
118+ touch-action: none;
119+ background: transparent;
120+ border-right: 1px solid transparent;
121+ }
122+
123+ #sidebar-resizer:hover,
124+ body.sidebar-resizing #sidebar-resizer {
125+ background: var(--selectedBg);
126+ border-right-color: var(--dim);
127+ }
128+
129+ .sidebar-header {
130+ padding: 8px 12px;
131+ flex-shrink: 0;
132+ }
133+
134+ .sidebar-controls {
135+ padding: 8px 8px 4px 8px;
136+ }
137+
138+ .sidebar-search {
139+ width: 100%;
140+ box-sizing: border-box;
141+ padding: 4px 8px;
142+ font-size: 11px;
143+ font-family: inherit;
144+ background: var(--body-bg);
145+ color: var(--text);
146+ border: 1px solid var(--dim);
147+ border-radius: 3px;
148+ }
149+
150+ .sidebar-filters {
151+ display: flex;
152+ padding: 4px 8px 8px 8px;
153+ gap: 4px;
154+ align-items: center;
155+ flex-wrap: wrap;
156+ }
157+
158+ .sidebar-search:focus {
159+ outline: none;
160+ border-color: var(--accent);
161+ }
162+
163+ .sidebar-search::placeholder {
164+ color: var(--muted);
165+ }
166+
167+ .filter-btn {
168+ padding: 3px 8px;
169+ font-size: 10px;
170+ font-family: inherit;
171+ background: transparent;
172+ color: var(--muted);
173+ border: 1px solid var(--dim);
174+ border-radius: 3px;
175+ cursor: pointer;
176+ }
177+
178+ .filter-btn:hover {
179+ color: var(--text);
180+ border-color: var(--text);
181+ }
182+
183+ .filter-btn.active {
184+ background: var(--accent);
185+ color: var(--body-bg);
186+ border-color: var(--accent);
187+ }
188+
189+ .sidebar-close {
190+ display: none;
191+ padding: 3px 8px;
192+ font-size: 12px;
193+ font-family: inherit;
194+ background: transparent;
195+ color: var(--muted);
196+ border: 1px solid var(--dim);
197+ border-radius: 3px;
198+ cursor: pointer;
199+ margin-left: auto;
200+ }
201+
202+ .sidebar-close:hover {
203+ color: var(--text);
204+ border-color: var(--text);
205+ }
206+
207+ .tree-container {
208+ flex: 1;
209+ overflow: auto;
210+ padding: 4px 0;
211+ }
212+
213+ .tree-node {
214+ padding: 0 8px;
215+ cursor: pointer;
216+ display: flex;
217+ align-items: baseline;
218+ font-size: 11px;
219+ line-height: 13px;
220+ white-space: nowrap;
221+ }
222+
223+ .tree-node:hover {
224+ background: var(--selectedBg);
225+ }
226+
227+ .tree-node.active {
228+ background: var(--selectedBg);
229+ }
230+
231+ .tree-node.active .tree-content {
232+ font-weight: bold;
233+ }
234+
235+ .tree-node.in-path {
236+ background: color-mix(in srgb, var(--accent) 10%, transparent);
237+ }
238+
239+ .tree-node:not(.in-path) {
240+ opacity: 0.5;
241+ }
242+
243+ .tree-node:not(.in-path):hover {
244+ opacity: 1;
245+ }
246+
247+ .tree-prefix {
248+ color: var(--muted);
249+ flex-shrink: 0;
250+ font-family: monospace;
251+ white-space: pre;
252+ }
253+
254+ .tree-marker {
255+ color: var(--accent);
256+ flex-shrink: 0;
257+ }
258+
259+ .tree-content {
260+ color: var(--text);
261+ }
262+
263+ .tree-role-user {
264+ color: var(--accent);
265+ }
266+
267+ .tree-role-skill {
268+ color: var(--customMessageLabel);
269+ }
270+
271+ .tree-role-assistant {
272+ color: var(--success);
273+ }
274+
275+ .tree-role-tool {
276+ color: var(--muted);
277+ }
278+
279+ .tree-muted {
280+ color: var(--muted);
281+ }
282+
283+ .tree-error {
284+ color: var(--error);
285+ }
286+
287+ .tree-compaction {
288+ color: var(--borderAccent);
289+ }
290+
291+ .tree-branch-summary {
292+ color: var(--warning);
293+ }
294+
295+ .tree-custom-message {
296+ color: var(--customMessageLabel);
297+ }
298+
299+ .tree-status {
300+ padding: 4px 12px;
301+ font-size: 10px;
302+ color: var(--muted);
303+ flex-shrink: 0;
304+ }
305+
306+ /* Main content */
307+ #content {
308+ flex: 1;
309+ min-width: 0;
310+ overflow-y: auto;
311+ padding: var(--line-height) calc(var(--line-height) * 2);
312+ display: flex;
313+ flex-direction: column;
314+ align-items: center;
315+ }
316+
317+ #content > * {
318+ width: 100%;
319+ max-width: 800px;
320+ }
321+
322+ /* Help bar */
323+ .help-bar {
324+ font-size: 11px;
325+ color: var(--warning);
326+ margin-bottom: var(--line-height);
327+ display: flex;
328+ align-items: center;
329+ justify-content: space-between;
330+ flex-wrap: wrap;
331+ gap: 12px;
332+ }
333+
334+ .help-hint {
335+ flex: 1 1 240px;
336+ }
337+
338+ .help-actions {
339+ display: flex;
340+ align-items: center;
341+ flex-wrap: wrap;
342+ gap: 8px;
343+ }
344+
345+ .header-toggle-btn,
346+ .download-json-btn {
347+ font-size: 10px;
348+ padding: 2px 8px;
349+ background: var(--container-bg);
350+ border: 1px solid var(--border);
351+ border-radius: 3px;
352+ color: var(--text);
353+ cursor: pointer;
354+ font-family: inherit;
355+ }
356+
357+ .header-toggle-btn:hover,
358+ .download-json-btn:hover {
359+ background: var(--hover);
360+ border-color: var(--borderAccent);
361+ }
362+
363+ /* Header */
364+ .header {
365+ background: var(--container-bg);
366+ border-radius: 4px;
367+ padding: var(--line-height);
368+ margin-bottom: var(--line-height);
369+ }
370+
371+ .header h1 {
372+ font-size: 12px;
373+ font-weight: bold;
374+ color: var(--borderAccent);
375+ margin-bottom: var(--line-height);
376+ }
377+
378+ .header-info {
379+ display: flex;
380+ flex-direction: column;
381+ gap: 0;
382+ font-size: 11px;
383+ }
384+
385+ .info-item {
386+ color: var(--dim);
387+ display: flex;
388+ align-items: baseline;
389+ }
390+
391+ .info-label {
392+ font-weight: 600;
393+ margin-right: 8px;
394+ min-width: 100px;
395+ }
396+
397+ .info-value {
398+ color: var(--text);
399+ flex: 1;
400+ }
401+
402+ /* Messages */
403+ #messages {
404+ display: flex;
405+ flex-direction: column;
406+ gap: var(--line-height);
407+ }
408+
409+ .message-timestamp {
410+ font-size: 10px;
411+ color: var(--dim);
412+ opacity: 0.8;
413+ }
414+
415+ .user-message {
416+ background: var(--userMessageBg);
417+ color: var(--userMessageText);
418+ padding: var(--line-height);
419+ border-radius: 4px;
420+ position: relative;
421+ }
422+
423+ .assistant-message {
424+ padding: 0;
425+ position: relative;
426+ }
427+
428+ /* Copy link button - appears on hover */
429+ .copy-link-btn {
430+ position: absolute;
431+ top: 8px;
432+ right: 8px;
433+ width: 28px;
434+ height: 28px;
435+ padding: 6px;
436+ background: var(--container-bg);
437+ border: 1px solid var(--dim);
438+ border-radius: 4px;
439+ color: var(--muted);
440+ cursor: pointer;
441+ opacity: 0;
442+ transition: opacity 0.15s, background 0.15s, color 0.15s;
443+ display: flex;
444+ align-items: center;
445+ justify-content: center;
446+ z-index: 10;
447+ }
448+
449+ .user-message:hover .copy-link-btn,
450+ .assistant-message:hover .copy-link-btn,
451+ .skill-user-entry:hover .copy-link-btn {
452+ opacity: 1;
453+ }
454+
455+ .copy-link-btn:hover {
456+ background: var(--accent);
457+ color: var(--body-bg);
458+ border-color: var(--accent);
459+ }
460+
461+ .copy-link-btn.copied {
462+ background: var(--success, #22c55e);
463+ color: white;
464+ border-color: var(--success, #22c55e);
465+ }
466+
467+ /* Highlight effect for deep-linked messages */
468+ .user-message.highlight,
469+ .assistant-message.highlight {
470+ animation: highlight-pulse 2s ease-out;
471+ }
472+
473+ @keyframes highlight-pulse {
474+ 0% {
475+ box-shadow: 0 0 0 3px var(--accent);
476+ }
477+ 100% {
478+ box-shadow: 0 0 0 0 transparent;
479+ }
480+ }
481+
482+ .assistant-message > .message-timestamp {
483+ padding-left: var(--line-height);
484+ }
485+
486+ .assistant-text {
487+ padding: var(--line-height);
488+ padding-bottom: 0;
489+ }
490+
491+ .message-timestamp + .assistant-text,
492+ .message-timestamp + .thinking-block {
493+ padding-top: 0;
494+ }
495+
496+ .thinking-block + .assistant-text {
497+ padding-top: 0;
498+ }
499+
500+ .thinking-text {
501+ padding: var(--line-height);
502+ color: var(--thinkingText);
503+ font-style: italic;
504+ white-space: pre-wrap;
505+ }
506+
507+ .message-timestamp + .thinking-block .thinking-text,
508+ .message-timestamp + .thinking-block .thinking-collapsed {
509+ padding-top: 0;
510+ }
511+
512+ .thinking-collapsed {
513+ display: none;
514+ padding: var(--line-height);
515+ color: var(--thinkingText);
516+ font-style: italic;
517+ }
518+
519+ /* Tool execution */
520+ .tool-execution {
521+ padding: var(--line-height);
522+ border-radius: 4px;
523+ }
524+
525+ .tool-execution + .tool-execution {
526+ margin-top: var(--line-height);
527+ }
528+
529+ .assistant-text + .tool-execution {
530+ margin-top: var(--line-height);
531+ }
532+
533+ .tool-execution.pending { background: var(--toolPendingBg); }
534+ .tool-execution.success { background: var(--toolSuccessBg); }
535+ .tool-execution.error { background: var(--toolErrorBg); }
536+
537+ .tool-header, .tool-name {
538+ font-weight: bold;
539+ }
540+
541+ .tool-path {
542+ color: var(--accent);
543+ word-break: break-all;
544+ }
545+
546+ .line-numbers {
547+ color: var(--warning);
548+ }
549+
550+ .line-count {
551+ color: var(--dim);
552+ }
553+
554+ .tool-command {
555+ font-weight: bold;
556+ white-space: pre-wrap;
557+ word-wrap: break-word;
558+ overflow-wrap: break-word;
559+ word-break: break-word;
560+ }
561+
562+ .tool-output {
563+ margin-top: var(--line-height);
564+ color: var(--toolOutput);
565+ word-wrap: break-word;
566+ overflow-wrap: break-word;
567+ word-break: break-word;
568+ font-family: inherit;
569+ overflow-x: auto;
570+ }
571+
572+ .tool-output > div,
573+ .output-preview > div,
574+ .output-full > div {
575+ margin: 0;
576+ padding: 0;
577+ line-height: var(--line-height);
578+ }
579+
580+ .tool-output > div:not(.output-preview):not(.output-full),
581+ .output-preview > div:not(.expand-hint),
582+ .output-full > div:not(.expand-hint) {
583+ white-space: pre-wrap;
584+ }
585+
586+ .tool-output pre {
587+ margin: 0;
588+ padding: 0;
589+ font-family: inherit;
590+ color: inherit;
591+ white-space: pre-wrap;
592+ word-wrap: break-word;
593+ overflow-wrap: break-word;
594+ }
595+
596+ .tool-output code {
597+ padding: 0;
598+ background: none;
599+ color: var(--text);
600+ }
601+
602+ .tool-output.expandable {
603+ cursor: pointer;
604+ }
605+
606+ .tool-output.expandable:hover {
607+ opacity: 0.9;
608+ }
609+
610+ .tool-output.expandable .output-full {
611+ display: none;
612+ }
613+
614+ .tool-output.expandable.expanded .output-preview {
615+ display: none;
616+ }
617+
618+ .tool-output.expandable.expanded .output-full {
619+ display: block;
620+ }
621+
622+ .ansi-line {
623+ white-space: pre;
624+ }
625+
626+ .tool-images {
627+ }
628+
629+ .tool-image {
630+ max-width: 100%;
631+ max-height: 500px;
632+ border-radius: 4px;
633+ margin: var(--line-height) 0;
634+ }
635+
636+ .expand-hint {
637+ color: var(--toolOutput);
638+ }
639+
640+ /* Diff */
641+ .tool-diff {
642+ font-size: 11px;
643+ overflow-x: auto;
644+ white-space: pre;
645+ }
646+
647+ .diff-added { color: var(--toolDiffAdded); }
648+ .diff-removed { color: var(--toolDiffRemoved); }
649+ .diff-context { color: var(--toolDiffContext); }
650+
651+ /* Model change */
652+ .model-change {
653+ padding: 0 var(--line-height);
654+ color: var(--dim);
655+ font-size: 11px;
656+ }
657+
658+ .model-name {
659+ color: var(--borderAccent);
660+ font-weight: bold;
661+ }
662+
663+ /* Compaction / Branch Summary - matches customMessage colors from TUI */
664+ .compaction {
665+ background: var(--customMessageBg);
666+ border-radius: 4px;
667+ padding: var(--line-height);
668+ cursor: pointer;
669+ }
670+
671+ .compaction-label {
672+ color: var(--customMessageLabel);
673+ font-weight: bold;
674+ }
675+
676+ .compaction-collapsed {
677+ color: var(--customMessageText);
678+ }
679+
680+ .compaction-content {
681+ display: none;
682+ color: var(--customMessageText);
683+ white-space: pre-wrap;
684+ margin-top: var(--line-height);
685+ }
686+
687+ .compaction.expanded .compaction-collapsed {
688+ display: none;
689+ }
690+
691+ .compaction.expanded .compaction-content {
692+ display: block;
693+ }
694+
695+ /* System prompt */
696+ .system-prompt {
697+ background: var(--customMessageBg);
698+ padding: var(--line-height);
699+ border-radius: 4px;
700+ margin-bottom: var(--line-height);
701+ }
702+
703+ .system-prompt.expandable {
704+ cursor: pointer;
705+ }
706+
707+ .system-prompt-header {
708+ font-weight: bold;
709+ color: var(--customMessageLabel);
710+ }
711+
712+ .system-prompt-preview {
713+ color: var(--customMessageText);
714+ white-space: pre-wrap;
715+ word-wrap: break-word;
716+ font-size: 11px;
717+ margin-top: var(--line-height);
718+ }
719+
720+ .system-prompt-expand-hint {
721+ color: var(--muted);
722+ font-style: italic;
723+ margin-top: 4px;
724+ }
725+
726+ .system-prompt-full {
727+ display: none;
728+ color: var(--customMessageText);
729+ white-space: pre-wrap;
730+ word-wrap: break-word;
731+ font-size: 11px;
732+ margin-top: var(--line-height);
733+ }
734+
735+ .system-prompt.expanded .system-prompt-preview,
736+ .system-prompt.expanded .system-prompt-expand-hint {
737+ display: none;
738+ }
739+
740+ .system-prompt.expanded .system-prompt-full {
741+ display: block;
742+ }
743+
744+ .system-prompt.provider-prompt {
745+ border-left: 3px solid var(--warning);
746+ }
747+
748+ .system-prompt-note {
749+ font-size: 10px;
750+ font-style: italic;
751+ color: var(--muted);
752+ margin-top: 4px;
753+ }
754+
755+ /* Tools list */
756+ .tools-list {
757+ background: var(--customMessageBg);
758+ padding: var(--line-height);
759+ border-radius: 4px;
760+ margin-bottom: var(--line-height);
761+ }
762+
763+ .tools-header {
764+ font-weight: bold;
765+ color: var(--customMessageLabel);
766+ margin-bottom: var(--line-height);
767+ }
768+
769+ .tool-item {
770+ font-size: 11px;
771+ }
772+
773+ .tool-item-name {
774+ font-weight: bold;
775+ color: var(--text);
776+ }
777+
778+ .tool-item-desc {
779+ color: var(--dim);
780+ }
781+
782+ .tool-params-hint {
783+ color: var(--muted);
784+ font-style: italic;
785+ }
786+
787+ .tool-item:has(.tool-params-hint) {
788+ cursor: pointer;
789+ }
790+
791+ .tool-params-hint::after {
792+ content: '[click to show parameters]';
793+ }
794+
795+ .tool-item.params-expanded .tool-params-hint::after {
796+ content: '[hide parameters]';
797+ }
798+
799+ .tool-params-content {
800+ display: none;
801+ margin-top: 4px;
802+ margin-left: 12px;
803+ padding-left: 8px;
804+ border-left: 1px solid var(--dim);
805+ }
806+
807+ .tool-item.params-expanded .tool-params-content {
808+ display: block;
809+ }
810+
811+ .tool-param {
812+ margin-bottom: 4px;
813+ font-size: 11px;
814+ }
815+
816+ .tool-param-name {
817+ font-weight: bold;
818+ color: var(--text);
819+ }
820+
821+ .tool-param-type {
822+ color: var(--dim);
823+ font-style: italic;
824+ }
825+
826+ .tool-param-required {
827+ color: var(--warning, #e8a838);
828+ font-size: 10px;
829+ }
830+
831+ .tool-param-optional {
832+ color: var(--dim);
833+ font-size: 10px;
834+ }
835+
836+ .tool-param-desc {
837+ color: var(--dim);
838+ margin-left: 8px;
839+ }
840+
841+ /* Hook/custom messages */
842+ .hook-message {
843+ background: var(--customMessageBg);
844+ color: var(--customMessageText);
845+ padding: var(--line-height);
846+ border-radius: 4px;
847+ }
848+
849+ .hook-type {
850+ color: var(--customMessageLabel);
851+ font-weight: bold;
852+ }
853+
854+ /* Skill invocation - matches compaction style (clickable, collapsed by default) */
855+ .skill-invocation {
856+ background: var(--customMessageBg);
857+ border-radius: 4px;
858+ padding: var(--line-height);
859+ cursor: pointer;
860+ }
861+
862+ .skill-invocation-label {
863+ color: var(--customMessageLabel);
864+ font-weight: bold;
865+ }
866+
867+ .skill-invocation-collapsed {
868+ color: var(--customMessageText);
869+ }
870+
871+ .skill-invocation-content {
872+ display: none;
873+ color: var(--customMessageText);
874+ margin-top: var(--line-height);
875+ }
876+
877+ .skill-invocation.expanded .skill-invocation-collapsed {
878+ display: none;
879+ }
880+
881+ .skill-invocation.expanded .skill-invocation-content {
882+ display: block;
883+ }
884+
885+ .skill-invocation + .user-message {
886+ margin-top: var(--line-height);
887+ }
888+
889+ .skill-user-entry {
890+ position: relative;
891+ }
892+
893+ /* Branch summary */
894+ .branch-summary {
895+ background: var(--customMessageBg);
896+ padding: var(--line-height);
897+ border-radius: 4px;
898+ }
899+
900+ .branch-summary-header {
901+ font-weight: bold;
902+ color: var(--borderAccent);
903+ }
904+
905+ /* Error */
906+ .error-text {
907+ color: var(--error);
908+ padding: 0 var(--line-height);
909+ }
910+ .tool-error {
911+ color: var(--error);
Cut short: this commit's diff is over 1000 lines.