Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
629 lines (572 loc) · 32.1 KB
/
Copy pathindex.html
File metadata and controls
629 lines (572 loc) · 32.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="AI agent orchestration & 3D visualization — watch and manage multiple Claude Code instances" />
<meta name="theme-color" content="#0f172a" />
<title>Realm — AI Agent Orchestration & 3D Visualization</title>
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<!-- Open Graph / Social -->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Realm" />
<meta property="og:title" content="Realm — AI Agent Orchestration & 3D Visualization" />
<meta property="og:description" content="Watch and manage multiple Claude Code instances in a living 3D world" />
<meta property="og:image" content="/og-image.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Realm — AI Agent Orchestration & 3D Visualization" />
<meta name="twitter:description" content="Watch and manage multiple Claude Code instances in a living 3D world" />
<meta name="twitter:image" content="/og-image.png" />
</head>
<body>
<div id="app">
<!-- Left: 3D Scene -->
<div id="scene-panel">
<div id="canvas-container"></div>
<!-- Scene HUD -->
<div id="scene-hud">
<div class="scene-badge unified-hud">
<div id="status-dot"></div>
<span id="username" class="hud-user">...</span>
<span id="status-text"></span>
<span class="hud-sep">|</span>
<span id="token-counter" class="hud-tokens" data-i18n-title="hud.tokensUsed" title="Tokens used this session">⚡ 0 tok</span>
<span class="hud-sep">|</span>
<button id="settings-btn" class="hud-btn" data-i18n-title="tooltip.settings" title="Settings">⚙️</button>
<!-- Debug: FPS counter (uncomment to enable)
<span class="hud-sep">|</span>
<span id="fps" class="hud-fps">-- FPS</span>
-->
</div>
</div>
<!-- Dev Panel (animations test) - hidden by default -->
<div id="dev-panel" class="hidden">
<div class="dev-header">🎬 Animations</div>
<div id="dev-animations"></div>
</div>
<!-- Keybind Helper (bottom-left) -->
<div id="keybind-helper">
<div class="keybind-list">
<span class="keybind"><kbd>1-6</kbd> <span data-i18n="hud.keybindSessions">sessions</span> · <kbd>`</kbd><kbd>0</kbd> <span data-i18n="hud.keybindAll">all</span> · <kbd>Tab</kbd> <span data-i18n="hud.keybindFocus">focus</span> · <kbd>D</kbd> <span data-i18n="hud.keybindDraw">draw</span></span>
</div>
</div>
<!-- Draw Mode UI (bottom right of scene) -->
<div id="draw-indicator">
<span class="draw-mode-label" data-i18n="draw.label">DRAW MODE</span>
<span class="draw-mode-hint"><kbd>D</kbd> <span data-i18n="draw.exit">exit</span> · <kbd>X</kbd> <span data-i18n="draw.clear">clear</span> · <kbd>Q</kbd><kbd>E</kbd> <span data-i18n="draw.brush">brush</span> · <kbd>R</kbd> <span data-i18n="draw.threeD">3D</span></span>
</div>
<div id="draw-palette">
<!-- Populated by DrawMode.ts -->
</div>
</div>
<!-- Bottom Command Bar (floating overlay, AI-native layout) -->
<div id="command-bar" class="glass-panel">
<div id="prompt-section">
<!-- Session chip (compact dropdown, replaces session dock) -->
<div id="session-chip">
<button id="session-chip-btn">
<span id="session-chip-dot" class="pill-status"></span>
<span id="session-chip-label" data-i18n="commandBar.allSessions">All sessions</span>
<span class="session-chip-chevron">▾</span>
</button>
<div id="session-chip-dropdown" class="hidden">
<div class="session-option session-option-all active" data-session="all">
<span class="session-option-name" data-i18n="common.all">All</span>
<span class="session-option-hotkey">0</span>
</div>
<div id="session-options"><!-- Dynamic session options from JS --></div>
<button id="new-session-option" data-i18n-title="tooltip.newZone" title="New Zone">
<span class="session-option-icon">+</span>
<span data-i18n="commandBar.newZone">New Zone</span>
</button>
</div>
<span id="attention-badge" class="attention-badge hidden">0</span>
</div>
<!-- Text mode (default) -->
<form id="prompt-form">
<div id="prompt-container">
<textarea id="prompt-input" data-i18n-placeholder="commandBar.placeholder" placeholder="Prompt..." autocomplete="off" rows="1"></textarea>
<div id="file-attachments" class="file-attachments hidden"></div>
<div id="prompt-actions">
<span id="prompt-target"></span>
<div id="mode-selector">
<button type="button" id="mode-selector-btn" data-i18n-title="mode.switchMode" title="Switch Claude Code mode">
<span id="mode-selector-icon"></span>
<span id="mode-selector-label" data-i18n="mode.autoEdit">Auto-edit</span>
<span class="mode-chevron">▾</span>
</button>
<div id="mode-selector-dropdown" class="hidden">
<button type="button" class="mode-option" data-mode="auto-edit">
<span class="mode-option-icon">⚡</span>
<span class="mode-option-text">
<span class="mode-option-label" data-i18n="mode.autoEdit">Auto-edit</span>
<span class="mode-option-desc" data-i18n="mode.autoEditDesc">Edits files automatically</span>
</span>
<span class="mode-check">✓</span>
</button>
<button type="button" class="mode-option" data-mode="plan">
<span class="mode-option-icon">📋</span>
<span class="mode-option-text">
<span class="mode-option-label" data-i18n="mode.plan">Plan</span>
<span class="mode-option-desc" data-i18n="mode.planDesc">Plans before making changes</span>
</span>
<span class="mode-check">✓</span>
</button>
<button type="button" class="mode-option" data-mode="ask-before-edit">
<span class="mode-option-icon">🔒</span>
<span class="mode-option-text">
<span class="mode-option-label" data-i18n="mode.askBeforeEdit">Ask before edit</span>
<span class="mode-option-desc" data-i18n="mode.askBeforeEditDesc">Confirms each file change</span>
</span>
<span class="mode-check">✓</span>
</button>
</div>
</div>
<span class="prompt-action-spacer"></span>
<button type="button" id="file-upload-btn" class="file-upload-btn" data-i18n-title="fileUpload.attach" title="Attach files">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"/>
</svg>
</button>
<input type="file" id="file-upload-input" style="display:none" multiple accept="image/*,.txt,.md,.csv,.pdf">
<button type="button" id="voice-mode-btn" class="voice-mode-btn" data-i18n-title="voice.startVoice" title="Start voice input">🎤</button>
<button type="submit" id="prompt-submit">↗</button>
<button type="button" id="prompt-cancel">◼</button>
</div>
</div>
</form>
<!-- Voice mode (hidden, replaces prompt container when recording) -->
<div id="voice-mode" class="voice-mode hidden">
<div class="voice-mode-top">
<div class="voice-mode-indicator">
<span class="voice-record-dot"></span>
<span class="voice-mode-text" data-i18n="voice.listening">Listening...</span>
</div>
<div class="voice-bars">
<div class="voice-bar" data-bar="0"></div>
<div class="voice-bar" data-bar="1"></div>
<div class="voice-bar" data-bar="2"></div>
<div class="voice-bar" data-bar="3"></div>
<div class="voice-bar" data-bar="4"></div>
<div class="voice-bar" data-bar="5"></div>
<div class="voice-bar" data-bar="6"></div>
<div class="voice-bar" data-bar="7"></div>
<div class="voice-bar" data-bar="8"></div>
<div class="voice-bar" data-bar="9"></div>
</div>
<div class="voice-mode-actions">
<button type="button" id="voice-lang-btn" class="voice-lang-btn" data-i18n-title="voice.switchLang" title="Switch voice language">EN</button>
<button type="button" id="voice-send-btn" class="voice-action-btn voice-action-send">↗ <span data-i18n="common.send">Send</span></button>
<button type="button" id="voice-stop-btn" class="voice-action-btn voice-action-stop">◼ <span data-i18n="common.stop">Stop</span></button>
</div>
</div>
<div id="voice-transcript" class="voice-transcript hidden">
<span id="voice-transcript-text" class="voice-transcript-final"></span>
<span id="voice-transcript-interim" class="voice-transcript-interim"></span>
</div>
</div>
<div id="prompt-status-bar">
<span id="prompt-status"></span>
</div>
</div>
</div>
<!-- Floating feed toggle (outside command bar) -->
<button id="feed-toggle-floating" class="feed-toggle-float active" data-i18n-title="tooltip.toggleFeed" title="Toggle Activity Feed (Tab)">
<span class="feed-toggle-icon">📋</span>
<span class="feed-toggle-label" data-i18n="feed.title">Activity</span>
<kbd class="feed-toggle-kbd">Tab</kbd>
</button>
<!-- Activity Feed Drawer (right-side slide-out, starts closed) -->
<div id="feed-drawer">
<div id="feed-drawer-header">
<span class="drawer-title" data-i18n="feed.title">Activity</span>
<div class="drawer-header-right">
<button id="about-btn" class="feed-about-btn" data-i18n-title="tooltip.aboutRealm" title="About Realm">?</button>
<button id="feed-drawer-close" class="drawer-close-btn" data-i18n-title="tooltip.closeFeed" title="Close (Tab)">×</button>
</div>
</div>
<div id="activity-feed-wrapper">
<div id="activity-feed">
<div id="feed-empty">
<div id="feed-empty-orb"></div>
<h3 data-i18n="feed.emptyTitle">Waiting for activity</h3>
<p data-i18n="feed.emptyDesc">Start using Claude Code to see events here</p>
<p class="feed-empty-hint" data-i18n="feed.emptyHint">Create a zone to get started</p>
</div>
</div>
<button id="feed-scroll-bottom">↓ <span data-i18n="feed.jumpToLatest">Jump to latest</span></button>
</div>
</div>
</div>
<!-- New Session Modal -->
<div id="new-session-modal">
<div class="modal-content">
<div class="modal-header">
<h3 data-i18n="newZone.title">New Zone</h3>
</div>
<div class="modal-field">
<label for="session-cwd-input" data-i18n="newZone.directory">Directory</label>
<input type="text" id="session-cwd-input" data-i18n-placeholder="newZone.dirPlaceholder" placeholder="e.g. /home/user/my-project" autocomplete="off" />
<div class="field-hint"><span data-i18n="newZone.defaultHint">Default: </span><code id="modal-default-cwd">~</code></div>
</div>
<div class="modal-field">
<label for="session-name-input" data-i18n="newZone.name">Name</label>
<input type="text" id="session-name-input" data-i18n-placeholder="newZone.namePlaceholder" placeholder="Auto-filled from directory..." autocomplete="off" />
</div>
<div class="modal-field">
<label for="session-description-input" data-i18n="newZone.description">Description</label>
<textarea id="session-description-input" rows="2" data-i18n-placeholder="newZone.descriptionPlaceholder" placeholder="What does this zone do? (optional)"></textarea>
<div class="field-hint" data-i18n="newZone.descriptionHint">Helps route prompts to the right zone automatically</div>
</div>
<div class="modal-field">
<label for="session-agent-type" data-i18n="newZone.agentType">Agent Type</label>
<select id="session-agent-type" class="modal-select">
<option value="claude_code" selected>Claude Code</option>
<option value="nanoclaw">NanoClaw</option>
<option value="zeroclaw">ZeroClaw</option>
<option value="openclaw">OpenClaw</option>
</select>
</div>
<div class="modal-field" id="claude-code-options">
<label data-i18n="newZone.options">Options</label>
<div class="modal-checkboxes">
<label class="modal-checkbox">
<input type="checkbox" id="session-opt-continue" />
<span class="checkbox-label"><span data-i18n="newZone.optContinue">Continue</span> <code>-c</code></span>
</label>
<label class="modal-checkbox" id="session-opt-skip-perms-row">
<input type="checkbox" id="session-opt-skip-perms" checked />
<span class="checkbox-label"><span data-i18n="newZone.optSkipPerms">Skip permissions</span> <code>--dangerously-skip-permissions</code></span>
</label>
<label class="modal-checkbox">
<input type="checkbox" id="session-opt-chrome" />
<span class="checkbox-label"><span data-i18n="newZone.optChrome">Chrome</span> <code>--chrome</code></span>
</label>
</div>
</div>
<!-- Generic Agent Options (non-Claude Code) -->
<div class="modal-field" id="generic-agent-options" style="display: none;">
<label data-i18n="newZone.launchMode">Launch Mode</label>
<div class="modal-radio-group">
<label class="modal-radio">
<input type="radio" name="launch-mode" value="local" checked />
<span data-i18n="newZone.localProcess">Local Process</span>
</label>
<label class="modal-radio">
<input type="radio" name="launch-mode" value="docker" />
<span data-i18n="newZone.docker">Docker / Container</span>
</label>
<label class="modal-radio">
<input type="radio" name="launch-mode" value="gateway" />
<span data-i18n="newZone.gateway">Remote Gateway</span>
</label>
</div>
</div>
<!-- Launch mode: Local -->
<div class="modal-field" id="launch-local-options" style="display: none;">
<label data-i18n="newZone.binaryPath">Binary / Project Path</label>
<input type="text" id="session-binary-path" placeholder="/usr/local/bin/openclaw" />
</div>
<!-- Launch mode: Docker -->
<div class="modal-field" id="launch-docker-options" style="display: none;">
<label data-i18n="newZone.dockerImage">Docker Image</label>
<input type="text" id="session-docker-image" placeholder="openclaw:latest" />
<div class="settings-checkbox-row" style="margin-top: 6px;">
<label class="checkbox-label">
<input type="checkbox" id="session-apple-container" />
<span data-i18n="newZone.appleContainer">Use Apple Container</span>
</label>
</div>
</div>
<!-- Launch mode: Gateway -->
<div class="modal-field" id="launch-gateway-options" style="display: none;">
<label data-i18n="newZone.gatewayUrl">Gateway URL</label>
<input type="text" id="session-gateway-url" placeholder="https://agent-gateway.example.com" />
<label data-i18n="newZone.gatewayToken" style="margin-top: 8px; display: block;">Auth Token</label>
<input type="password" id="session-gateway-token" placeholder="Bearer token..." />
</div>
<!-- LLM Provider selector (populated from settings) -->
<div class="modal-field" id="session-llm-options" style="display: none;">
<label data-i18n="newZone.llmProvider">LLM Provider</label>
<select id="session-llm-provider" class="modal-select">
<option value="" data-i18n="newZone.useDefault">Use Default</option>
</select>
</div>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="modal-cancel">✕ <span data-i18n="common.cancel">Cancel</span></button>
<button type="button" class="modal-btn modal-btn-create" id="modal-create">+ <span data-i18n="common.create">Create</span></button>
</div>
</div>
</div>
<!-- Settings Modal -->
<div id="settings-modal">
<div class="modal-content">
<div class="modal-header">
<h3 data-i18n="settings.title">Settings</h3>
</div>
<!-- Tab Bar -->
<div class="settings-tabs">
<button type="button" class="settings-tab-btn active" data-tab="general" data-i18n="settings.tabGeneral">General</button>
<button type="button" class="settings-tab-btn" data-tab="world" data-i18n="settings.tabWorld">World</button>
<button type="button" class="settings-tab-btn" data-tab="claw" data-i18n="settings.tabClaw">Claw</button>
<button type="button" class="settings-tab-btn" data-tab="shortcuts" data-i18n="settings.tabShortcuts">Shortcuts</button>
</div>
<!-- Tab: General -->
<div class="settings-tab-content active" data-tab="general">
<div class="modal-field">
<label data-i18n="settings.language">Language</label>
<div class="settings-language-row">
<button type="button" class="lang-btn" data-lang="en">English</button>
<button type="button" class="lang-btn" data-lang="zh">中文</button>
</div>
</div>
<div class="modal-field">
<label data-i18n="settings.audio">Audio</label>
<div class="settings-slider-row">
<span class="slider-label" data-i18n="settings.volume">Volume</span>
<input type="range" id="settings-volume" class="settings-slider" min="0" max="100" value="70" />
<span id="settings-volume-value" class="slider-value">70%</span>
</div>
<div class="settings-checkbox-row">
<label class="checkbox-label">
<input type="checkbox" id="settings-spatial-audio" checked />
<span data-i18n="settings.spatialAudio">Spatial Audio</span>
</label>
<span class="field-hint-inline" data-i18n="settings.spatialHint">Volume/pan based on zone position</span>
</div>
</div>
<div class="modal-field">
<label data-i18n="settings.privacy">Privacy</label>
<div class="settings-checkbox-row">
<label class="checkbox-label">
<input type="checkbox" id="settings-streaming-mode" />
<span data-i18n="settings.streamingMode">Streaming Mode</span>
</label>
<span class="field-hint-inline" data-i18n="settings.streamingHint">Hide username for privacy</span>
</div>
</div>
</div>
<!-- Tab: World -->
<div class="settings-tab-content" data-tab="world">
<div class="modal-field">
<label data-i18n="settings.world">World</label>
<div class="settings-slider-row">
<span class="slider-label" data-i18n="settings.gridSize">Grid Size</span>
<input type="range" id="settings-grid-size" class="settings-slider" min="5" max="80" value="20" />
<span id="settings-grid-size-value" class="slider-value">20</span>
</div>
<div class="field-hint" data-i18n="settings.gridHint">Number of hex rings from center. Larger = more space, may impact performance.</div>
</div>
<div class="modal-field">
<label data-i18n="settings.agentConnection">Agent Connection</label>
<div class="settings-port-row">
<span class="port-label">localhost:</span>
<input type="number" id="settings-port" value="4003" min="1" max="65535" />
<span id="settings-port-status" class="port-status"></span>
</div>
<div class="field-hint" data-i18n="settings.portHint">Port where the Realm agent is running. Changes require refresh.</div>
</div>
<div class="modal-field">
<label data-i18n="settings.sessions">Sessions</label>
<div class="settings-actions">
<button type="button" class="settings-action-btn" id="settings-refresh-sessions">🔄 <span data-i18n="settings.refreshSessions">Refresh Sessions</span></button>
</div>
</div>
</div>
<!-- Tab: Claw -->
<div class="settings-tab-content" data-tab="claw">
<div class="settings-tab-hint" data-i18n="settings.clawHint">Configure LLM providers for Claw agents (OpenClaw, NanoClaw, ZeroClaw). Claude Code uses its own API key and does not need this.</div>
<div class="modal-field">
<label data-i18n="settings.llmProviders">LLM Providers</label>
<div id="settings-llm-list" class="settings-card-list">
<!-- Dynamically populated -->
</div>
<button type="button" class="settings-action-btn" id="settings-add-llm">+ <span data-i18n="settings.addProvider">Add Provider</span></button>
</div>
</div>
<!-- Tab: Shortcuts -->
<div class="settings-tab-content" data-tab="shortcuts">
<div class="modal-field">
<label data-i18n="settings.keyboardShortcuts">Keyboard Shortcuts</label>
<div id="keybind-settings" class="keybind-settings">
<!-- Dynamically populated by KeybindSettings.ts -->
</div>
<div class="field-hint" data-i18n="settings.keybindHint">Click a keybind to change it. Press the new key combination, or Escape to cancel.</div>
</div>
</div>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="settings-close">✕ <span data-i18n="common.close">Close</span></button>
</div>
</div>
</div>
<!-- About Modal -->
<div id="about-modal">
<div class="modal-content about-modal-content">
<div class="modal-header">
<h3 data-i18n="about.title">Realm</h3>
</div>
<div class="about-description">
<p data-i18n="about.description">Realm is a 3D visualization app for Claude Code.</p>
<p data-i18n="about.subtitle">Watch and manage your claudes in real-time - now featuring hexagonal grids!</p>
<p class="about-subtitle" data-i18n="about.privacyNote">Realm syncs with claude code instances running on your own machine. No files or
code are sent to the web server.</p>
</div>
<div class="about-section">
<div class="about-section-title" data-i18n="about.commands">Commands</div>
<div class="about-commands">
<div class="about-cmd"><code>npx realm</code><span data-i18n="about.startServer">Start server</span></div>
<div class="about-cmd"><code>npx realm doctor</code><span data-i18n="about.diagnoseIssues">Diagnose issues</span></div>
<div class="about-cmd"><code>npx realm setup</code><span data-i18n="about.reinstallHooks">Reinstall hooks</span></div>
<div class="about-cmd"><code>npx realm uninstall</code><span data-i18n="about.removeHooks">Remove hooks</span></div>
</div>
</div>
<div class="about-section">
<div class="about-section-title" data-i18n="about.troubleshooting">Troubleshooting</div>
<p class="about-help-text" data-i18n="about.troubleshootingHelp">If a zone gets stuck, Claude Code may be waiting for input or in an unknown state. Attach to the tmux session to see what's happening:</p>
<div class="about-commands">
<div class="about-cmd"><code>tmux ls</code><span data-i18n="about.listSessions">List sessions</span></div>
<div class="about-cmd"><code>tmux attach -t <em>session</em></code><span data-i18n="about.attachToSession">Attach to session</span></div>
</div>
</div>
<div class="about-section">
<div class="about-section-title" data-i18n="about.voiceInput">Voice Input</div>
<p class="about-help-text" data-i18n-html="about.voiceHelp">Press <kbd>Ctrl+M</kbd> or click the mic button to start voice input. Supports English and Chinese.</p>
</div>
<div class="about-footer">
<span id="about-version" class="about-version">v0.0.0</span>
<span class="about-sep">·</span>
<span class="about-credit">Elysian Labs</span>
</div>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="about-close" data-i18n="common.close">Close</button>
</div>
</div>
</div>
<!-- Question Modal (for AskUserQuestion) -->
<div id="question-modal">
<div class="modal-content question-modal-content">
<div class="modal-header">
<span class="question-badge" id="question-badge" data-i18n="question.badge">Question</span>
<h3 id="question-header" data-i18n="question.header">Claude needs input</h3>
</div>
<div class="question-text" id="question-text"></div>
<div class="question-options" id="question-options">
<!-- Options will be inserted here -->
</div>
<div class="question-other">
<label for="question-other-input" data-i18n="question.otherLabel">Or type your own response:</label>
<textarea id="question-other-input" data-i18n-placeholder="question.otherPlaceholder" placeholder="Type here..." rows="2"></textarea>
</div>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="question-skip" data-i18n="common.skip">Skip</button>
<button type="button" class="modal-btn modal-btn-create" id="question-send-other" data-i18n="common.send">Send</button>
</div>
</div>
</div>
<!-- Permission Modal (for tool permissions) -->
<div id="permission-modal">
<div class="modal-content permission-modal-content">
<div class="modal-header">
<span class="permission-badge" data-i18n="permission.badge">Permission Required</span>
<h3 id="permission-header"></h3>
</div>
<div class="permission-context" id="permission-context">
<!-- Context will be inserted here -->
</div>
<div class="permission-buttons" id="permission-buttons">
<!-- Buttons will be generated dynamically based on options -->
</div>
</div>
</div>
<!-- Zone Info Modal (for session details) -->
<div id="zone-info-modal">
<div class="modal-content zone-info-modal-content">
<div class="modal-header">
<h3 data-i18n="zoneInfo.title">Zone Info</h3>
<button type="button" class="zone-info-close-btn" id="zone-info-close">×</button>
</div>
<div class="zone-info-body" id="zone-info-content">
<!-- Content will be inserted dynamically -->
</div>
</div>
</div>
<!-- Text Label Modal (for hex text labels) -->
<div id="text-label-modal">
<div class="modal-content text-label-modal-content">
<div class="modal-header">
<h3 id="text-label-title" data-i18n="textLabel.title">Add Label</h3>
</div>
<div class="text-label-body">
<textarea
id="text-label-input"
class="text-label-textarea"
data-i18n-placeholder="textLabel.placeholder"
placeholder="Enter your text here..."
maxlength="500"
rows="4"
></textarea>
<div class="text-label-footer">
<span class="text-label-char-count" id="text-label-char-count">0/500</span>
<span class="text-label-hint" data-i18n="textLabel.hint">Enter to save, Shift+Enter for newline</span>
</div>
</div>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="text-label-cancel" data-i18n="common.cancel">Cancel</button>
<button type="button" class="modal-btn modal-btn-create" id="text-label-save" data-i18n="common.save">Save</button>
</div>
</div>
</div>
<!-- Zone Timeout Modal (shown when zone creation takes too long) -->
<div id="zone-timeout-modal">
<div class="modal-content zone-timeout-content">
<div class="modal-header">
<h3 data-i18n="zoneTimeout.title">Zone Not Responding</h3>
</div>
<p class="zone-timeout-text" data-i18n="zoneTimeout.description">
The zone is taking longer than expected to start. Claude Code may be stuck or waiting for input.
</p>
<div class="about-section">
<div class="about-section-title" data-i18n="about.troubleshooting">Troubleshooting</div>
<div class="about-commands">
<div class="about-cmd"><code>tmux ls</code><span data-i18n="about.listSessions">List sessions</span></div>
<div class="about-cmd"><code>tmux attach -t <em>session</em></code><span data-i18n="about.attachToSession">See what's happening</span></div>
</div>
</div>
<p class="zone-timeout-hint" data-i18n="zoneTimeout.updateHint">Also ensure your Claude Code is up to date.</p>
<div class="modal-actions">
<button type="button" class="modal-btn modal-btn-cancel" id="zone-timeout-close" data-i18n="common.close">Close</button>
</div>
</div>
</div>
<!-- Offline Banner (shown when user tries to interact while disconnected) -->
<div id="offline-banner" class="offline-banner hidden">
<span data-i18n="offline.banner">Not connected to local server</span>
<button id="offline-banner-dismiss">×</button>
</div>
<!-- Not Connected Overlay -->
<div id="not-connected-overlay">
<div class="not-connected-content">
<h2 data-i18n="offline.title">Realm!</h2>
<p class="not-connected-description" data-i18n="offline.description">
Realm is a 3D app to watch and manage Claude Code instances.
</p>
<p class="not-connected-privacy" data-i18n="offline.privacyNote">
Realm syncs with CC instances running on your local machine. Realm is an interface - no files or code
are sent to this server.
</p>
<div class="not-connected-setup">
<p class="not-connected-setup-label" data-i18n="offline.getStarted">Get started:</p>
<div class="not-connected-code">npx realm setup && npx realm</div>
</div>
<div class="not-connected-actions">
<button class="not-connected-btn not-connected-btn-retry" id="retry-connection">↻ <span data-i18n="offline.reconnect">Reconnect</span></button>
<button class="not-connected-btn not-connected-btn-explore" id="explore-offline">👀 <span data-i18n="offline.explore">Explore</span></button>
</div>
</div>
</div>
<!-- Toast notifications -->
<div id="toast-container"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>