Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
1780 lines (1662 loc) · 67.9 KB
/
Copy pathindex.html
File metadata and controls
1780 lines (1662 loc) · 67.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
<title>VisionOps — Cerebras × Google DeepMind</title>
<style>
:root {
--bg: #F8F8F8;
--surface: #FFFFFF;
--surface-raised: #F2F2F2;
--border: #D0D0D0;
--primary: #4ECDC4;
--primary-dim: #3BA99E;
--secondary: #FF4D6D;
--tertiary: #FFD700;
--success: #00FF41;
--warning: #FFB800;
--text: #1A1A1A;
--text-muted: #666666;
--error: #FF2800;
--rounded-sm: 4px;
--rounded-md: 8px;
--rounded-lg: 12px;
/* backwards-compatible aliases */
--active: var(--success);
--highlight: var(--tertiary);
--compression: #9B59B6;
--muted: var(--text-muted);
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.4;
font-size: 13px;
}
header {
border-bottom: 1px solid var(--border);
padding: 0.7rem 1rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.6rem;
}
.brand h1 {
margin: 0;
font-size: 1.15rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--primary);
}
.tabs { display: flex; gap: 0.4rem; }
.tab {
background: var(--bg);
border: 1px solid var(--border);
color: var(--muted);
padding: 0.35rem 0.8rem;
font-family: inherit;
font-size: 0.8rem;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.tab:hover { color: var(--text); border-color: var(--primary); }
.tab.active {
background: var(--active);
color: #000;
border-color: var(--active);
font-weight: 700;
}
.status-pill {
display: flex;
align-items: center;
gap: 0.4rem;
border: 1px solid var(--border);
padding: 0.3rem 0.6rem;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--muted);
}
.status-dot { width: 8px; height: 8px; background: var(--muted); }
.status-pill.running .status-dot { background: var(--active); }
.status-pill.done .status-dot { background: var(--primary); }
.status-pill.error .status-dot { background: var(--error); }
.status-line {
border-bottom: 1px solid var(--border);
padding: 0.4rem 1rem;
font-size: 0.85rem;
color: var(--muted);
}
.status-line .prompt { color: var(--primary); }
.status-line #message { color: var(--text); }
.panel-section { display: none; }
.panel-section.active { display: block; }
.grid {
display: grid;
grid-template-columns: 340px 1fr;
gap: 1px;
padding: 1px;
background: var(--border);
}
.grid > aside, .grid > main {
background: var(--bg);
padding: 0.7rem;
display: flex;
flex-direction: column;
gap: 0.7rem;
}
.panel {
border: 1px solid var(--border);
padding: 0.8rem;
background: var(--surface);
}
.panel-title {
margin: 0 0 0.6rem;
font-size: 0.85rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--primary);
border-bottom: 1px solid var(--border);
padding-bottom: 0.35rem;
}
.rule { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }
.rule-eq { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; margin: 0.4rem 0; }
/* Mode selector */
.mode-box { display: flex; gap: 0.4rem; }
.mode-btn {
flex: 1;
background: var(--bg);
border: 1px solid var(--border);
color: var(--muted);
padding: 0.5rem 0.2rem;
font-family: inherit;
font-size: 0.85rem;
cursor: pointer;
text-align: center;
text-transform: uppercase;
}
.mode-btn:hover { border-color: var(--primary); color: var(--text); }
.mode-btn.active {
background: var(--active);
color: #000;
border-color: var(--active);
font-weight: 700;
}
/* Circular gauges — terminal style */
.gauge-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-bottom: 1rem;
}
.gauge {
border: 1px solid var(--border);
padding: 0.7rem;
text-align: center;
background: var(--bg);
}
.gauge svg { width: 100%; max-width: 150px; height: auto; display: block; margin: 0 auto; }
.gauge-value {
font-family: var(--font-mono);
font-size: 1.25rem;
font-weight: 700;
color: var(--text);
margin-top: -0.2rem;
}
.gauge-unit { font-size: 0.7rem; color: var(--muted); }
.gauge-label {
font-size: 0.65rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 0.2rem;
}
/* Progress meter */
.progress-box { border: 1px solid var(--border); padding: 0.7rem; }
.progress-text {
color: var(--active);
white-space: pre;
font-size: 0.85rem;
}
/* Racing car track */
.race-track {
position: relative;
margin-top: 0.6rem;
height: 28px;
border: 1px solid var(--border);
background: var(--bg);
overflow: hidden;
}
.race-track::after {
content: '';
position: absolute;
top: 50%;
left: 0.5rem;
right: 0.5rem;
height: 1px;
border-top: 1px dashed var(--muted);
opacity: 0.5;
transform: translateY(-50%);
}
.race-car {
position: absolute;
top: 50%;
left: 0;
transform: translate(-50%, -50%);
font-size: 1.1rem;
line-height: 1;
transition: left 0.25s linear;
z-index: 2;
}
.race-flag {
position: absolute;
top: 50%;
left: 0.35rem;
transform: translateY(-50%);
font-size: 0.9rem;
opacity: 0.6;
z-index: 1;
}
/* Terminal log */
.terminal-log {
height: 220px;
overflow-y: auto;
border: 1px solid var(--border);
padding: 0.5rem;
font-size: 0.8rem;
background: var(--bg);
}
.log-line { margin: 0.15rem 0; }
.log-time { color: var(--muted); margin-right: 0.4rem; }
.log-prefix { font-weight: 700; margin-right: 0.3rem; }
.prefix-ENG { color: var(--active); }
.prefix-SYS { color: var(--primary); }
.prefix-ERR { color: var(--error); }
.prefix-SCOUT { color: var(--highlight); }
.prefix-CMDR { color: var(--compression); }
/* Timing tower */
.tower-table {
width: 100%;
border-collapse: collapse;
font-size: 0.85rem;
}
.tower-table th {
text-align: left;
text-transform: uppercase;
color: var(--muted);
border-bottom: 1px solid var(--border);
padding: 0.35rem 0.3rem;
font-weight: 700;
letter-spacing: 0.05em;
}
.tower-table td {
padding: 0.35rem 0.3rem;
border-bottom: 1px solid var(--border);
}
.tower-table .num { text-align: right; }
.tower-row.fastest { color: var(--highlight); font-weight: 700; }
.tower-row.pos1 { color: var(--active); }
/* Sparkline — futuristic telemetry scope */
.sparkline-wrap {
height: 180px;
border: 1px solid var(--border);
padding: 0.4rem;
background:
linear-gradient(180deg, rgba(0,0,0,0.04) 0%, transparent 40%, rgba(0,0,0,0.04) 100%),
var(--bg);
position: relative;
overflow: hidden;
}
.sparkline-wrap::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(0,0,0,0.04) 2px,
rgba(0,0,0,0.04) 4px
);
pointer-events: none;
}
#throughputChart { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
/* Strategy map / workers */
.strategy-map { display: flex; flex-direction: column; gap: 0.2rem; }
.worker-row {
display: grid;
grid-template-columns: 1fr 140px 80px;
gap: 0.6rem;
align-items: center;
border-bottom: 1px solid var(--border);
padding: 0.35rem 0;
font-size: 0.8rem;
}
.worker-name { text-transform: uppercase; color: var(--primary); }
.worker-bar { color: var(--active); white-space: pre; overflow: hidden; }
.worker-status { text-align: right; }
.status-idle { color: var(--muted); }
.status-running { color: var(--highlight); }
.status-done { color: var(--active); }
/* Synthesis */
.synthesis-pre {
white-space: pre-wrap;
word-break: break-word;
font-family: inherit;
line-height: 1.55;
max-height: 480px;
overflow-y: auto;
border: 1px solid var(--border);
padding: 0.7rem;
background: var(--bg);
font-size: 0.85rem;
margin: 0;
}
/* Scout cards */
.scout-card {
border: 1px solid var(--border);
padding: 0.7rem;
margin-bottom: 0.5rem;
font-size: 0.85rem;
}
.scout-card h3 {
margin: 0 0 0.4rem;
color: var(--primary);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.source-list { margin: 0.3rem 0; padding-left: 1.2rem; }
.source-list li { margin-bottom: 0.3rem; }
.source-list a { color: var(--primary); }
/* Forms */
label {
display: block;
text-transform: uppercase;
color: var(--muted);
font-size: 0.75rem;
letter-spacing: 0.05em;
margin: 0.6rem 0 0.2rem;
}
input, select, textarea {
width: 100%;
background: var(--surface-raised);
border: 1px solid var(--border);
color: var(--text);
padding: 0.45rem;
font-family: inherit;
font-size: 0.85rem;
}
input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--primary);
}
.row { display: flex; gap: 0.6rem; }
.row > * { flex: 1; }
button {
width: 100%;
margin-top: 0.5rem;
padding: 0.55rem;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
font-family: inherit;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-start { border-color: var(--active); color: var(--active); }
.btn-start:hover:not(:disabled) { background: var(--active); color: #000; }
.btn-stop { border-color: var(--error); color: var(--error); }
.btn-stop:hover:not(:disabled) { background: var(--error); color: #fff; }
.btn-secondary { border-color: var(--border); color: var(--text-muted); background: transparent; }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.angle-checkboxes {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.angle-checkboxes label {
display: inline-flex;
align-items: center;
gap: 0.3rem;
margin: 0;
padding: 0.35rem 0.5rem;
border: 1px solid var(--border);
font-size: 0.75rem;
color: var(--text);
cursor: pointer;
text-transform: none;
letter-spacing: 0;
}
.angle-checkboxes input { width: auto; }
.angle-checkboxes label:has(input:checked) {
background: var(--active);
color: #000;
border-color: var(--active);
}
.spinner {
width: 12px;
height: 12px;
border: 2px solid rgba(0,0,0,0.15);
border-top-color: currentColor;
animation: spin 0.7s linear infinite;
display: inline-block;
margin-right: 0.4rem;
vertical-align: middle;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.diffusion-counter {
margin-top: 0.5rem;
color: var(--compression);
font-size: 0.8rem;
}
.diffusion-bar {
margin-top: 0.2rem;
color: var(--compression);
font-size: 0.85rem;
white-space: pre;
}
/* Boot overlay */
#start-lights {
position: fixed;
inset: 0;
background: var(--bg);
z-index: 1000;
display: none;
flex-direction: column;
padding: 2rem;
font-size: 0.9rem;
overflow-y: auto;
}
#start-lights.active { display: flex; }
.boot-line { margin: 0.1rem 0; }
.boot-ok { color: var(--active); }
@media (max-width: 900px) {
.grid { grid-template-columns: 1fr; }
.gauge-row { grid-template-columns: 1fr; }
.worker-row { grid-template-columns: 1fr 100px 70px; }
}
</style>
</head>
<body>
<!-- Boot overlay -->
<div id="start-lights"></div>
<header>
<div class="brand">
<h1>VisionOps</h1>
<div style="font-size:0.7rem;color:var(--text-muted);letter-spacing:0.08em;text-transform:uppercase;margin-top:2px;">Cerebras × Google DeepMind — Image-Aware Agent Era</div>
</div>
<div class="tabs">
<button class="tab active" data-tab="racing">[RACE]</button>
<button class="tab" data-tab="news">[NEWS]</button>
<button class="tab" data-tab="vision">[VISION]</button>
</div>
<div class="status-pill" id="status-pill">
<div class="status-dot"></div>
<span id="state">idle</span>
</div>
</header>
<div class="status-line">
<span class="prompt">user@cerebras-bench:~$</span> <span id="message">Ready</span>
</div>
<!-- RACING PANEL -->
<div id="racing-panel" class="panel-section active">
<div class="grid">
<aside>
<div class="panel">
<div class="panel-title">MODE SELECTOR</div>
<div class="mode-box">
<button class="mode-btn" data-mode="P" data-conc="0" data-tokens="0">[P]</button>
<button class="mode-btn" data-mode="1" data-conc="8" data-tokens="250">[1]</button>
<button class="mode-btn active" data-mode="2" data-conc="16" data-tokens="1000">[2]</button>
<button class="mode-btn" data-mode="3" data-conc="24" data-tokens="1500">[3]</button>
<button class="mode-btn" data-mode="DRS" data-conc="32" data-tokens="1000">[DRS]</button>
</div>
</div>
<div class="panel">
<div class="panel-title">SETUP</div>
<label>Metric</label>
<select id="metric">
<option value="tok/s">Max tokens/sec</option>
<option value="req/s">Max requests/sec</option>
<option value="balanced">Balanced</option>
</select>
<div class="row">
<div>
<label>Sweep</label>
<input id="sweep_requests" type="number" value="12" min="3">
</div>
<div>
<label>Race</label>
<input id="race_requests" type="number" value="50" min="10">
</div>
</div>
<label>Concurrency</label>
<input id="concurrency" type="text" value="8,16,24,32">
<label>Max tokens</label>
<input id="max_tokens" type="text" value="500,1000,1500">
<button id="btn-start" class="btn-start">START RACE</button>
<button id="btn-stop" class="btn-stop" disabled>ABORT</button>
<button id="btn-report-template" class="btn-start" disabled>SHOW REPORT</button>
<button id="btn-report-llm" class="btn-start" disabled>LLM ANALYSIS</button>
</div>
<div class="panel">
<div class="panel-title">DIFFUSIONGEMMA4</div>
<button id="btn-diffusion-test" class="btn-start">TEST DIFFUSIONGEMMA4</button>
<div id="diffusion-counter" class="diffusion-counter">0 TOK @ 0 tok/s</div>
<div id="diffusion-bar" class="diffusion-bar">[░░░░░░░░░░░░░░░░░░░░]</div>
<div id="diffusion-result-race" class="synthesis-pre" style="display:none;margin-top:0.5rem;"></div>
</div>
<div id="race-report-container" class="panel" style="display:none;">
<div class="panel-title">RACE REPORT</div>
<div id="race-report-content" class="synthesis-pre"></div>
</div>
<div class="panel">
<div class="panel-title">TERMINAL LOG</div>
<div id="logs" class="terminal-log"></div>
</div>
</aside>
<main>
<div class="panel">
<div class="panel-title">ABOUT RACE</div>
<p style="margin:0 0 0.5rem;line-height:1.55;">
The Race tab benchmarks Cerebras inference throughput. It sweeps
concurrency and token-size combinations, identifies the fastest
configuration for your chosen metric (tok/s, req/s, or balanced),
then runs a sustained race with the winner to confirm real-world
performance.
</p>
<p style="margin:0;line-height:1.55;">
Use it to find the optimal setup for your workload before deploying
to production. Results are streamed live via Server-Sent Events and
summarized in a post-race report.
</p>
</div>
<div class="panel">
<div class="panel-title">LIVE GAUGES</div>
<div class="gauge-row">
<div class="gauge">
<svg viewBox="0 0 160 100">
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--border)" stroke-width="12" stroke-linecap="round"/>
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--active)" stroke-width="12" stroke-linecap="round" stroke-dasharray="0 377" id="gauge-req-arc"/>
<line x1="80" y1="90" x2="80" y2="45" stroke="var(--text)" stroke-width="3" stroke-linecap="round" id="gauge-req-needle" transform="rotate(-135 80 90)"/>
<circle cx="80" cy="90" r="4" fill="var(--text)"/>
</svg>
<div class="gauge-value"><span id="gauge-req-val">0.00</span><span class="gauge-unit"> req/s</span></div>
<div class="gauge-label">Request Rate</div>
</div>
<div class="gauge">
<svg viewBox="0 0 160 100">
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--border)" stroke-width="12" stroke-linecap="round"/>
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--primary)" stroke-width="12" stroke-linecap="round" stroke-dasharray="0 377" id="gauge-tok-arc"/>
<line x1="80" y1="90" x2="80" y2="45" stroke="var(--text)" stroke-width="3" stroke-linecap="round" id="gauge-tok-needle" transform="rotate(-135 80 90)"/>
<circle cx="80" cy="90" r="4" fill="var(--text)"/>
</svg>
<div class="gauge-value"><span id="gauge-tok-val">0</span><span class="gauge-unit"> tok/s</span></div>
<div class="gauge-label">Token Rate</div>
</div>
<div class="gauge">
<svg viewBox="0 0 160 100">
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--border)" stroke-width="12" stroke-linecap="round"/>
<path d="M 20 90 A 60 60 0 1 1 140 90" fill="none" stroke="var(--error)" stroke-width="12" stroke-linecap="round" stroke-dasharray="0 377" id="gauge-lat-arc"/>
<line x1="80" y1="90" x2="80" y2="45" stroke="var(--text)" stroke-width="3" stroke-linecap="round" id="gauge-lat-needle" transform="rotate(-135 80 90)"/>
<circle cx="80" cy="90" r="4" fill="var(--text)"/>
</svg>
<div class="gauge-value"><span id="gauge-lat-val">0.000</span><span class="gauge-unit"> s</span></div>
<div class="gauge-label">Latency</div>
</div>
</div>
</div>
<div class="progress-box">
<div class="progress-text" id="race-progress">[> ] 0%</div>
<div class="race-track" id="race-track">
<div class="race-car" id="race-car">🏍️</div>
<div class="race-flag">🏁</div>
</div>
</div>
<div class="panel">
<div class="panel-title">SPARKLINE HISTOGRAM</div>
<div class="sparkline-wrap"><canvas id="throughputChart"></canvas></div>
</div>
<div class="panel">
<div class="panel-title">TIMING TOWER</div>
<table class="tower-table">
<thead>
<tr><th>#</th><th>CONFIG</th><th class="num">REQ/S</th><th class="num">TOK/S</th><th class="num">LATENCY</th></tr>
</thead>
<tbody id="timing-tower"></tbody>
</table>
</div>
</main>
</div>
</div>
<!-- NEWS PANEL -->
<div id="news-panel" class="panel-section">
<div class="grid">
<aside>
<div class="panel">
<div class="panel-title">STRATEGY MAP</div>
<div class="strategy-map" id="strategy-map"></div>
</div>
<div class="panel">
<div class="panel-title">SEARCH QUERY</div>
<input id="news-query" type="text" value="AI regulation" placeholder="e.g. AI regulation">
<label>Scout angles</label>
<div class="angle-checkboxes">
<label><input type="checkbox" class="news-angle" value="latest breaking news" checked> Breaking News</label>
<label><input type="checkbox" class="news-angle" value="technical details analysis" checked> Technical</label>
<label><input type="checkbox" class="news-angle" value="market and industry reaction" checked> Market</label>
</div>
<button id="news-btn-start" class="btn-start">DEPLOY SCOUTS</button>
<button id="news-btn-stop" class="btn-stop" disabled>ABORT</button>
<button id="news-btn-diffusion" class="btn-start">TEST DIFFUSIONGEMMA4</button>
<div id="diffusion-result-news" class="synthesis-pre" style="display:none;margin-top:0.5rem;"></div>
</div>
<div class="panel">
<div class="panel-title">PIT WALL LOG</div>
<div id="news-logs" class="terminal-log"></div>
</div>
</aside>
<main>
<div class="panel">
<div class="panel-title">ABOUT NEWS</div>
<p style="margin:0 0 0.5rem;line-height:1.55;">
The News tab runs a commander-scout research team. Scouts fan out
across RSS feeds from different angles — breaking news, technical
analysis, and market reaction — while a commander synthesizes their
findings into a single cited report.
</p>
<p style="margin:0;line-height:1.55;">
Use it for rapid, multi-perspective research on any topic. Each scout
fetches fresh sources, summarizes them, and the commander resolves
overlaps and gaps into an executive-ready answer.
</p>
</div>
<div class="panel">
<div class="panel-title">COMMANDER SYNTHESIS</div>
<pre id="news-synthesis" class="synthesis-pre">Enter a query and deploy scouts.</pre>
</div>
<div class="panel">
<div class="panel-title">SCOUT REPORTS</div>
<div id="news-scouts"></div>
</div>
</main>
</div>
</div>
<!-- VISION PANEL -->
<div id="vision-panel" class="panel-section">
<div class="grid" style="grid-template-columns: 1fr 1fr;">
<aside>
<div class="panel">
<div class="panel-title">Image Input</div>
<p style="margin:0 0 0.6rem;color:var(--text-muted);font-size:0.85rem;line-height:1.5;">
Upload a dashboard screenshot, alert, or architecture diagram. VisionOps will interpret the visual state and suggest the next action.
</p>
<div id="vision-drop" style="border:2px dashed var(--border);border-radius:var(--rounded-md);padding:2rem;text-align:center;color:var(--text-muted);cursor:pointer;background:var(--surface-raised);">
<div style="font-size:2rem;margin-bottom:0.5rem;">🖼️</div>
<div>Drop screenshot here or click to upload</div>
<input id="vision-file" type="file" accept="image/*" style="display:none;">
</div>
<div id="vision-preview" style="margin-top:0.8rem;display:none;">
<img id="vision-img" style="max-width:100%;border:1px solid var(--border);border-radius:4px;" alt="Preview">
</div>
</div>
<div class="panel">
<div class="panel-title">Agent Log</div>
<div id="vision-logs" class="terminal-log"></div>
</div>
</aside>
<main>
<div class="panel">
<div class="panel-title">About VisionOps</div>
<p style="margin:0 0 0.5rem;line-height:1.55;">
The Vision tab is the image-aware command center. It is being prepared for the hackathon theme:
agents that navigate UIs, interpret documents and diagrams, and act on visual input.
</p>
<p style="margin:0;line-height:1.55;color:var(--text-muted);">
Wire this panel to Gemma 4 31B on Cerebras Inference to stream vision reasoning at ~1,500 tokens per second.
</p>
</div>
<div class="panel">
<div class="panel-title">Diagnosis</div>
<pre id="vision-diagnosis" class="synthesis-pre">Upload a screenshot to begin analysis.</pre>
</div>
<div class="panel">
<div class="panel-title">Suggested Actions</div>
<div id="vision-actions" style="display:flex;flex-direction:column;gap:0.5rem;">
<div style="padding:0.7rem;border:1px solid var(--border);color:var(--text-muted);font-size:0.85rem;">No actions yet.</div>
</div>
</div>
</main>
</div>
</div>
<script>
const $ = id => document.getElementById(id);
// --- HELPERS ---
function escapeHtml(s) {
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
}
function renderBlockBar(value, max, width=20) {
const pct = max > 0 ? Math.max(0, Math.min(1, (value || 0) / max)) : 0;
const filled = Math.round(pct * width);
const empty = Math.max(0, width - filled);
return '[' + '█'.repeat(filled) + '░'.repeat(empty) + ']';
}
function terminalLog(el, prefix, text, level='info') {
if (!el) return;
const line = document.createElement('div');
line.className = 'log-line ' + level;
const ts = new Date().toTimeString().slice(0, 8);
const cls = 'prefix-' + prefix.replace(/[\[\]]/g, '');
line.innerHTML = `<span class="log-time">${ts}</span><span class="log-prefix ${cls}">${prefix}</span> <span class="log-text">${escapeHtml(text)}</span>`;
el.appendChild(line);
el.scrollTop = el.scrollHeight;
}
function renderSparkline(canvas, values1, values2, color1, color2) {
const ctx = canvas.getContext('2d');
const dpr = window.devicePixelRatio || 1;
const rect = canvas.getBoundingClientRect();
const w = Math.floor(rect.width);
const h = Math.floor(rect.height);
if (w <= 0 || h <= 0) return;
if (canvas.width !== w * dpr || canvas.height !== h * dpr) {
canvas.width = w * dpr;
canvas.height = h * dpr;
}
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
ctx.clearRect(0, 0, w, h);
const pad = { top: 8, right: 4, bottom: 4, left: 4 };
const cw = w - pad.left - pad.right;
const ch = h - pad.top - pad.bottom;
const data1 = values1 || [];
const data2 = values2 || [];
const n = Math.max(data1.length, data2.length);
if (n < 2) return;
const maxVal = Math.max(1, ...data1, ...data2);
// grid
ctx.strokeStyle = 'rgba(0,0,0,0.12)';
ctx.lineWidth = 1;
ctx.beginPath();
for (let i = 1; i < 4; i++) {
const y = pad.top + (ch / 4) * i;
ctx.moveTo(pad.left, y);
ctx.lineTo(w - pad.right, y);
}
for (let i = 1; i < 6; i++) {
const x = pad.left + (cw / 6) * i;
ctx.moveTo(x, pad.top);
ctx.lineTo(x, h - pad.bottom);
}
ctx.stroke();
function drawSeries(values, color, fillColor) {
const step = cw / (n - 1);
const points = values.map((v, i) => ({
x: pad.left + i * step,
y: pad.top + ch - (Math.max(0, v) / maxVal) * ch
}));
// glow stroke
ctx.save();
ctx.shadowColor = color;
ctx.shadowBlur = 10;
ctx.strokeStyle = color;
ctx.lineWidth = 2;
ctx.lineJoin = 'round';
ctx.beginPath();
points.forEach((p, i) => {
if (i === 0) ctx.moveTo(p.x, p.y);
else ctx.lineTo(p.x, p.y);
});
ctx.stroke();
ctx.restore();
// gradient area
const grad = ctx.createLinearGradient(0, pad.top, 0, h - pad.bottom);
grad.addColorStop(0, fillColor);
grad.addColorStop(1, 'rgba(0,0,0,0)');
ctx.fillStyle = grad;
ctx.beginPath();
ctx.moveTo(points[0].x, h - pad.bottom);
points.forEach(p => ctx.lineTo(p.x, p.y));
ctx.lineTo(points[points.length - 1].x, h - pad.bottom);
ctx.closePath();
ctx.fill();
// data dots
ctx.fillStyle = color;
points.forEach((p, i) => {
if (i % 4 === 0) ctx.fillRect(p.x - 1, p.y - 1, 3, 3);
});
}
drawSeries(data1, color1 || '#00FF41', 'rgba(0, 255, 65, 0.22)');
drawSeries(data2, color2 || '#9B59B6', 'rgba(155, 89, 182, 0.18)');
}
function renderTimingTower(summaries) {
towerEl.innerHTML = '';
if (!summaries) return;
summaries.forEach((s, i) => addTowerRow(i + 1, s));
}
function renderStrategyMap(state) {
const map = state || { workers: [
{ name: 'Breaking News Scout', pct: 0, status: 'IDLE' },
{ name: 'Technical Scout', pct: 0, status: 'IDLE' },
{ name: 'Market Scout', pct: 0, status: 'IDLE' },
{ name: 'Commander', pct: 0, status: 'IDLE' }
]};
const container = $('strategy-map');
if (!container) return;
container.innerHTML = '';
map.workers.forEach((w, i) => {
const row = document.createElement('div');
row.className = 'worker-row';
row.id = 'worker-' + i;
row.innerHTML = `
<div class="worker-name">${escapeHtml(w.name)}</div>
<div class="worker-bar" id="lane-${i}-bar">${renderBlockBar(w.pct, 100, 16)}</div>
<div class="worker-status" id="lane-${i}-pct"><span class="status-${w.status.toLowerCase()}">[${w.status}]</span></div>
`;
container.appendChild(row);
});
}
function renderBootSequence() {
return new Promise(resolve => {
const overlay = $('start-lights');
overlay.classList.add('active');
overlay.innerHTML = '';
const lines = [
'BOOTING HEADROOM REGEN DASHBOARD...',
'MOUNT /dev/cerebras0...',
'LOAD KERNEL MODULES glml-c0...',
'INIT NEUROMORPHIC ROUTER...',
'MOUNT /opt/cfire...',
'CALIBRATE HEADROOM REGEN...',
'START TELEMETRY DAEMON...',
'START NEWS SCOUT BUS...',
'START DIFFUSIONGEMMA PERIPHERAL...',
'OK'
];
let i = 0;
function next() {
if (i >= lines.length) {
const prompt = document.createElement('div');
prompt.className = 'boot-line';
prompt.innerHTML = '<span class="boot-ok">READY</span> user@cerebras-bench:~$ _';
overlay.appendChild(prompt);
overlay.scrollTop = overlay.scrollHeight;
setTimeout(() => {
overlay.classList.remove('active');
overlay.innerHTML = '';
resolve();
}, 600);
return;
}
const line = document.createElement('div');
line.className = 'boot-line';
const ok = lines[i].endsWith('...') ? ' <span class="boot-ok">OK</span>' : '';
line.innerHTML = `[${new Date().toTimeString().slice(0,8)}] ${lines[i]}${ok}`;
overlay.appendChild(line);
overlay.scrollTop = overlay.scrollHeight;
i++;
setTimeout(next, 120);
}
next();
});
}
// --- SOUND ENGINE ---
const SoundEngine = {
ctx: null,
enabled: false,
engineNode: null,
engineGain: null,
engineLFO: null,
samples: {},
async init() {
if (!this.ctx) {
this.ctx = new (window.AudioContext || window.webkitAudioContext)();
}
if (this.ctx.state === 'suspended') await this.ctx.resume();
if (Object.keys(this.samples).length === 0) {
const SFX_VER = 'physics2';
const files = {
gear: `/static/sounds/gear_click.mp3?v=${SFX_VER}`,
light: `/static/sounds/light_beep.mp3?v=${SFX_VER}`,
go: `/static/sounds/go_beep.mp3?v=${SFX_VER}`,
chequered: `/static/sounds/chequered.mp3?v=${SFX_VER}`,
radio: `/static/sounds/radio_static.mp3?v=${SFX_VER}`,
scout: `/static/sounds/scout_deploy.mp3?v=${SFX_VER}`,
abort: `/static/sounds/engine_rev.mp3?v=${SFX_VER}`,
};
for (const [key, url] of Object.entries(files)) {
try {
const audio = new Audio(url);
audio.load();
this.samples[key] = audio;
} catch (e) {
console.warn('Failed to load sound', url, e);
}
}
}
},
async toggle() {
return false;
},
_now() { return this.ctx ? this.ctx.currentTime : 0; },
_playSample(key, rate=1.0) {
if (!this.enabled) return;
const sample = this.samples[key];
if (sample) {
const clone = sample.cloneNode();
clone.playbackRate = rate;
clone.volume = 0.5;
clone.play().catch(() => {});
}
},
_beep(freq, duration, type='sine', vol=0.08) {
if (!this.enabled || !this.ctx) return;
const osc = this.ctx.createOscillator();
const gain = this.ctx.createGain();
osc.type = type;
osc.frequency.setValueAtTime(freq, this._now());
gain.gain.setValueAtTime(0, this._now());