claude-relay 2.4.2 → 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 (75) hide show
  1. package/bin/cli.js +1 -2350
  2. package/package.json +7 -42
  3. package/LICENSE +0 -21
  4. package/README.md +0 -281
  5. package/lib/cli-sessions.js +0 -270
  6. package/lib/config.js +0 -222
  7. package/lib/daemon.js +0 -423
  8. package/lib/ipc.js +0 -112
  9. package/lib/pages.js +0 -714
  10. package/lib/project.js +0 -1224
  11. package/lib/public/app.js +0 -2157
  12. package/lib/public/apple-touch-icon.png +0 -0
  13. package/lib/public/css/base.css +0 -145
  14. package/lib/public/css/diff.css +0 -128
  15. package/lib/public/css/filebrowser.css +0 -1076
  16. package/lib/public/css/highlight.css +0 -144
  17. package/lib/public/css/input.css +0 -512
  18. package/lib/public/css/menus.css +0 -683
  19. package/lib/public/css/messages.css +0 -1159
  20. package/lib/public/css/overlays.css +0 -731
  21. package/lib/public/css/rewind.css +0 -529
  22. package/lib/public/css/sidebar.css +0 -794
  23. package/lib/public/favicon.svg +0 -26
  24. package/lib/public/icon-192.png +0 -0
  25. package/lib/public/icon-512.png +0 -0
  26. package/lib/public/icon-mono.svg +0 -19
  27. package/lib/public/index.html +0 -460
  28. package/lib/public/manifest.json +0 -27
  29. package/lib/public/modules/diff.js +0 -398
  30. package/lib/public/modules/events.js +0 -21
  31. package/lib/public/modules/filebrowser.js +0 -1375
  32. package/lib/public/modules/fileicons.js +0 -172
  33. package/lib/public/modules/icons.js +0 -54
  34. package/lib/public/modules/input.js +0 -578
  35. package/lib/public/modules/markdown.js +0 -149
  36. package/lib/public/modules/notifications.js +0 -643
  37. package/lib/public/modules/qrcode.js +0 -70
  38. package/lib/public/modules/rewind.js +0 -334
  39. package/lib/public/modules/sidebar.js +0 -628
  40. package/lib/public/modules/state.js +0 -3
  41. package/lib/public/modules/terminal.js +0 -658
  42. package/lib/public/modules/theme.js +0 -622
  43. package/lib/public/modules/tools.js +0 -1410
  44. package/lib/public/modules/utils.js +0 -56
  45. package/lib/public/style.css +0 -10
  46. package/lib/public/sw.js +0 -75
  47. package/lib/push.js +0 -125
  48. package/lib/sdk-bridge.js +0 -771
  49. package/lib/server.js +0 -577
  50. package/lib/sessions.js +0 -402
  51. package/lib/terminal-manager.js +0 -187
  52. package/lib/terminal.js +0 -24
  53. package/lib/themes/ayu-light.json +0 -9
  54. package/lib/themes/catppuccin-latte.json +0 -9
  55. package/lib/themes/catppuccin-mocha.json +0 -9
  56. package/lib/themes/claude-light.json +0 -9
  57. package/lib/themes/claude.json +0 -9
  58. package/lib/themes/dracula.json +0 -9
  59. package/lib/themes/everforest-light.json +0 -9
  60. package/lib/themes/everforest.json +0 -9
  61. package/lib/themes/github-light.json +0 -9
  62. package/lib/themes/gruvbox-dark.json +0 -9
  63. package/lib/themes/gruvbox-light.json +0 -9
  64. package/lib/themes/monokai.json +0 -9
  65. package/lib/themes/nord-light.json +0 -9
  66. package/lib/themes/nord.json +0 -9
  67. package/lib/themes/one-dark.json +0 -9
  68. package/lib/themes/one-light.json +0 -9
  69. package/lib/themes/rose-pine-dawn.json +0 -9
  70. package/lib/themes/rose-pine.json +0 -9
  71. package/lib/themes/solarized-dark.json +0 -9
  72. package/lib/themes/solarized-light.json +0 -9
  73. package/lib/themes/tokyo-night-light.json +0 -9
  74. package/lib/themes/tokyo-night.json +0 -9
  75. package/lib/updater.js +0 -96
@@ -1,144 +0,0 @@
1
- /* ==========================================================================
2
- Syntax Highlighting (highlight.js) — base16 CSS-variable driven
3
- Replaces CDN github-dark-dimmed.min.css
4
- ========================================================================== */
5
-
6
- .hljs {
7
- color: var(--text);
8
- background: var(--code-bg);
9
- }
10
-
11
- /* --- Comments --- */
12
- .hljs-comment,
13
- .hljs-quote {
14
- color: var(--hl-comment);
15
- font-style: italic;
16
- }
17
-
18
- /* --- Keywords / control flow --- */
19
- .hljs-keyword,
20
- .hljs-selector-tag,
21
- .hljs-selector-id {
22
- color: var(--hl-keyword);
23
- }
24
-
25
- /* --- Strings / template literals --- */
26
- .hljs-string,
27
- .hljs-doctag,
28
- .hljs-selector-class {
29
- color: var(--hl-string);
30
- }
31
-
32
- /* --- Numbers / booleans / null --- */
33
- .hljs-number,
34
- .hljs-literal {
35
- color: var(--hl-number);
36
- }
37
-
38
- /* --- Functions / method calls --- */
39
- .hljs-title,
40
- .hljs-title.function_,
41
- .hljs-section {
42
- color: var(--hl-function);
43
- }
44
-
45
- /* --- Variables / params --- */
46
- .hljs-variable,
47
- .hljs-template-variable,
48
- .hljs-params {
49
- color: var(--hl-variable);
50
- }
51
-
52
- /* --- Types / classes --- */
53
- .hljs-type,
54
- .hljs-title.class_,
55
- .hljs-title.class_.inherited__ {
56
- color: var(--hl-type);
57
- }
58
-
59
- /* --- Constants / built-ins --- */
60
- .hljs-built_in {
61
- color: var(--hl-builtin);
62
- }
63
-
64
- /* --- Tags (HTML/XML) --- */
65
- .hljs-tag,
66
- .hljs-name {
67
- color: var(--hl-tag);
68
- }
69
-
70
- /* --- Attributes --- */
71
- .hljs-attr,
72
- .hljs-attribute {
73
- color: var(--hl-attr);
74
- }
75
-
76
- /* --- Regexp / links --- */
77
- .hljs-regexp,
78
- .hljs-link {
79
- color: var(--hl-regexp);
80
- }
81
-
82
- /* --- Meta / preprocessor --- */
83
- .hljs-meta,
84
- .hljs-meta .hljs-keyword,
85
- .hljs-meta .hljs-string {
86
- color: var(--hl-meta);
87
- }
88
-
89
- /* --- Symbols / special --- */
90
- .hljs-symbol,
91
- .hljs-bullet {
92
- color: var(--hl-symbol);
93
- }
94
-
95
- /* --- Diff additions / deletions --- */
96
- .hljs-addition {
97
- color: var(--hl-addition);
98
- background: var(--success-8);
99
- }
100
-
101
- .hljs-deletion {
102
- color: var(--hl-deletion);
103
- background: var(--error-8);
104
- }
105
-
106
- /* --- Emphasis / strong --- */
107
- .hljs-emphasis {
108
- font-style: italic;
109
- }
110
-
111
- .hljs-strong {
112
- font-weight: 700;
113
- }
114
-
115
- /* --- Subst / interpolation --- */
116
- .hljs-subst {
117
- color: var(--text);
118
- }
119
-
120
- /* --- Selector --- */
121
- .hljs-selector-attr,
122
- .hljs-selector-pseudo {
123
- color: var(--hl-keyword);
124
- }
125
-
126
- /* --- Property (CSS, JSON keys) --- */
127
- .hljs-property {
128
- color: var(--hl-attr);
129
- }
130
-
131
- /* --- Punctuation (brackets etc.) --- */
132
- .hljs-punctuation {
133
- color: var(--text-secondary);
134
- }
135
-
136
- /* --- Operator --- */
137
- .hljs-operator {
138
- color: var(--hl-keyword);
139
- }
140
-
141
- /* --- Char / escape sequences --- */
142
- .hljs-char.escape_ {
143
- color: var(--hl-regexp);
144
- }
@@ -1,512 +0,0 @@
1
- /* --- Pasted content chips (in chat bubble) --- */
2
- .bubble-pastes {
3
- display: flex;
4
- flex-wrap: wrap;
5
- gap: 6px;
6
- margin-bottom: 8px;
7
- }
8
-
9
- .bubble-pastes:last-child { margin-bottom: 0; }
10
-
11
- .bubble-paste {
12
- display: inline-flex;
13
- align-items: center;
14
- gap: 8px;
15
- background: rgba(var(--overlay-rgb), 0.06);
16
- border: 1px solid var(--border);
17
- border-radius: 10px;
18
- padding: 8px 12px;
19
- cursor: pointer;
20
- transition: border-color 0.15s, background 0.15s;
21
- max-width: 220px;
22
- }
23
-
24
- .bubble-paste:hover {
25
- border-color: var(--text-dimmer);
26
- background: rgba(var(--overlay-rgb), 0.1);
27
- }
28
-
29
- .bubble-paste-preview {
30
- font-size: 12px;
31
- color: var(--text-muted);
32
- overflow: hidden;
33
- text-overflow: ellipsis;
34
- white-space: nowrap;
35
- flex: 1;
36
- min-width: 0;
37
- }
38
-
39
- .bubble-paste-label {
40
- font-size: 10px;
41
- font-weight: 700;
42
- color: var(--text-dimmer);
43
- letter-spacing: 0.05em;
44
- flex-shrink: 0;
45
- }
46
-
47
- /* --- Pasted content chips (input preview) --- */
48
- .pasted-chip {
49
- display: inline-flex;
50
- align-items: center;
51
- gap: 6px;
52
- background: var(--bg-alt);
53
- border: 1px solid var(--border);
54
- border-radius: 10px;
55
- padding: 6px 10px;
56
- font-size: 12px;
57
- max-width: 200px;
58
- }
59
-
60
- .pasted-chip-preview {
61
- color: var(--text-muted);
62
- overflow: hidden;
63
- text-overflow: ellipsis;
64
- white-space: nowrap;
65
- flex: 1;
66
- min-width: 0;
67
- }
68
-
69
- .pasted-chip-label {
70
- font-size: 10px;
71
- font-weight: 700;
72
- color: var(--text-dimmer);
73
- letter-spacing: 0.05em;
74
- flex-shrink: 0;
75
- }
76
-
77
- .pasted-chip-remove {
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- width: 16px;
82
- height: 16px;
83
- border-radius: 50%;
84
- border: none;
85
- background: transparent;
86
- color: var(--text-muted);
87
- cursor: pointer;
88
- padding: 0;
89
- flex-shrink: 0;
90
- }
91
-
92
- .pasted-chip-remove .lucide { width: 12px; height: 12px; }
93
- .pasted-chip-remove:hover { color: var(--text); background: rgba(var(--overlay-rgb), 0.1); }
94
-
95
- /* --- Paste viewer modal --- */
96
- #paste-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
97
- #paste-modal.hidden { display: none; }
98
-
99
- .paste-modal-dialog {
100
- max-width: 620px;
101
- width: 94%;
102
- max-height: 80vh;
103
- display: flex;
104
- flex-direction: column;
105
- padding: 0;
106
- }
107
-
108
- .paste-modal-header {
109
- display: flex;
110
- align-items: center;
111
- justify-content: space-between;
112
- padding: 16px 20px;
113
- border-bottom: 1px solid var(--border-subtle);
114
- flex-shrink: 0;
115
- }
116
-
117
- .paste-modal-title {
118
- font-size: 15px;
119
- font-weight: 600;
120
- color: var(--text);
121
- }
122
-
123
- .paste-modal-close {
124
- display: flex;
125
- align-items: center;
126
- justify-content: center;
127
- background: none;
128
- border: none;
129
- color: var(--text-muted);
130
- cursor: pointer;
131
- padding: 4px;
132
- border-radius: 6px;
133
- transition: color 0.15s, background 0.15s;
134
- }
135
-
136
- .paste-modal-close:hover { color: var(--text); background: rgba(var(--overlay-rgb), 0.06); }
137
-
138
- .paste-modal-body {
139
- margin: 0;
140
- padding: 16px 20px;
141
- font-family: "SF Mono", Menlo, Monaco, monospace;
142
- font-size: 13px;
143
- line-height: 1.55;
144
- color: var(--text-secondary);
145
- white-space: pre-wrap;
146
- word-break: break-word;
147
- overflow-y: auto;
148
- min-height: 0;
149
- }
150
-
151
- /* --- Image preview bar --- */
152
- #image-preview-bar {
153
- display: none;
154
- width: 100%;
155
- padding: 6px 4px 4px 14px;
156
- }
157
-
158
- #image-preview-bar.visible {
159
- display: flex;
160
- flex-wrap: wrap;
161
- gap: 6px;
162
- }
163
-
164
- .image-preview-thumb {
165
- position: relative;
166
- display: inline-block;
167
- }
168
-
169
- .image-preview-thumb img {
170
- width: 48px;
171
- height: 48px;
172
- object-fit: cover;
173
- border-radius: 8px;
174
- border: 1px solid var(--border-subtle);
175
- cursor: pointer;
176
- }
177
-
178
- .image-preview-remove {
179
- position: absolute;
180
- top: -6px;
181
- right: -6px;
182
- width: 20px;
183
- height: 20px;
184
- border-radius: 50%;
185
- border: 1px solid var(--border);
186
- background: var(--bg);
187
- color: var(--text-muted);
188
- cursor: pointer;
189
- display: flex;
190
- align-items: center;
191
- justify-content: center;
192
- padding: 0;
193
- }
194
-
195
- .image-preview-remove .lucide { width: 12px; height: 12px; }
196
-
197
- .image-preview-remove:hover {
198
- background: var(--error);
199
- color: white;
200
- border-color: var(--error);
201
- }
202
-
203
- /* ==========================================================================
204
- Input Area — Claude-style unified container
205
- ========================================================================== */
206
-
207
- #input-area {
208
- flex-shrink: 0;
209
- padding: 8px 16px calc(var(--safe-bottom) + 12px);
210
- }
211
-
212
- #input-wrapper {
213
- max-width: var(--content-width);
214
- margin: 0 auto;
215
- position: relative;
216
- }
217
-
218
- #input-row {
219
- display: flex;
220
- flex-direction: column;
221
- background: var(--input-bg);
222
- border: 1px solid var(--border);
223
- border-radius: 24px;
224
- padding: 6px;
225
- transition: border-color 0.2s, box-shadow 0.2s;
226
- }
227
-
228
- #input-row:focus-within {
229
- border-color: var(--text-dimmer);
230
- box-shadow: 0 0 0 1px rgba(109, 104, 96, 0.15);
231
- }
232
-
233
- #input {
234
- width: 100%;
235
- background: transparent;
236
- border: none;
237
- color: var(--text);
238
- font-size: 16px;
239
- font-family: inherit;
240
- line-height: 1.4;
241
- padding: 8px 10px 4px;
242
- resize: none;
243
- outline: none;
244
- min-height: 24px;
245
- max-height: 120px;
246
- overflow-y: auto;
247
- box-sizing: border-box;
248
- unicode-bidi: plaintext;
249
- text-align: start;
250
- }
251
-
252
- #input::placeholder {
253
- color: var(--text-muted);
254
- }
255
-
256
- /* --- Bottom toolbar (attach left, model+send right) --- */
257
- #input-bottom {
258
- display: flex;
259
- align-items: center;
260
- justify-content: space-between;
261
- }
262
-
263
- #input-bottom-right {
264
- display: flex;
265
- align-items: center;
266
- gap: 4px;
267
- }
268
-
269
- /* --- Attach button & menu --- */
270
- #attach-wrap {
271
- position: relative;
272
- flex-shrink: 0;
273
- }
274
-
275
- #attach-btn {
276
- width: 36px;
277
- height: 36px;
278
- border-radius: 50%;
279
- border: none;
280
- background: transparent;
281
- color: var(--text-muted);
282
- cursor: pointer;
283
- display: flex;
284
- align-items: center;
285
- justify-content: center;
286
- transition: background 0.15s, color 0.15s;
287
- touch-action: manipulation;
288
- }
289
-
290
- #attach-btn .lucide { width: 20px; height: 20px; }
291
- #attach-btn:hover { background: rgba(var(--overlay-rgb), 0.06); color: var(--text); }
292
-
293
- #attach-menu {
294
- position: absolute;
295
- bottom: calc(100% + 8px);
296
- left: 0;
297
- min-width: 170px;
298
- background: var(--bg-alt);
299
- border: 1px solid var(--border);
300
- border-radius: 14px;
301
- box-shadow: 0 -4px 24px rgba(var(--shadow-rgb), 0.4);
302
- z-index: 10;
303
- overflow: hidden;
304
- }
305
-
306
- #attach-menu.hidden { display: none; }
307
-
308
- .attach-menu-item {
309
- display: flex;
310
- align-items: center;
311
- gap: 10px;
312
- width: 100%;
313
- padding: 12px 16px;
314
- border: none;
315
- background: none;
316
- color: var(--text-secondary);
317
- font-family: inherit;
318
- font-size: 14px;
319
- cursor: pointer;
320
- transition: background 0.15s, color 0.15s;
321
- }
322
-
323
- .attach-menu-item:not(:last-child) {
324
- border-bottom: 1px solid var(--border-subtle);
325
- }
326
-
327
- .attach-menu-item:hover {
328
- background: rgba(var(--overlay-rgb), 0.05);
329
- color: var(--text);
330
- }
331
-
332
- .attach-menu-item .lucide { width: 18px; height: 18px; flex-shrink: 0; }
333
-
334
- #send-btn {
335
- flex-shrink: 0;
336
- width: 36px;
337
- height: 36px;
338
- border-radius: 50%;
339
- border: none;
340
- background: var(--accent);
341
- color: #fff;
342
- cursor: pointer;
343
- display: flex;
344
- align-items: center;
345
- justify-content: center;
346
- transition: background 0.15s, opacity 0.15s;
347
- touch-action: manipulation;
348
- }
349
-
350
- #send-btn .lucide {
351
- width: 18px;
352
- height: 18px;
353
- }
354
-
355
- #send-btn:hover:not(:disabled) {
356
- background: var(--accent-hover);
357
- }
358
-
359
- #send-btn:disabled {
360
- opacity: 0.25;
361
- cursor: default;
362
- }
363
-
364
- #send-btn:active:not(:disabled) {
365
- opacity: 0.7;
366
- }
367
-
368
- /* ==========================================================================
369
- Slash Command Autocomplete
370
- ========================================================================== */
371
-
372
- #slash-menu {
373
- display: none;
374
- position: absolute;
375
- bottom: 100%;
376
- left: 0;
377
- right: 0;
378
- max-height: 240px;
379
- overflow-y: auto;
380
- background: var(--bg-alt);
381
- border: 1px solid var(--border);
382
- border-radius: 14px;
383
- margin-bottom: 8px;
384
- box-shadow: 0 -4px 24px rgba(var(--shadow-rgb), 0.4);
385
- z-index: 10;
386
- }
387
-
388
- #slash-menu.visible { display: block; }
389
-
390
- .slash-item {
391
- display: flex;
392
- align-items: center;
393
- padding: 12px 16px;
394
- cursor: pointer;
395
- gap: 12px;
396
- border-bottom: 1px solid var(--border-subtle);
397
- }
398
-
399
- .slash-item:last-child { border-bottom: none; }
400
-
401
- .slash-item:hover,
402
- .slash-item.active {
403
- background: rgba(var(--overlay-rgb), 0.05);
404
- }
405
-
406
- .slash-item .slash-cmd {
407
- color: var(--accent);
408
- font-weight: 600;
409
- font-size: 14px;
410
- font-family: "SF Mono", Menlo, Monaco, monospace;
411
- }
412
-
413
- .slash-item .slash-desc {
414
- color: var(--text-muted);
415
- font-size: 13px;
416
- }
417
-
418
- /* ==========================================================================
419
- Animations
420
- ========================================================================== */
421
-
422
- @keyframes pulse {
423
- 0%, 100% { opacity: 1; }
424
- 50% { opacity: 0.3; }
425
- }
426
-
427
- @keyframes spin {
428
- to { transform: rotate(360deg); }
429
- }
430
-
431
- @keyframes sparkle {
432
- 0%, 100% { opacity: 1; transform: scale(1); }
433
- 50% { opacity: 0.5; transform: scale(0.85); }
434
- }
435
-
436
- /* ==========================================================================
437
- Mobile Responsive
438
- ========================================================================== */
439
-
440
- @media (max-width: 768px) {
441
- #sidebar {
442
- position: fixed;
443
- left: 0;
444
- top: 0;
445
- bottom: 0;
446
- z-index: 100;
447
- transform: translateX(-100%);
448
- transition: transform 0.25s ease;
449
- width: 260px;
450
- }
451
-
452
- #sidebar.open {
453
- transform: translateX(0);
454
- }
455
-
456
- /* On mobile, sidebar-collapsed should not affect sidebar (hamburger controls it) */
457
- #layout.sidebar-collapsed #sidebar {
458
- width: 260px;
459
- border-right: 1px solid var(--border-subtle);
460
- }
461
-
462
- #hamburger-btn {
463
- display: flex;
464
- align-items: center;
465
- justify-content: center;
466
- }
467
-
468
- #sidebar-toggle-btn,
469
- #sidebar-expand-btn,
470
- #layout.sidebar-collapsed #sidebar-expand-btn {
471
- display: none;
472
- }
473
-
474
- .msg-user .bubble {
475
- max-width: 90%;
476
- }
477
-
478
- #input-row {
479
- border-radius: 20px;
480
- }
481
- }
482
-
483
- /* ==========================================================================
484
- Progressive History Loading
485
- ========================================================================== */
486
-
487
- .history-sentinel {
488
- text-align: center;
489
- padding: 16px 0 8px;
490
- }
491
-
492
- .load-more-btn {
493
- background: none;
494
- border: 1px solid var(--border-subtle);
495
- border-radius: 8px;
496
- color: var(--text-secondary);
497
- padding: 6px 16px;
498
- font-size: 12px;
499
- font-family: inherit;
500
- cursor: pointer;
501
- transition: border-color 0.15s, color 0.15s;
502
- }
503
-
504
- .load-more-btn:hover {
505
- border-color: var(--text-secondary);
506
- color: var(--text-primary, var(--text));
507
- }
508
-
509
- .load-more-btn.loading {
510
- pointer-events: none;
511
- opacity: 0.5;
512
- }