clay-server 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +281 -0
  3. package/bin/cli.js +2385 -0
  4. package/lib/cli-sessions.js +270 -0
  5. package/lib/config.js +237 -0
  6. package/lib/daemon.js +489 -0
  7. package/lib/ipc.js +112 -0
  8. package/lib/notes.js +120 -0
  9. package/lib/pages.js +664 -0
  10. package/lib/project.js +1433 -0
  11. package/lib/public/app.js +2795 -0
  12. package/lib/public/apple-touch-icon-dark.png +0 -0
  13. package/lib/public/apple-touch-icon.png +0 -0
  14. package/lib/public/css/base.css +264 -0
  15. package/lib/public/css/diff.css +128 -0
  16. package/lib/public/css/filebrowser.css +1114 -0
  17. package/lib/public/css/highlight.css +144 -0
  18. package/lib/public/css/icon-strip.css +296 -0
  19. package/lib/public/css/input.css +573 -0
  20. package/lib/public/css/menus.css +856 -0
  21. package/lib/public/css/messages.css +1445 -0
  22. package/lib/public/css/mobile-nav.css +354 -0
  23. package/lib/public/css/overlays.css +697 -0
  24. package/lib/public/css/rewind.css +505 -0
  25. package/lib/public/css/server-settings.css +761 -0
  26. package/lib/public/css/sidebar.css +936 -0
  27. package/lib/public/css/sticky-notes.css +358 -0
  28. package/lib/public/css/title-bar.css +314 -0
  29. package/lib/public/favicon-dark.svg +1 -0
  30. package/lib/public/favicon.svg +1 -0
  31. package/lib/public/icon-192-dark.png +0 -0
  32. package/lib/public/icon-192.png +0 -0
  33. package/lib/public/icon-512-dark.png +0 -0
  34. package/lib/public/icon-512.png +0 -0
  35. package/lib/public/icon-mono.svg +1 -0
  36. package/lib/public/index.html +762 -0
  37. package/lib/public/manifest.json +27 -0
  38. package/lib/public/modules/diff.js +398 -0
  39. package/lib/public/modules/events.js +21 -0
  40. package/lib/public/modules/filebrowser.js +1411 -0
  41. package/lib/public/modules/fileicons.js +172 -0
  42. package/lib/public/modules/icons.js +54 -0
  43. package/lib/public/modules/input.js +584 -0
  44. package/lib/public/modules/markdown.js +356 -0
  45. package/lib/public/modules/notifications.js +649 -0
  46. package/lib/public/modules/qrcode.js +70 -0
  47. package/lib/public/modules/rewind.js +345 -0
  48. package/lib/public/modules/server-settings.js +510 -0
  49. package/lib/public/modules/sidebar.js +1083 -0
  50. package/lib/public/modules/state.js +3 -0
  51. package/lib/public/modules/sticky-notes.js +688 -0
  52. package/lib/public/modules/terminal.js +697 -0
  53. package/lib/public/modules/theme.js +738 -0
  54. package/lib/public/modules/tools.js +1608 -0
  55. package/lib/public/modules/utils.js +56 -0
  56. package/lib/public/style.css +15 -0
  57. package/lib/public/sw.js +75 -0
  58. package/lib/push.js +124 -0
  59. package/lib/sdk-bridge.js +989 -0
  60. package/lib/server.js +582 -0
  61. package/lib/sessions.js +424 -0
  62. package/lib/terminal-manager.js +187 -0
  63. package/lib/terminal.js +24 -0
  64. package/lib/themes/ayu-light.json +9 -0
  65. package/lib/themes/catppuccin-latte.json +9 -0
  66. package/lib/themes/catppuccin-mocha.json +9 -0
  67. package/lib/themes/clay-light.json +10 -0
  68. package/lib/themes/clay.json +10 -0
  69. package/lib/themes/dracula.json +9 -0
  70. package/lib/themes/everforest-light.json +9 -0
  71. package/lib/themes/everforest.json +9 -0
  72. package/lib/themes/github-light.json +9 -0
  73. package/lib/themes/gruvbox-dark.json +9 -0
  74. package/lib/themes/gruvbox-light.json +9 -0
  75. package/lib/themes/monokai.json +9 -0
  76. package/lib/themes/nord-light.json +9 -0
  77. package/lib/themes/nord.json +9 -0
  78. package/lib/themes/one-dark.json +9 -0
  79. package/lib/themes/one-light.json +9 -0
  80. package/lib/themes/rose-pine-dawn.json +9 -0
  81. package/lib/themes/rose-pine.json +9 -0
  82. package/lib/themes/solarized-dark.json +9 -0
  83. package/lib/themes/solarized-light.json +9 -0
  84. package/lib/themes/tokyo-night-light.json +9 -0
  85. package/lib/themes/tokyo-night.json +9 -0
  86. package/lib/updater.js +97 -0
  87. package/package.json +47 -0
@@ -0,0 +1,856 @@
1
+ /* ==========================================================================
2
+ Header (now inside .title-bar-content)
3
+ ========================================================================== */
4
+
5
+ /* Legacy #header — removed from DOM, styles kept for .title-bar-content */
6
+ #header {
7
+ display: none;
8
+ }
9
+
10
+ #header-left {
11
+ display: flex;
12
+ align-items: center;
13
+ overflow: hidden;
14
+ min-width: 0;
15
+ }
16
+
17
+ .header-title {
18
+ font-weight: 600;
19
+ font-size: 15px;
20
+ color: var(--text);
21
+ overflow: hidden;
22
+ text-overflow: ellipsis;
23
+ white-space: nowrap;
24
+ }
25
+
26
+ #header-rename-btn {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ width: 24px;
31
+ height: 24px;
32
+ border: 1px solid transparent;
33
+ background: none;
34
+ color: var(--text-dimmer);
35
+ cursor: pointer;
36
+ border-radius: 8px;
37
+ flex-shrink: 0;
38
+ padding: 0;
39
+ margin-left: 4px;
40
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
41
+ }
42
+
43
+ #header-rename-btn:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.04); border-color: var(--border); }
44
+ #header-rename-btn .lucide { width: 13px; height: 13px; }
45
+
46
+ #header-info-btn {
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ width: 20px;
51
+ height: 20px;
52
+ border: none;
53
+ background: transparent;
54
+ color: var(--text-dimmer);
55
+ cursor: pointer;
56
+ border-radius: 6px;
57
+ flex-shrink: 0;
58
+ padding: 0;
59
+ margin-left: 6px;
60
+ transition: color 0.15s, background 0.15s;
61
+ position: relative;
62
+ }
63
+ #header-info-btn:hover { color: var(--text); }
64
+ #header-info-btn > * { pointer-events: none; }
65
+ #header-info-btn .lucide { width: 14px; height: 14px; }
66
+ #header-info-btn .lucide circle {
67
+ fill: currentColor;
68
+ stroke: currentColor;
69
+ }
70
+ #header-info-btn .lucide path,
71
+ #header-info-btn .lucide line {
72
+ stroke: var(--bg);
73
+ stroke-width: 2.5;
74
+ }
75
+
76
+ /* Session info popover */
77
+ .session-info-popover {
78
+ position: fixed;
79
+ background: var(--bg);
80
+ border: 1px solid var(--border);
81
+ border-radius: 10px;
82
+ padding: 12px 16px;
83
+ min-width: 260px;
84
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
85
+ z-index: 9999;
86
+ font-size: 12px;
87
+ color: var(--text-secondary);
88
+ line-height: 1.6;
89
+ }
90
+ .session-info-popover .info-row {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 8px;
94
+ }
95
+ .session-info-popover .info-label {
96
+ color: var(--text-muted);
97
+ flex-shrink: 0;
98
+ min-width: 70px;
99
+ }
100
+ .session-info-popover .info-value {
101
+ font-family: "Roboto Mono", monospace;
102
+ font-size: 11px;
103
+ color: var(--text);
104
+ word-break: break-all;
105
+ }
106
+ .session-info-popover .info-copy-btn {
107
+ margin-left: auto;
108
+ border: none;
109
+ background: transparent;
110
+ color: var(--text-dimmer);
111
+ cursor: pointer;
112
+ padding: 2px;
113
+ border-radius: 4px;
114
+ flex-shrink: 0;
115
+ display: flex;
116
+ align-items: center;
117
+ transition: color 0.15s;
118
+ }
119
+ .session-info-popover .info-copy-btn:hover { color: var(--accent2); }
120
+ .session-info-popover .info-copy-btn .lucide { width: 13px; height: 13px; }
121
+
122
+ .header-rename-input {
123
+ font-weight: 600;
124
+ font-size: 15px;
125
+ color: var(--text);
126
+ background: var(--input-bg);
127
+ border: 1px solid var(--accent);
128
+ border-radius: 6px;
129
+ padding: 2px 8px;
130
+ font-family: inherit;
131
+ outline: none;
132
+ min-width: 0;
133
+ flex: 1;
134
+ }
135
+
136
+ .status {
137
+ display: flex;
138
+ align-items: center;
139
+ gap: 6px;
140
+ font-size: 12px;
141
+ color: var(--text-muted);
142
+ flex-shrink: 0;
143
+ }
144
+
145
+ /* --- Debug menu --- */
146
+ #debug-menu-wrap {
147
+ position: relative;
148
+ }
149
+
150
+ #debug-menu-wrap.hidden { display: none; }
151
+
152
+ #debug-btn {
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: center;
156
+ background: none;
157
+ border: 1px solid transparent;
158
+ border-radius: 8px;
159
+ color: var(--error);
160
+ cursor: pointer;
161
+ padding: 4px;
162
+ opacity: 0.6;
163
+ transition: opacity 0.15s, background 0.15s, border-color 0.15s;
164
+ }
165
+
166
+ #debug-btn .lucide { width: 15px; height: 15px; }
167
+ #debug-btn:hover { opacity: 1; background: var(--error-8); border-color: var(--error-25); }
168
+ #debug-btn.active { opacity: 1; background: var(--error-12); border-color: var(--error-25); }
169
+
170
+ #debug-menu {
171
+ position: absolute;
172
+ top: calc(100% + 6px);
173
+ right: 0;
174
+ background: var(--bg-alt);
175
+ border: 1px solid var(--border);
176
+ border-radius: 10px;
177
+ padding: 8px 0;
178
+ min-width: 200px;
179
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
180
+ z-index: 200;
181
+ }
182
+
183
+ #debug-menu.hidden { display: none; }
184
+
185
+ /* --- Terminal toggle button (mobile only) --- */
186
+ #footer-status,
187
+ #terminal-toggle-btn {
188
+ display: flex;
189
+ align-items: center;
190
+ justify-content: center;
191
+ background: none;
192
+ border: 1px solid transparent;
193
+ border-radius: 8px;
194
+ color: var(--text-dimmer);
195
+ cursor: pointer;
196
+ padding: 4px;
197
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
198
+ }
199
+ #footer-status .lucide,
200
+ #terminal-toggle-btn .lucide { width: 15px; height: 15px; }
201
+ #footer-status:hover,
202
+ #terminal-toggle-btn:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.04); border-color: var(--border); }
203
+ #terminal-toggle-btn { position: relative; }
204
+ #terminal-count {
205
+ position: absolute;
206
+ top: -4px;
207
+ right: -4px;
208
+ background: var(--success);
209
+ color: #fff;
210
+ font-size: 9px;
211
+ font-weight: 700;
212
+ min-width: 14px;
213
+ height: 14px;
214
+ border-radius: 7px;
215
+ display: inline-flex;
216
+ align-items: center;
217
+ justify-content: center;
218
+ padding: 0 3px;
219
+ font-family: "Roboto Mono", monospace;
220
+ }
221
+ #terminal-count.hidden { display: none; }
222
+
223
+ /* --- QR code button & overlay --- */
224
+ #qr-btn {
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ background: none;
229
+ border: 1px solid transparent;
230
+ border-radius: 8px;
231
+ color: var(--text-dimmer);
232
+ cursor: pointer;
233
+ padding: 4px;
234
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
235
+ }
236
+ #qr-btn .lucide { width: 15px; height: 15px; }
237
+ #qr-btn:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.04); border-color: var(--border); }
238
+ #qr-btn.active { color: var(--text); background: rgba(var(--overlay-rgb),0.06); border-color: var(--border); }
239
+
240
+ #qr-overlay {
241
+ position: fixed;
242
+ inset: 0;
243
+ background: rgba(var(--shadow-rgb), 0.6);
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ z-index: 500;
248
+ }
249
+ #qr-overlay.hidden { display: none; }
250
+
251
+ #qr-overlay-inner {
252
+ background: #fff;
253
+ border-radius: 16px;
254
+ padding: 28px;
255
+ display: flex;
256
+ flex-direction: column;
257
+ align-items: center;
258
+ gap: 14px;
259
+ box-shadow: 0 8px 32px rgba(var(--shadow-rgb), 0.5);
260
+ }
261
+
262
+ #qr-canvas table { border-collapse: collapse; }
263
+ #qr-canvas td { width: 4px; height: 4px; padding: 0; }
264
+
265
+ #qr-url {
266
+ font-size: 13px;
267
+ color: #555;
268
+ word-break: break-all;
269
+ text-align: center;
270
+ max-width: 260px;
271
+ font-family: system-ui, sans-serif;
272
+ cursor: pointer;
273
+ padding: 4px 10px;
274
+ border-radius: 6px;
275
+ transition: background 0.15s, color 0.15s;
276
+ }
277
+ #qr-url:hover { background: #eee; color: #222; }
278
+ #qr-url:active { background: #ddd; }
279
+ #qr-url.copied { color: #16a34a; font-weight: 600; }
280
+ .qr-hint {
281
+ display: block;
282
+ font-size: 11px;
283
+ color: #999;
284
+ margin-top: 2px;
285
+ font-weight: 400;
286
+ }
287
+
288
+ /* --- Notification menu --- */
289
+ #notif-menu-wrap {
290
+ position: relative;
291
+ }
292
+
293
+ #notif-btn {
294
+ display: flex;
295
+ align-items: center;
296
+ justify-content: center;
297
+ background: none;
298
+ border: 1px solid transparent;
299
+ border-radius: 8px;
300
+ color: var(--text-dimmer);
301
+ cursor: pointer;
302
+ padding: 4px;
303
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
304
+ }
305
+
306
+ #notif-btn .lucide { width: 15px; height: 15px; }
307
+ #notif-btn:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.04); border-color: var(--border); }
308
+ #notif-btn.active { color: var(--text); background: rgba(var(--overlay-rgb),0.06); border-color: var(--border); }
309
+
310
+ #notif-menu {
311
+ position: absolute;
312
+ top: calc(100% + 6px);
313
+ right: 0;
314
+ background: var(--bg-alt);
315
+ border: 1px solid var(--border);
316
+ border-radius: 10px;
317
+ padding: 8px 0;
318
+ min-width: 200px;
319
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
320
+ z-index: 200;
321
+ }
322
+
323
+ #notif-menu.hidden { display: none; }
324
+
325
+ .notif-option {
326
+ display: flex;
327
+ align-items: center;
328
+ justify-content: space-between;
329
+ padding: 8px 14px;
330
+ font-size: 13px;
331
+ color: var(--text-secondary);
332
+ cursor: pointer;
333
+ transition: background 0.15s;
334
+ }
335
+
336
+ .notif-option > span:first-child {
337
+ display: flex;
338
+ align-items: center;
339
+ gap: 8px;
340
+ }
341
+
342
+ .notif-option > span:first-child .lucide {
343
+ width: 14px;
344
+ height: 14px;
345
+ flex-shrink: 0;
346
+ }
347
+
348
+ .notif-option:hover { background: rgba(var(--overlay-rgb), 0.03); }
349
+ .notif-option input { display: none; }
350
+
351
+ #notif-blocked-hint {
352
+ padding: 6px 14px;
353
+ font-size: 11px;
354
+ line-height: 1.5;
355
+ color: var(--warning);
356
+ }
357
+
358
+ #notif-blocked-hint.hidden { display: none; }
359
+ #notif-blocked-hint a { color: var(--accent); text-decoration: none; }
360
+ #notif-blocked-hint a:hover { text-decoration: underline; }
361
+
362
+ .toggle-track {
363
+ width: 34px;
364
+ height: 20px;
365
+ background: var(--input-bg);
366
+ border: 1px solid var(--border);
367
+ border-radius: 10px;
368
+ position: relative;
369
+ transition: background 0.2s, border-color 0.2s;
370
+ flex-shrink: 0;
371
+ }
372
+
373
+ .toggle-thumb {
374
+ position: absolute;
375
+ top: 2px;
376
+ left: 2px;
377
+ width: 14px;
378
+ height: 14px;
379
+ background: var(--text-dimmer);
380
+ border-radius: 50%;
381
+ transition: transform 0.2s, background 0.2s;
382
+ }
383
+
384
+ .notif-option input:checked + .toggle-track {
385
+ background: var(--accent);
386
+ border-color: var(--accent);
387
+ }
388
+
389
+ .notif-option input:checked + .toggle-track .toggle-thumb {
390
+ transform: translateX(14px);
391
+ background: #fff;
392
+ }
393
+
394
+ /* --- Notification menu items --- */
395
+ .notif-divider {
396
+ height: 1px;
397
+ background: var(--border-subtle);
398
+ margin: 4px 0;
399
+ }
400
+
401
+ #notif-push-row {
402
+ display: none;
403
+ }
404
+
405
+ /* iOS Safari notification info */
406
+ .notif-ios-info { cursor: default; }
407
+ .notif-ios-info-btn {
408
+ background: none;
409
+ border: none;
410
+ color: var(--text-dimmer);
411
+ cursor: pointer;
412
+ padding: 2px;
413
+ display: flex;
414
+ align-items: center;
415
+ transition: color 0.15s;
416
+ }
417
+ .notif-ios-info-btn:hover { color: var(--text-secondary); }
418
+
419
+ #notif-ios-hint {
420
+ padding: 6px 14px;
421
+ font-size: 11px;
422
+ line-height: 1.5;
423
+ color: var(--text-muted);
424
+ }
425
+ #notif-ios-hint .lucide { flex-shrink: 0; }
426
+ #notif-ios-hint strong { color: var(--text-secondary); }
427
+ #notif-ios-hint.hidden { display: none; }
428
+
429
+ .notif-action {
430
+ display: flex;
431
+ align-items: center;
432
+ gap: 8px;
433
+ width: 100%;
434
+ padding: 8px 14px;
435
+ font-size: 13px;
436
+ color: var(--text-secondary);
437
+ background: none;
438
+ border: none;
439
+ font-family: inherit;
440
+ cursor: pointer;
441
+ transition: background 0.15s;
442
+ }
443
+
444
+ .notif-action:hover { background: rgba(var(--overlay-rgb), 0.03); }
445
+ .notif-action .lucide { flex-shrink: 0; }
446
+
447
+ .notif-action.copied { color: var(--success); }
448
+
449
+ #client-count {
450
+ background: var(--accent);
451
+ color: #fff;
452
+ font-size: 9px;
453
+ font-weight: 700;
454
+ min-width: 16px;
455
+ height: 16px;
456
+ border-radius: 8px;
457
+ display: inline-flex;
458
+ align-items: center;
459
+ justify-content: center;
460
+ padding: 0 4px;
461
+ cursor: pointer;
462
+ line-height: 1;
463
+ }
464
+
465
+ #client-count.hidden { display: none; }
466
+
467
+ .tooltip {
468
+ position: fixed;
469
+ background: var(--code-bg);
470
+ border: 1px solid var(--border);
471
+ border-radius: 8px;
472
+ padding: 6px 12px;
473
+ font-size: 12px;
474
+ color: var(--text-secondary);
475
+ white-space: nowrap;
476
+ pointer-events: none;
477
+ opacity: 0;
478
+ transition: opacity 0.15s;
479
+ z-index: 200;
480
+ }
481
+
482
+ .tooltip.visible { opacity: 1; }
483
+
484
+ /* --- Config chip (inline in input bottom bar) --- */
485
+ #config-chip-wrap {
486
+ position: relative;
487
+ }
488
+
489
+ #config-chip-wrap.hidden { display: none; }
490
+
491
+ #config-chip {
492
+ display: inline-flex;
493
+ align-items: center;
494
+ gap: 4px;
495
+ height: 36px;
496
+ padding: 0 8px;
497
+ border-radius: 10px;
498
+ border: none;
499
+ background: none;
500
+ color: var(--text-muted);
501
+ font-family: inherit;
502
+ font-size: 12px;
503
+ font-weight: 500;
504
+ cursor: pointer;
505
+ transition: color 0.15s, background 0.15s;
506
+ white-space: nowrap;
507
+ }
508
+
509
+ #config-chip .lucide { width: 10px; height: 10px; }
510
+ #config-chip:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.06); }
511
+ #config-chip.active { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.06); }
512
+
513
+ #config-popover {
514
+ position: absolute;
515
+ bottom: calc(100% + 4px);
516
+ right: 0;
517
+ background: var(--bg-alt);
518
+ border: 1px solid var(--border);
519
+ border-radius: 12px;
520
+ padding: 4px 0;
521
+ min-width: 220px;
522
+ max-height: 420px;
523
+ overflow-y: auto;
524
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
525
+ z-index: 200;
526
+ }
527
+
528
+ #config-popover.hidden { display: none; }
529
+
530
+ .config-section {
531
+ padding: 6px 0 2px;
532
+ border-top: 1px solid var(--border-subtle);
533
+ }
534
+
535
+ .config-section:first-child {
536
+ border-top: none;
537
+ }
538
+
539
+ .config-section-label {
540
+ font-size: 10px;
541
+ font-weight: 600;
542
+ color: var(--text-muted);
543
+ text-transform: uppercase;
544
+ letter-spacing: 0.05em;
545
+ padding: 4px 14px 4px;
546
+ }
547
+
548
+ .config-radio-list {
549
+ display: flex;
550
+ flex-direction: column;
551
+ }
552
+
553
+ .config-radio-item {
554
+ display: flex;
555
+ align-items: center;
556
+ gap: 8px;
557
+ width: 100%;
558
+ padding: 8px 14px;
559
+ border: none;
560
+ background: none;
561
+ color: var(--text-secondary);
562
+ font-family: inherit;
563
+ font-size: 13px;
564
+ cursor: pointer;
565
+ transition: background 0.15s, color 0.15s;
566
+ white-space: nowrap;
567
+ text-align: left;
568
+ }
569
+
570
+ .config-radio-item:hover { background: rgba(var(--overlay-rgb),0.05); color: var(--text); }
571
+ .config-radio-item.active { color: var(--accent); font-weight: 600; }
572
+
573
+ /* Segmented control for effort */
574
+ .config-segmented {
575
+ display: flex;
576
+ gap: 2px;
577
+ padding: 4px 14px 8px;
578
+ }
579
+
580
+ .config-segment-btn {
581
+ flex: 1;
582
+ padding: 6px 4px;
583
+ border: 1px solid var(--border);
584
+ background: none;
585
+ color: var(--text-muted);
586
+ font-family: inherit;
587
+ font-size: 11px;
588
+ font-weight: 500;
589
+ cursor: pointer;
590
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
591
+ text-transform: capitalize;
592
+ }
593
+
594
+ .config-segment-btn:first-child { border-radius: 6px 0 0 6px; }
595
+ .config-segment-btn:last-child { border-radius: 0 6px 6px 0; }
596
+ .config-segment-btn:only-child { border-radius: 6px; }
597
+
598
+ .config-segment-btn:hover {
599
+ color: var(--text-secondary);
600
+ background: rgba(var(--overlay-rgb),0.04);
601
+ }
602
+
603
+ .config-segment-btn.active {
604
+ color: var(--accent);
605
+ border-color: var(--accent);
606
+ background: rgba(var(--accent-rgb, 99, 102, 241), 0.08);
607
+ font-weight: 600;
608
+ }
609
+
610
+ /* Toggle row for beta options */
611
+ .config-toggle-row {
612
+ display: flex;
613
+ align-items: center;
614
+ justify-content: space-between;
615
+ padding: 6px 14px 8px;
616
+ }
617
+
618
+ .config-toggle-label {
619
+ font-size: 13px;
620
+ color: var(--text-secondary);
621
+ }
622
+
623
+ .config-toggle-btn {
624
+ position: relative;
625
+ width: 36px;
626
+ height: 20px;
627
+ border-radius: 10px;
628
+ border: 1px solid var(--border);
629
+ background: var(--bg-alt);
630
+ cursor: pointer;
631
+ transition: background 0.2s, border-color 0.2s;
632
+ padding: 0;
633
+ flex-shrink: 0;
634
+ }
635
+
636
+ .config-toggle-btn .config-toggle-knob {
637
+ position: absolute;
638
+ top: 2px;
639
+ left: 2px;
640
+ width: 14px;
641
+ height: 14px;
642
+ border-radius: 50%;
643
+ background: var(--text-muted);
644
+ transition: transform 0.2s, background 0.2s;
645
+ }
646
+
647
+ .config-toggle-btn.active {
648
+ background: rgba(var(--accent-rgb, 99, 102, 241), 0.15);
649
+ border-color: var(--accent);
650
+ }
651
+
652
+ .config-toggle-btn.active .config-toggle-knob {
653
+ transform: translateX(16px);
654
+ background: var(--accent);
655
+ }
656
+
657
+ /* --- Info panels container --- */
658
+ #info-panels {
659
+ position: fixed;
660
+ top: 80px;
661
+ right: 16px;
662
+ width: 280px;
663
+ max-height: calc(100vh - 160px);
664
+ overflow-y: auto;
665
+ z-index: 50;
666
+ display: flex;
667
+ flex-direction: column;
668
+ gap: 8px;
669
+ pointer-events: none;
670
+ }
671
+
672
+ #info-panels:empty { display: none; }
673
+
674
+ /* --- Usage panel --- */
675
+ #usage-panel, #status-panel, #context-panel {
676
+ background: var(--bg-alt);
677
+ border: 1px solid var(--border);
678
+ border-radius: 12px;
679
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.3);
680
+ font-size: 12px;
681
+ pointer-events: auto;
682
+ }
683
+
684
+ #usage-panel.hidden, #status-panel.hidden, #context-panel.hidden { display: none; }
685
+
686
+ .usage-panel-header {
687
+ display: flex;
688
+ align-items: center;
689
+ justify-content: space-between;
690
+ padding: 10px 14px;
691
+ border-bottom: 1px solid var(--border-subtle);
692
+ font-weight: 600;
693
+ font-size: 13px;
694
+ color: var(--text);
695
+ }
696
+
697
+ .usage-panel-actions {
698
+ display: flex;
699
+ gap: 2px;
700
+ }
701
+
702
+ .usage-panel-header button {
703
+ display: flex;
704
+ align-items: center;
705
+ justify-content: center;
706
+ background: none;
707
+ border: none;
708
+ color: var(--text-muted);
709
+ cursor: pointer;
710
+ padding: 2px;
711
+ border-radius: 4px;
712
+ }
713
+
714
+ .usage-panel-header button:hover { color: var(--text); background: rgba(var(--overlay-rgb),0.06); }
715
+ .usage-panel-header button .lucide { width: 14px; height: 14px; }
716
+
717
+ .usage-panel-body {
718
+ padding: 8px 14px 12px;
719
+ }
720
+
721
+ /* --- Plan usage link --- */
722
+ .usage-external-link {
723
+ display: flex;
724
+ align-items: center;
725
+ justify-content: center;
726
+ gap: 6px;
727
+ padding: 8px 12px;
728
+ border-radius: 6px;
729
+ border: 1px solid var(--border-subtle);
730
+ background: var(--input-bg);
731
+ color: var(--text-secondary);
732
+ font-size: 12px;
733
+ text-decoration: none;
734
+ transition: background 0.15s, color 0.15s;
735
+ }
736
+ .usage-external-link:hover {
737
+ background: var(--hover-bg);
738
+ color: var(--text-primary);
739
+ }
740
+ .usage-external-link svg {
741
+ width: 13px;
742
+ height: 13px;
743
+ flex-shrink: 0;
744
+ }
745
+
746
+ .usage-divider {
747
+ height: 1px;
748
+ background: var(--border-subtle);
749
+ margin: 8px 0;
750
+ }
751
+
752
+ .usage-section-label {
753
+ font-size: 10px;
754
+ font-weight: 600;
755
+ color: var(--text-muted);
756
+ text-transform: uppercase;
757
+ letter-spacing: 0.05em;
758
+ margin-bottom: 4px;
759
+ }
760
+
761
+ .usage-row {
762
+ display: flex;
763
+ justify-content: space-between;
764
+ padding: 3px 0;
765
+ color: var(--text-secondary);
766
+ }
767
+
768
+ .usage-label {
769
+ color: var(--text-muted);
770
+ }
771
+
772
+ .usage-value {
773
+ font-family: "Roboto Mono", monospace;
774
+ font-weight: 500;
775
+ }
776
+
777
+ /* --- Context bar --- */
778
+ .context-bar-wrap {
779
+ display: flex;
780
+ align-items: center;
781
+ gap: 8px;
782
+ margin: 6px 0 8px;
783
+ }
784
+ .context-bar {
785
+ flex: 1;
786
+ height: 6px;
787
+ background: var(--border);
788
+ border-radius: 3px;
789
+ overflow: hidden;
790
+ }
791
+ .context-bar-fill {
792
+ height: 100%;
793
+ width: 0%;
794
+ background: var(--success);
795
+ border-radius: 3px;
796
+ transition: width 0.3s ease, background 0.3s ease;
797
+ }
798
+ .context-bar-fill.warn { background: var(--warning); }
799
+ .context-bar-fill.danger { background: var(--error); }
800
+ .context-bar-pct {
801
+ font-family: "Roboto Mono", monospace;
802
+ font-size: 11px;
803
+ font-weight: 600;
804
+ color: var(--text-secondary);
805
+ min-width: 32px;
806
+ text-align: right;
807
+ }
808
+
809
+ /* --- Context mini bar (in input area) --- */
810
+ #context-mini {
811
+ display: flex;
812
+ align-items: center;
813
+ gap: 8px;
814
+ padding: 6px 14px 2px;
815
+ cursor: pointer;
816
+ transition: opacity 0.15s;
817
+ }
818
+ #context-mini:hover { opacity: 0.8; }
819
+ #context-mini.hidden { display: none; }
820
+ .context-mini-bar {
821
+ flex: 1;
822
+ height: 4px;
823
+ background: var(--border);
824
+ border-radius: 2px;
825
+ overflow: hidden;
826
+ }
827
+ .context-mini-fill {
828
+ height: 100%;
829
+ width: 0%;
830
+ border-radius: 2px;
831
+ background: var(--success);
832
+ transition: width 0.3s ease, background 0.3s ease;
833
+ }
834
+ .context-mini-fill.warn { background: var(--warning); }
835
+ .context-mini-fill.danger { background: var(--error); }
836
+ .context-mini-label {
837
+ font-family: "Roboto Mono", monospace;
838
+ font-size: 10px;
839
+ font-weight: 600;
840
+ color: var(--text-dimmer);
841
+ min-width: 24px;
842
+ text-align: right;
843
+ }
844
+
845
+ @media (max-width: 768px) {
846
+ #info-panels {
847
+ top: auto;
848
+ bottom: calc(var(--safe-bottom, 0px) + 56px + 64px);
849
+ right: 12px;
850
+ left: 12px;
851
+ width: auto;
852
+ max-height: 60vh;
853
+ }
854
+ }
855
+
856
+