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,1114 @@
1
+ /* ==========================================================================
2
+ File Browser
3
+ ========================================================================== */
4
+
5
+ /* --- Session actions --- */
6
+ #session-actions {
7
+ display: flex;
8
+ flex-direction: column;
9
+ padding: 0 8px 4px;
10
+ }
11
+
12
+ #session-actions button {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 8px;
16
+ padding: 8px 12px;
17
+ border-radius: 10px;
18
+ border: none;
19
+ background: transparent;
20
+ color: var(--text-muted);
21
+ font-family: inherit;
22
+ font-size: 14px;
23
+ font-weight: 400;
24
+ cursor: pointer;
25
+ margin-bottom: 0;
26
+ transition: background 0.15s, color 0.15s;
27
+ }
28
+
29
+ #session-actions button .lucide { width: 16px; height: 16px; flex-shrink: 0; }
30
+ #session-actions button:hover { background: var(--sidebar-hover); color: var(--text-secondary); }
31
+
32
+ .sidebar-badge {
33
+ background: var(--accent);
34
+ color: #fff;
35
+ font-size: 10px;
36
+ font-weight: 700;
37
+ min-width: 16px;
38
+ height: 16px;
39
+ border-radius: 8px;
40
+ display: inline-flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ padding: 0 4px;
44
+ margin-left: auto;
45
+ line-height: 1;
46
+ }
47
+ .sidebar-badge.hidden { display: none; }
48
+
49
+ /* --- Panels --- */
50
+ .sidebar-panel { flex: 1; overflow-y: auto; min-height: 0; }
51
+ .sidebar-panel.hidden { display: none; }
52
+
53
+ /* --- File browser header --- */
54
+ #sessions-header-content.hidden,
55
+ #files-header-content.hidden {
56
+ display: none;
57
+ }
58
+
59
+ #file-panel-refresh.spinning { animation: spin-once 0.5s ease; }
60
+ @keyframes spin-once { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
61
+
62
+ /* --- File tree --- */
63
+ #file-tree { padding: 4px 8px; }
64
+
65
+ .file-tree-item {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: 6px;
69
+ padding: 5px 8px;
70
+ border-radius: 8px;
71
+ cursor: pointer;
72
+ font-size: 13px;
73
+ color: var(--text-secondary);
74
+ transition: background 0.15s, color 0.15s;
75
+ user-select: none;
76
+ }
77
+
78
+ .file-tree-item:hover { background: var(--sidebar-hover); color: var(--text); }
79
+ .file-tree-item.active { background: var(--sidebar-active); color: var(--text); }
80
+ .file-tree-item .lucide { width: 14px; height: 14px; flex-shrink: 0; }
81
+
82
+ .file-tree-name {
83
+ flex: 1;
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap;
87
+ min-width: 0;
88
+ }
89
+
90
+ .file-tree-icon {
91
+ display: inline-flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ width: 16px;
95
+ height: 16px;
96
+ flex-shrink: 0;
97
+ line-height: 0;
98
+ }
99
+
100
+ .file-tree-icon svg {
101
+ width: 16px;
102
+ height: 16px;
103
+ }
104
+
105
+ .file-tree-chevron {
106
+ display: inline-flex;
107
+ color: var(--text-dimmer);
108
+ transition: transform 0.15s;
109
+ flex-shrink: 0;
110
+ }
111
+
112
+ .file-tree-chevron .lucide { width: 12px; height: 12px; }
113
+ .file-tree-item.expanded > .file-tree-chevron { transform: rotate(90deg); }
114
+
115
+ .file-tree-spacer { width: 12px; flex-shrink: 0; }
116
+
117
+ .file-tree-children.hidden { display: none; }
118
+
119
+ .file-tree-loading,
120
+ .file-tree-empty {
121
+ padding: 12px 16px;
122
+ font-size: 12px;
123
+ color: var(--text-dimmer);
124
+ font-style: italic;
125
+ }
126
+
127
+ .file-tree-error {
128
+ padding: 12px 16px;
129
+ font-size: 12px;
130
+ color: var(--error);
131
+ }
132
+
133
+ /* --- Panel fullscreen --- */
134
+ @media (min-width: 1024px) {
135
+ #main-column:has(.panel-fullscreen) > .title-bar-content { display: none; }
136
+ #main-panels:has(.panel-fullscreen) > #app { display: none; }
137
+ }
138
+ @media (max-width: 1023px) {
139
+ #file-viewer-fullscreen,
140
+ #terminal-fullscreen { display: none; }
141
+ }
142
+
143
+ /* --- File viewer --- */
144
+
145
+ /* Wide screens: split panel beside #app */
146
+ @media (min-width: 1024px) {
147
+ #file-viewer {
148
+ width: 50%;
149
+ max-width: 720px;
150
+ min-width: 360px;
151
+ border-left: 1px solid var(--border);
152
+ background: var(--bg);
153
+ display: flex;
154
+ flex-direction: column;
155
+ overflow: hidden;
156
+ flex-shrink: 0;
157
+ transition: max-width 0.2s ease, width 0.2s ease;
158
+ }
159
+ #file-viewer.hidden { display: none; }
160
+ #file-viewer.file-viewer-wide {
161
+ width: 70%;
162
+ max-width: 1200px;
163
+ }
164
+ #file-viewer.panel-fullscreen {
165
+ width: 100%;
166
+ max-width: none;
167
+ min-width: 0;
168
+ }
169
+ }
170
+
171
+ /* Narrow screens: full overlay */
172
+ @media (max-width: 1023px) {
173
+ #file-viewer {
174
+ position: fixed;
175
+ inset: 0;
176
+ background: var(--bg);
177
+ z-index: 300;
178
+ display: flex;
179
+ flex-direction: column;
180
+ overflow: hidden;
181
+ }
182
+ #file-viewer.hidden { display: none; }
183
+ }
184
+
185
+ .file-viewer-header {
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 8px;
189
+ padding: 10px 16px;
190
+ border-bottom: 1px solid var(--border-subtle);
191
+ flex-shrink: 0;
192
+ min-height: 44px;
193
+ }
194
+
195
+ .file-viewer-path {
196
+ flex: 1;
197
+ font-family: "Roboto Mono", monospace;
198
+ font-size: 13px;
199
+ color: var(--text-secondary);
200
+ overflow: hidden;
201
+ text-overflow: ellipsis;
202
+ white-space: nowrap;
203
+ direction: rtl;
204
+ text-align: left;
205
+ }
206
+
207
+ .file-viewer-btn {
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ width: 28px;
212
+ height: 28px;
213
+ border-radius: 6px;
214
+ border: none;
215
+ background: transparent;
216
+ color: var(--text-muted);
217
+ cursor: pointer;
218
+ flex-shrink: 0;
219
+ transition: background 0.15s, color 0.15s;
220
+ }
221
+
222
+ .file-viewer-btn:hover { background: var(--sidebar-hover); color: var(--text); }
223
+ .file-viewer-btn.active { background: var(--accent-bg); color: var(--accent); }
224
+ .file-viewer-btn.hidden { display: none; }
225
+ .file-viewer-btn .lucide { width: 16px; height: 16px; }
226
+
227
+ /* --- Markdown rendered view --- */
228
+ .file-viewer-markdown {
229
+ padding: 20px 24px;
230
+ font-size: 14px;
231
+ line-height: 1.7;
232
+ color: var(--text);
233
+ }
234
+
235
+ .file-viewer-markdown h1,
236
+ .file-viewer-markdown h2,
237
+ .file-viewer-markdown h3,
238
+ .file-viewer-markdown h4 { color: var(--text); margin: 1.2em 0 0.5em; }
239
+ .file-viewer-markdown h1 { font-size: 1.6em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3em; }
240
+ .file-viewer-markdown h2 { font-size: 1.3em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3em; }
241
+ .file-viewer-markdown h3 { font-size: 1.1em; }
242
+
243
+ .file-viewer-markdown p { margin: 0.6em 0; }
244
+ .file-viewer-markdown a { color: var(--accent); text-decoration: none; }
245
+ .file-viewer-markdown a:hover { text-decoration: underline; }
246
+
247
+ .file-viewer-markdown ul,
248
+ .file-viewer-markdown ol { padding-left: 1.5em; margin: 0.5em 0; }
249
+ .file-viewer-markdown li { margin: 0.25em 0; }
250
+
251
+ .file-viewer-markdown code {
252
+ background: var(--code-bg);
253
+ padding: 2px 5px;
254
+ border-radius: 4px;
255
+ font-size: 0.9em;
256
+ }
257
+
258
+ .file-viewer-markdown pre {
259
+ background: var(--code-bg);
260
+ border-radius: 8px;
261
+ padding: 12px 16px;
262
+ overflow-x: auto;
263
+ margin: 0.8em 0;
264
+ }
265
+
266
+ .file-viewer-markdown pre code {
267
+ background: none;
268
+ padding: 0;
269
+ font-size: 13px;
270
+ line-height: 1.5;
271
+ }
272
+
273
+ .file-viewer-markdown blockquote {
274
+ border-left: 3px solid var(--accent);
275
+ padding-left: 12px;
276
+ margin: 0.8em 0;
277
+ color: var(--text-secondary);
278
+ }
279
+
280
+ .file-viewer-markdown table {
281
+ border-collapse: collapse;
282
+ margin: 0.8em 0;
283
+ width: 100%;
284
+ }
285
+
286
+ .file-viewer-markdown th,
287
+ .file-viewer-markdown td {
288
+ border: 1px solid var(--border);
289
+ padding: 6px 12px;
290
+ text-align: left;
291
+ font-size: 13px;
292
+ }
293
+
294
+ .file-viewer-markdown th { background: var(--bg-alt); font-weight: 600; }
295
+
296
+ .file-viewer-markdown hr {
297
+ border: none;
298
+ border-top: 1px solid var(--border-subtle);
299
+ margin: 1.5em 0;
300
+ }
301
+
302
+ .file-viewer-markdown img { max-width: 100%; border-radius: 8px; }
303
+
304
+ .file-viewer-body {
305
+ flex: 1;
306
+ overflow: auto;
307
+ padding: 0;
308
+ }
309
+
310
+ .file-viewer-body pre {
311
+ margin: 0;
312
+ padding: 16px 20px;
313
+ font-family: "Roboto Mono", monospace;
314
+ font-size: 13px;
315
+ line-height: 1.55;
316
+ color: var(--text);
317
+ white-space: pre-wrap;
318
+ word-break: break-word;
319
+ }
320
+
321
+ .file-viewer-body pre code {
322
+ background: none;
323
+ padding: 0;
324
+ border-radius: 0;
325
+ font-size: inherit;
326
+ line-height: inherit;
327
+ }
328
+
329
+ /* Code with line numbers */
330
+ .file-viewer-code {
331
+ display: flex;
332
+ min-height: 0;
333
+ }
334
+
335
+ .file-viewer-code pre {
336
+ margin: 0;
337
+ font-family: "Roboto Mono", monospace;
338
+ font-size: 13px;
339
+ line-height: 1.55;
340
+ white-space: pre;
341
+ word-break: normal;
342
+ }
343
+
344
+ .file-viewer-gutter {
345
+ flex-shrink: 0;
346
+ padding: 12px 10px 12px 14px;
347
+ text-align: right;
348
+ color: var(--text-dimmer);
349
+ opacity: 0.5;
350
+ user-select: none;
351
+ -webkit-user-select: none;
352
+ border-right: 1px solid var(--border-subtle);
353
+ min-width: 44px;
354
+ position: sticky;
355
+ left: 0;
356
+ background: var(--bg);
357
+ z-index: 1;
358
+ }
359
+
360
+ .file-viewer-code-content {
361
+ flex: 1;
362
+ padding: 12px 14px;
363
+ min-width: 0;
364
+ }
365
+
366
+ .file-viewer-code-content code {
367
+ font-family: inherit;
368
+ font-size: inherit;
369
+ line-height: inherit;
370
+ background: none;
371
+ padding: 0;
372
+ border-radius: 0;
373
+ }
374
+
375
+ .file-viewer-code-content .hljs {
376
+ background: transparent;
377
+ padding: 0;
378
+ }
379
+
380
+ .file-viewer-binary {
381
+ display: flex;
382
+ align-items: center;
383
+ justify-content: center;
384
+ height: 100%;
385
+ color: var(--text-dimmer);
386
+ font-size: 14px;
387
+ }
388
+
389
+ .file-viewer-image {
390
+ display: flex;
391
+ align-items: center;
392
+ justify-content: center;
393
+ padding: 20px;
394
+ }
395
+
396
+ .file-viewer-image img {
397
+ max-width: 100%;
398
+ max-height: 80vh;
399
+ border-radius: 8px;
400
+ border: 1px solid var(--border-subtle);
401
+ }
402
+
403
+ /* --- Web Terminal --- */
404
+
405
+ /* Terminal header with tabs */
406
+ .terminal-header {
407
+ display: flex;
408
+ align-items: center;
409
+ border-bottom: 1px solid var(--border-subtle);
410
+ flex-shrink: 0;
411
+ min-height: 40px;
412
+ background: var(--bg);
413
+ }
414
+
415
+ .terminal-tabs {
416
+ display: flex;
417
+ overflow-x: auto;
418
+ -webkit-overflow-scrolling: touch;
419
+ gap: 0;
420
+ min-width: 0;
421
+ padding-left: 4px;
422
+ }
423
+
424
+ .terminal-tabs::-webkit-scrollbar { display: none; }
425
+
426
+ .terminal-new-tab-btn {
427
+ display: flex;
428
+ align-items: center;
429
+ justify-content: center;
430
+ width: 28px;
431
+ height: 28px;
432
+ flex-shrink: 0;
433
+ border: none;
434
+ background: transparent;
435
+ color: var(--text-muted);
436
+ cursor: pointer;
437
+ border-radius: 6px;
438
+ padding: 0;
439
+ margin: 4px 2px;
440
+ transition: background 0.15s, color 0.15s;
441
+ }
442
+ .terminal-new-tab-btn:hover { background: rgba(var(--overlay-rgb),0.08); color: var(--text); }
443
+ .terminal-new-tab-btn .lucide { width: 14px; height: 14px; }
444
+
445
+ .terminal-tab {
446
+ display: flex;
447
+ align-items: center;
448
+ gap: 4px;
449
+ padding: 8px 10px;
450
+ font-size: 12px;
451
+ font-family: "Pretendard", sans-serif;
452
+ color: var(--text-muted);
453
+ cursor: pointer;
454
+ white-space: nowrap;
455
+ border-bottom: 2px solid transparent;
456
+ transition: color 0.15s, border-color 0.15s;
457
+ flex-shrink: 0;
458
+ user-select: none;
459
+ }
460
+
461
+ .terminal-tab:hover { color: var(--text-secondary); }
462
+ .terminal-tab.active { color: var(--text); border-color: var(--accent); }
463
+ .terminal-tab.exited { opacity: 0.5; }
464
+
465
+ .terminal-tab-close {
466
+ display: none;
467
+ align-items: center;
468
+ justify-content: center;
469
+ width: 16px;
470
+ height: 16px;
471
+ border-radius: 3px;
472
+ border: none;
473
+ background: transparent;
474
+ color: var(--text-dimmer);
475
+ cursor: pointer;
476
+ padding: 0;
477
+ line-height: 1;
478
+ }
479
+
480
+ .terminal-tab:hover .terminal-tab-close,
481
+ .terminal-tab.active .terminal-tab-close { display: flex; }
482
+ .terminal-tab-close:hover { background: rgba(var(--overlay-rgb),0.1); color: var(--text); }
483
+
484
+ .terminal-tab-label { cursor: default; }
485
+
486
+ .terminal-tab-rename {
487
+ background: var(--bg);
488
+ border: 1px solid var(--accent);
489
+ border-radius: 3px;
490
+ color: var(--text);
491
+ font-size: 12px;
492
+ font-family: "Roboto Mono", monospace;
493
+ padding: 1px 4px;
494
+ outline: none;
495
+ width: 100px;
496
+ }
497
+
498
+ .terminal-header-actions {
499
+ display: flex;
500
+ align-items: center;
501
+ gap: 2px;
502
+ padding: 0 8px;
503
+ flex-shrink: 0;
504
+ margin-left: auto;
505
+ }
506
+
507
+ /* Wide screens: split panel beside #app */
508
+ @media (min-width: 1024px) {
509
+ #terminal-container {
510
+ width: 50%;
511
+ max-width: 720px;
512
+ min-width: 360px;
513
+ border-left: 1px solid var(--border);
514
+ background: var(--bg);
515
+ display: flex;
516
+ flex-direction: column;
517
+ overflow: hidden;
518
+ flex-shrink: 0;
519
+ }
520
+ #terminal-container.hidden { display: none; }
521
+ #terminal-container.panel-fullscreen {
522
+ width: 100%;
523
+ max-width: none;
524
+ min-width: 0;
525
+ }
526
+ }
527
+
528
+ /* Narrow screens: full overlay */
529
+ @media (max-width: 1023px) {
530
+ #terminal-container {
531
+ position: fixed;
532
+ inset: 0;
533
+ background: var(--bg);
534
+ z-index: 300;
535
+ display: flex;
536
+ flex-direction: column;
537
+ overflow: hidden;
538
+ }
539
+ #terminal-container.hidden { display: none; }
540
+ }
541
+
542
+ #terminal-body {
543
+ flex: 1;
544
+ min-height: 0;
545
+ overflow: hidden;
546
+ position: relative;
547
+ }
548
+
549
+ .terminal-tab-body {
550
+ position: absolute;
551
+ inset: 0;
552
+ padding: 4px 0 0 4px;
553
+ }
554
+
555
+ .terminal-tab-body .xterm {
556
+ height: 100%;
557
+ }
558
+
559
+ /* --- Terminal key toolbar (mobile) --- */
560
+ #terminal-toolbar {
561
+ display: flex;
562
+ align-items: center;
563
+ gap: 6px;
564
+ padding: 6px 8px;
565
+ background: #252525;
566
+ border-bottom: 1px solid #333;
567
+ flex-shrink: 0;
568
+ overflow-x: auto;
569
+ -webkit-overflow-scrolling: touch;
570
+ }
571
+
572
+ #terminal-toolbar.hidden { display: none; }
573
+
574
+ .term-key {
575
+ display: flex;
576
+ align-items: center;
577
+ justify-content: center;
578
+ height: 32px;
579
+ min-width: 40px;
580
+ padding: 0 10px;
581
+ border-radius: 6px;
582
+ border: 1px solid #444;
583
+ background: #333;
584
+ color: #d4d4d4;
585
+ font-family: "Roboto Mono", monospace;
586
+ font-size: 12px;
587
+ font-weight: 500;
588
+ cursor: pointer;
589
+ flex-shrink: 0;
590
+ -webkit-tap-highlight-color: transparent;
591
+ user-select: none;
592
+ transition: background 0.1s, border-color 0.1s;
593
+ }
594
+
595
+ .term-key:active {
596
+ background: #555;
597
+ border-color: #666;
598
+ }
599
+
600
+ .term-key-toggle.active {
601
+ background: var(--accent);
602
+ border-color: var(--accent);
603
+ color: #fff;
604
+ }
605
+
606
+ .term-key-arrow {
607
+ min-width: 34px;
608
+ padding: 0 6px;
609
+ font-size: 10px;
610
+ }
611
+
612
+ .term-key-spacer {
613
+ flex: 1;
614
+ min-width: 4px;
615
+ }
616
+
617
+ .terminal-hint {
618
+ padding: 16px;
619
+ font-size: 13px;
620
+ color: var(--text-dimmer);
621
+ font-style: italic;
622
+ }
623
+
624
+ /* --- Terminal context menu --- */
625
+ .term-ctx-menu {
626
+ position: fixed;
627
+ background: var(--bg-alt);
628
+ border: 1px solid var(--border);
629
+ border-radius: 10px;
630
+ padding: 4px 0;
631
+ min-width: 160px;
632
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
633
+ z-index: 500;
634
+ }
635
+
636
+ .term-ctx-item {
637
+ display: flex;
638
+ align-items: center;
639
+ gap: 8px;
640
+ width: 100%;
641
+ padding: 8px 12px;
642
+ font-size: 13px;
643
+ color: var(--text-secondary);
644
+ background: none;
645
+ border: none;
646
+ font-family: inherit;
647
+ cursor: pointer;
648
+ transition: background 0.15s;
649
+ }
650
+
651
+ .term-ctx-item .lucide { width: 14px; height: 14px; flex-shrink: 0; }
652
+ .term-ctx-item:hover { background: rgba(var(--overlay-rgb), 0.05); }
653
+
654
+ /* --- File Edit History --- */
655
+
656
+ .file-history-panel {
657
+ padding: 16px 20px;
658
+ height: 100%;
659
+ overflow-y: auto;
660
+ }
661
+
662
+ .file-history-header {
663
+ display: flex;
664
+ align-items: center;
665
+ justify-content: space-between;
666
+ font-size: 13px;
667
+ font-weight: 600;
668
+ color: var(--text-secondary);
669
+ margin-bottom: 12px;
670
+ padding-bottom: 8px;
671
+ border-bottom: 1px solid var(--border-subtle);
672
+ }
673
+
674
+ .file-history-list {
675
+ display: flex;
676
+ flex-direction: column;
677
+ gap: 10px;
678
+ }
679
+
680
+ .file-history-entry {
681
+ background: var(--bg-alt);
682
+ border: 1px solid var(--border);
683
+ border-radius: 10px;
684
+ padding: 10px 12px;
685
+ cursor: pointer;
686
+ transition: border-color 0.15s, background 0.15s;
687
+ position: relative;
688
+ }
689
+
690
+ .file-history-entry:hover { border-color: var(--accent); }
691
+ .file-history-entry.no-navigate { cursor: default; opacity: 0.7; }
692
+ .file-history-entry.no-navigate:hover { border-color: var(--border); }
693
+
694
+ .file-history-entry.selected {
695
+ border-color: var(--accent);
696
+ background: var(--accent-bg);
697
+ }
698
+
699
+ .file-history-entry.selected::before {
700
+ content: attr(data-select-num);
701
+ position: absolute;
702
+ top: -6px;
703
+ left: -6px;
704
+ width: 18px;
705
+ height: 18px;
706
+ border-radius: 50%;
707
+ background: var(--accent);
708
+ color: #fff;
709
+ font-size: 11px;
710
+ font-weight: 600;
711
+ display: flex;
712
+ align-items: center;
713
+ justify-content: center;
714
+ }
715
+
716
+ .file-history-entry.git-entry {
717
+ border-left: 3px solid var(--text-dimmer);
718
+ }
719
+
720
+ .file-history-entry.git-entry.selected {
721
+ border-left-color: var(--accent);
722
+ }
723
+
724
+ .file-history-entry-header {
725
+ display: flex;
726
+ justify-content: space-between;
727
+ align-items: center;
728
+ gap: 8px;
729
+ }
730
+
731
+ .file-history-title {
732
+ font-size: 13px;
733
+ font-weight: 500;
734
+ color: var(--text);
735
+ overflow: hidden;
736
+ text-overflow: ellipsis;
737
+ white-space: nowrap;
738
+ min-width: 0;
739
+ flex: 1;
740
+ }
741
+
742
+ .file-history-badge {
743
+ font-size: 11px;
744
+ font-weight: 500;
745
+ padding: 2px 8px;
746
+ border-radius: 10px;
747
+ background: var(--accent2-bg);
748
+ color: var(--accent2);
749
+ flex-shrink: 0;
750
+ }
751
+
752
+ .file-history-badge.badge-commit {
753
+ background: rgba(var(--overlay-rgb),0.06);
754
+ color: var(--text-muted);
755
+ }
756
+
757
+ .file-history-code-subtitle {
758
+ font-family: "Roboto Mono", monospace;
759
+ font-size: 11px;
760
+ color: var(--text-muted);
761
+ margin-top: 4px;
762
+ padding: 2px 6px;
763
+ background: rgba(var(--overlay-rgb), 0.04);
764
+ border-radius: 3px;
765
+ overflow: hidden;
766
+ text-overflow: ellipsis;
767
+ white-space: nowrap;
768
+ }
769
+
770
+ .file-history-meta {
771
+ font-size: 11px;
772
+ color: var(--text-dimmer);
773
+ margin-top: 4px;
774
+ overflow: hidden;
775
+ text-overflow: ellipsis;
776
+ white-space: nowrap;
777
+ }
778
+
779
+ /* Inline diff preview */
780
+ .file-history-diff {
781
+ max-height: 200px;
782
+ overflow: auto;
783
+ border-radius: 6px;
784
+ background: var(--code-bg);
785
+ margin-top: 8px;
786
+ }
787
+
788
+ .file-history-write-badge {
789
+ padding: 8px 10px;
790
+ font-size: 12px;
791
+ color: var(--text-muted);
792
+ font-style: italic;
793
+ text-align: center;
794
+ }
795
+
796
+ /* Action buttons row */
797
+ .file-history-actions {
798
+ display: flex;
799
+ gap: 6px;
800
+ margin-top: 8px;
801
+ }
802
+
803
+ .file-history-action-btn {
804
+ padding: 3px 8px;
805
+ border-radius: 4px;
806
+ border: 1px solid var(--border);
807
+ background: transparent;
808
+ color: var(--text-muted);
809
+ font-size: 11px;
810
+ font-family: inherit;
811
+ cursor: pointer;
812
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
813
+ }
814
+
815
+ .file-history-action-btn:hover {
816
+ background: var(--sidebar-hover);
817
+ color: var(--text);
818
+ border-color: var(--text-dimmer);
819
+ }
820
+
821
+ .file-history-nav-btn {
822
+ color: var(--accent);
823
+ border-color: transparent;
824
+ }
825
+
826
+ .file-history-nav-btn:hover {
827
+ background: var(--accent-bg);
828
+ color: var(--accent);
829
+ border-color: var(--accent);
830
+ }
831
+
832
+ /* Compare bar */
833
+ .file-history-compare-bar-slots {
834
+ padding: 10px 12px;
835
+ margin-bottom: 8px;
836
+ border-radius: 8px;
837
+ background: rgba(var(--overlay-rgb), 0.04);
838
+ border: 1px solid var(--border);
839
+ }
840
+
841
+ .compare-bar-label {
842
+ display: flex;
843
+ align-items: center;
844
+ gap: 5px;
845
+ font-size: 11px;
846
+ font-weight: 600;
847
+ color: var(--text-secondary);
848
+ margin-bottom: 8px;
849
+ text-transform: uppercase;
850
+ letter-spacing: 0.5px;
851
+ }
852
+
853
+ .compare-bar-label svg {
854
+ width: 13px;
855
+ height: 13px;
856
+ opacity: 0.7;
857
+ }
858
+
859
+ .compare-slots-row {
860
+ display: flex;
861
+ align-items: center;
862
+ gap: 8px;
863
+ }
864
+
865
+ .file-history-compare-slot {
866
+ display: flex;
867
+ align-items: center;
868
+ gap: 6px;
869
+ flex: 1;
870
+ min-width: 0;
871
+ padding: 7px 10px;
872
+ border: 1.5px dashed rgba(var(--overlay-rgb), 0.15);
873
+ border-radius: 6px;
874
+ font-size: 11px;
875
+ color: var(--text-muted);
876
+ background: rgba(var(--overlay-rgb), 0.02);
877
+ transition: border-color 0.15s, background 0.15s;
878
+ }
879
+
880
+ .file-history-compare-slot.filled {
881
+ border-style: solid;
882
+ border-color: var(--accent);
883
+ background: var(--accent-bg);
884
+ color: var(--text-secondary);
885
+ }
886
+
887
+ .compare-slot-num {
888
+ display: flex;
889
+ align-items: center;
890
+ justify-content: center;
891
+ width: 18px;
892
+ height: 18px;
893
+ border-radius: 4px;
894
+ font-size: 10px;
895
+ font-weight: 700;
896
+ flex-shrink: 0;
897
+ background: rgba(var(--overlay-rgb), 0.1);
898
+ color: var(--text-muted);
899
+ }
900
+
901
+ .file-history-compare-slot.filled .compare-slot-num {
902
+ background: var(--accent);
903
+ color: #fff;
904
+ }
905
+
906
+ .compare-slot-text {
907
+ flex: 1;
908
+ min-width: 0;
909
+ overflow: hidden;
910
+ text-overflow: ellipsis;
911
+ white-space: nowrap;
912
+ font-family: "Roboto Mono", monospace;
913
+ font-size: 11px;
914
+ }
915
+
916
+ .compare-slot-placeholder {
917
+ font-style: italic;
918
+ opacity: 0.6;
919
+ }
920
+
921
+ .compare-slot-clear {
922
+ flex-shrink: 0;
923
+ border: none;
924
+ background: none;
925
+ color: var(--text-dimmer);
926
+ font-size: 14px;
927
+ cursor: pointer;
928
+ padding: 0 2px;
929
+ line-height: 1;
930
+ }
931
+ .compare-slot-clear:hover { color: var(--text); }
932
+
933
+ .compare-slot-arrow {
934
+ flex-shrink: 0;
935
+ color: var(--text-dimmer);
936
+ opacity: 0.5;
937
+ }
938
+
939
+ .compare-slot-arrow svg {
940
+ width: 14px;
941
+ height: 14px;
942
+ }
943
+
944
+ /* Compare button */
945
+ .file-history-compare-btn {
946
+ display: flex;
947
+ align-items: center;
948
+ gap: 5px;
949
+ padding: 7px 14px;
950
+ border-radius: 6px;
951
+ border: none;
952
+ background: var(--accent);
953
+ color: #fff;
954
+ font-size: 12px;
955
+ font-weight: 500;
956
+ cursor: pointer;
957
+ font-family: inherit;
958
+ flex-shrink: 0;
959
+ transition: opacity 0.15s;
960
+ }
961
+
962
+ .file-history-compare-btn svg {
963
+ width: 13px;
964
+ height: 13px;
965
+ }
966
+
967
+ .file-history-compare-btn:hover { opacity: 0.85; }
968
+
969
+ /* Compare view */
970
+ .file-history-compare-bar {
971
+ margin-bottom: 12px;
972
+ }
973
+
974
+ .file-history-compare-back {
975
+ padding: 6px 12px;
976
+ border-radius: 6px;
977
+ border: 1px solid var(--border);
978
+ background: transparent;
979
+ color: var(--text-secondary);
980
+ font-size: 12px;
981
+ cursor: pointer;
982
+ font-family: inherit;
983
+ transition: background 0.15s, color 0.15s;
984
+ }
985
+
986
+ .file-history-compare-back:hover { background: var(--sidebar-hover); color: var(--text); }
987
+
988
+ /* View file bar (back + toggle) */
989
+ .file-history-view-bar {
990
+ display: flex;
991
+ align-items: center;
992
+ justify-content: space-between;
993
+ padding: 10px 16px;
994
+ flex-shrink: 0;
995
+ }
996
+
997
+ .file-history-view-toggle {
998
+ display: flex;
999
+ border: 1px solid var(--border);
1000
+ border-radius: 6px;
1001
+ overflow: hidden;
1002
+ }
1003
+
1004
+ .file-history-toggle-btn {
1005
+ padding: 4px 10px;
1006
+ border: none;
1007
+ background: transparent;
1008
+ color: var(--text-muted);
1009
+ font-size: 11px;
1010
+ font-family: inherit;
1011
+ cursor: pointer;
1012
+ transition: background 0.15s, color 0.15s;
1013
+ }
1014
+
1015
+ .file-history-toggle-btn + .file-history-toggle-btn {
1016
+ border-left: 1px solid var(--border);
1017
+ }
1018
+
1019
+ .file-history-toggle-btn:hover {
1020
+ background: var(--sidebar-hover);
1021
+ color: var(--text);
1022
+ }
1023
+
1024
+ .file-history-toggle-btn.active {
1025
+ background: var(--accent-bg);
1026
+ color: var(--accent);
1027
+ }
1028
+
1029
+ /* Full-size diff container (View diff mode) */
1030
+ .file-history-diff-full {
1031
+ flex: 1;
1032
+ overflow: auto;
1033
+ background: var(--code-bg);
1034
+ border-top: 1px solid var(--border-subtle);
1035
+ }
1036
+
1037
+ /* Split view */
1038
+ .file-history-compare-view {
1039
+ display: flex;
1040
+ flex-direction: column;
1041
+ height: 100%;
1042
+ }
1043
+
1044
+ .file-history-compare-view .file-history-compare-bar {
1045
+ padding: 10px 16px;
1046
+ flex-shrink: 0;
1047
+ }
1048
+
1049
+ .file-history-compare-content {
1050
+ display: flex;
1051
+ flex-direction: column;
1052
+ flex: 1;
1053
+ min-height: 0;
1054
+ }
1055
+
1056
+ .file-history-split {
1057
+ display: flex;
1058
+ flex: 1;
1059
+ min-height: 0;
1060
+ border-top: 1px solid var(--border-subtle);
1061
+ }
1062
+
1063
+ .file-history-split-pane {
1064
+ flex: 1;
1065
+ min-width: 0;
1066
+ display: flex;
1067
+ flex-direction: column;
1068
+ }
1069
+
1070
+ .file-history-split-pane + .file-history-split-pane {
1071
+ border-left: 1px solid var(--border-subtle);
1072
+ }
1073
+
1074
+ .file-history-split-label {
1075
+ padding: 6px 12px;
1076
+ font-size: 11px;
1077
+ font-weight: 600;
1078
+ color: var(--text-muted);
1079
+ background: var(--bg-alt);
1080
+ border-bottom: 1px solid var(--border-subtle);
1081
+ overflow: hidden;
1082
+ text-overflow: ellipsis;
1083
+ white-space: nowrap;
1084
+ flex-shrink: 0;
1085
+ }
1086
+
1087
+ .file-history-split-code {
1088
+ flex: 1;
1089
+ overflow: auto;
1090
+ background: var(--code-bg);
1091
+ }
1092
+
1093
+ .file-history-split-code pre {
1094
+ margin: 0;
1095
+ padding: 8px 12px;
1096
+ font-size: 12px;
1097
+ line-height: 1.5;
1098
+ tab-size: 2;
1099
+ }
1100
+
1101
+ .file-history-split-code code {
1102
+ font-family: "Roboto Mono", monospace;
1103
+ }
1104
+
1105
+ /* --- Message blink animation --- */
1106
+ @keyframes message-blink {
1107
+ 0%, 100% { background: transparent; }
1108
+ 50% { background: var(--accent-bg); }
1109
+ }
1110
+
1111
+ .message-blink {
1112
+ animation: message-blink 0.5s ease 3;
1113
+ border-radius: 12px;
1114
+ }