clay-server 2.19.0 → 2.20.0-beta.1
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.
- package/README.md +51 -91
- package/bin/cli.js +49 -14
- package/lib/cli-sessions.js +3 -3
- package/lib/config.js +30 -4
- package/lib/daemon.js +28 -5
- package/lib/mates.js +61 -7
- package/lib/notes.js +20 -0
- package/lib/os-users.js +71 -2
- package/lib/project.js +850 -184
- package/lib/public/app.js +160 -16
- package/lib/public/css/mates.css +316 -2
- package/lib/public/css/mention.css +23 -0
- package/lib/public/css/mobile-nav.css +198 -0
- package/lib/public/css/overlays.css +23 -0
- package/lib/public/css/rewind.css +32 -0
- package/lib/public/css/title-bar.css +3 -0
- package/lib/public/css/user-settings.css +2 -2
- package/lib/public/index.html +64 -14
- package/lib/public/modules/command-palette.js +44 -4
- package/lib/public/modules/filebrowser.js +2 -0
- package/lib/public/modules/input.js +11 -3
- package/lib/public/modules/mate-knowledge.js +2 -0
- package/lib/public/modules/mate-memory.js +353 -0
- package/lib/public/modules/mention.js +77 -2
- package/lib/public/modules/notifications.js +0 -8
- package/lib/public/modules/server-settings.js +11 -4
- package/lib/public/modules/sidebar.js +284 -6
- package/lib/public/modules/theme.js +10 -12
- package/lib/public/modules/tools.js +84 -12
- package/lib/public/modules/user-settings.js +45 -12
- package/lib/sdk-bridge.js +114 -35
- package/lib/server.js +84 -6
- package/lib/sessions.js +4 -4
- package/lib/users.js +26 -0
- package/package.json +1 -1
|
@@ -163,6 +163,29 @@
|
|
|
163
163
|
color: var(--mention-color, #6c5ce7);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
.mention-stop-btn {
|
|
167
|
+
margin-left: auto;
|
|
168
|
+
background: none;
|
|
169
|
+
border: 1px solid var(--border, #333);
|
|
170
|
+
border-radius: 4px;
|
|
171
|
+
color: var(--text-secondary, #aaa);
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
padding: 2px 6px;
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 4px;
|
|
177
|
+
font-size: 12px;
|
|
178
|
+
transition: color 0.15s, border-color 0.15s;
|
|
179
|
+
}
|
|
180
|
+
.mention-stop-btn:hover {
|
|
181
|
+
color: var(--danger, #e74c3c);
|
|
182
|
+
border-color: var(--danger, #e74c3c);
|
|
183
|
+
}
|
|
184
|
+
.mention-stop-btn svg {
|
|
185
|
+
width: 12px;
|
|
186
|
+
height: 12px;
|
|
187
|
+
}
|
|
188
|
+
|
|
166
189
|
.mention-content {
|
|
167
190
|
font-size: 15px;
|
|
168
191
|
line-height: 1.7;
|
|
@@ -543,6 +543,204 @@
|
|
|
543
543
|
letter-spacing: 0.3px;
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
+
/* --- Loop session grouping (scheduled tasks / Ralph) --- */
|
|
547
|
+
.mobile-loop-wrapper {
|
|
548
|
+
margin-top: 2px;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.mobile-loop-group {
|
|
552
|
+
display: flex;
|
|
553
|
+
align-items: center;
|
|
554
|
+
gap: 8px;
|
|
555
|
+
width: 100%;
|
|
556
|
+
min-height: 48px;
|
|
557
|
+
padding: 10px 12px;
|
|
558
|
+
background: none;
|
|
559
|
+
border: none;
|
|
560
|
+
border-radius: 10px;
|
|
561
|
+
color: var(--text-secondary);
|
|
562
|
+
font-family: "Pretendard", system-ui, sans-serif;
|
|
563
|
+
font-size: 15px;
|
|
564
|
+
cursor: pointer;
|
|
565
|
+
text-align: left;
|
|
566
|
+
-webkit-tap-highlight-color: transparent;
|
|
567
|
+
transition: background 0.15s;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.mobile-loop-group:active {
|
|
571
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.mobile-loop-group.active {
|
|
575
|
+
color: var(--text);
|
|
576
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.mobile-loop-chevron {
|
|
580
|
+
display: flex;
|
|
581
|
+
align-items: center;
|
|
582
|
+
justify-content: center;
|
|
583
|
+
width: 18px;
|
|
584
|
+
height: 18px;
|
|
585
|
+
flex-shrink: 0;
|
|
586
|
+
transition: transform 0.15s ease;
|
|
587
|
+
color: var(--text-dimmer);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.mobile-loop-chevron svg {
|
|
591
|
+
width: 14px;
|
|
592
|
+
height: 14px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.mobile-loop-group.expanded > .mobile-loop-chevron,
|
|
596
|
+
.mobile-loop-run.expanded > .mobile-loop-chevron {
|
|
597
|
+
transform: rotate(90deg);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.mobile-loop-icon {
|
|
601
|
+
display: flex;
|
|
602
|
+
align-items: center;
|
|
603
|
+
flex-shrink: 0;
|
|
604
|
+
color: var(--text-dimmer);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.mobile-loop-icon.scheduled {
|
|
608
|
+
color: var(--success);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.mobile-loop-icon svg {
|
|
612
|
+
width: 16px;
|
|
613
|
+
height: 16px;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.mobile-loop-name {
|
|
617
|
+
flex: 1;
|
|
618
|
+
overflow: hidden;
|
|
619
|
+
text-overflow: ellipsis;
|
|
620
|
+
white-space: nowrap;
|
|
621
|
+
font-weight: 500;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.mobile-loop-count {
|
|
625
|
+
font-size: 11px;
|
|
626
|
+
font-weight: 600;
|
|
627
|
+
padding: 2px 7px;
|
|
628
|
+
border-radius: 10px;
|
|
629
|
+
background: rgba(var(--overlay-rgb), 0.1);
|
|
630
|
+
color: var(--text-dimmer);
|
|
631
|
+
flex-shrink: 0;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.mobile-loop-count.scheduled {
|
|
635
|
+
background: rgba(var(--success-rgb, 34, 197, 94), 0.15);
|
|
636
|
+
color: var(--success);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.mobile-loop-badge.crafting {
|
|
640
|
+
font-size: 11px;
|
|
641
|
+
font-weight: 600;
|
|
642
|
+
padding: 2px 7px;
|
|
643
|
+
border-radius: 10px;
|
|
644
|
+
background: rgba(var(--warning-rgb, 234, 179, 8), 0.15);
|
|
645
|
+
color: var(--warning, #eab308);
|
|
646
|
+
flex-shrink: 0;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.mobile-loop-children {
|
|
650
|
+
padding-left: 20px;
|
|
651
|
+
border-left: 2px solid rgba(var(--overlay-rgb), 0.08);
|
|
652
|
+
margin-left: 20px;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.mobile-loop-child {
|
|
656
|
+
display: flex;
|
|
657
|
+
align-items: center;
|
|
658
|
+
gap: 10px;
|
|
659
|
+
width: 100%;
|
|
660
|
+
min-height: 42px;
|
|
661
|
+
padding: 8px 12px;
|
|
662
|
+
background: none;
|
|
663
|
+
border: none;
|
|
664
|
+
border-radius: 8px;
|
|
665
|
+
color: var(--text-secondary);
|
|
666
|
+
font-family: "Pretendard", system-ui, sans-serif;
|
|
667
|
+
font-size: 14px;
|
|
668
|
+
cursor: pointer;
|
|
669
|
+
text-align: left;
|
|
670
|
+
-webkit-tap-highlight-color: transparent;
|
|
671
|
+
transition: background 0.15s;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.mobile-loop-child:active {
|
|
675
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.mobile-loop-child.active {
|
|
679
|
+
color: var(--text);
|
|
680
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.mobile-loop-role-badge {
|
|
685
|
+
font-size: 12px;
|
|
686
|
+
font-weight: 600;
|
|
687
|
+
padding: 2px 8px;
|
|
688
|
+
border-radius: 6px;
|
|
689
|
+
background: rgba(var(--overlay-rgb), 0.08);
|
|
690
|
+
color: var(--text-muted);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.mobile-loop-role-badge.scheduled {
|
|
694
|
+
background: rgba(var(--success-rgb, 34, 197, 94), 0.12);
|
|
695
|
+
color: var(--success);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.mobile-loop-role-badge.crafting {
|
|
699
|
+
background: rgba(var(--warning-rgb, 234, 179, 8), 0.12);
|
|
700
|
+
color: var(--warning, #eab308);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/* Loop run sub-group (time-based grouping within a loop group) */
|
|
704
|
+
.mobile-loop-run-wrapper {
|
|
705
|
+
margin-top: 2px;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.mobile-loop-run {
|
|
709
|
+
display: flex;
|
|
710
|
+
align-items: center;
|
|
711
|
+
gap: 8px;
|
|
712
|
+
width: 100%;
|
|
713
|
+
min-height: 40px;
|
|
714
|
+
padding: 8px 12px;
|
|
715
|
+
background: none;
|
|
716
|
+
border: none;
|
|
717
|
+
border-radius: 8px;
|
|
718
|
+
color: var(--text-secondary);
|
|
719
|
+
font-family: "Pretendard", system-ui, sans-serif;
|
|
720
|
+
font-size: 14px;
|
|
721
|
+
cursor: pointer;
|
|
722
|
+
text-align: left;
|
|
723
|
+
-webkit-tap-highlight-color: transparent;
|
|
724
|
+
transition: background 0.15s;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.mobile-loop-run:active {
|
|
728
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.mobile-loop-run.active {
|
|
732
|
+
color: var(--text);
|
|
733
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.mobile-loop-run-time {
|
|
737
|
+
flex: 1;
|
|
738
|
+
font-weight: 500;
|
|
739
|
+
display: flex;
|
|
740
|
+
align-items: center;
|
|
741
|
+
gap: 6px;
|
|
742
|
+
}
|
|
743
|
+
|
|
546
744
|
/* --- Mate profile sheet --- */
|
|
547
745
|
.mate-profile-header {
|
|
548
746
|
display: flex;
|
|
@@ -33,6 +33,29 @@
|
|
|
33
33
|
.pill-accent { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
|
|
34
34
|
.pill-error { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
|
|
35
35
|
|
|
36
|
+
/* Usage pill variants */
|
|
37
|
+
.pill-warning { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); }
|
|
38
|
+
.pill-dim { background: color-mix(in srgb, var(--text-dimmer) 8%, transparent); color: var(--text-dimmer); }
|
|
39
|
+
|
|
40
|
+
/* Usage check link in top bar */
|
|
41
|
+
.usage-check-link {
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
transition: background 0.15s;
|
|
45
|
+
}
|
|
46
|
+
.usage-check-link:hover {
|
|
47
|
+
background: color-mix(in srgb, var(--text-dimmer) 16%, transparent);
|
|
48
|
+
}
|
|
49
|
+
.usage-check-link .lucide {
|
|
50
|
+
width: 12px;
|
|
51
|
+
height: 12px;
|
|
52
|
+
}
|
|
53
|
+
.usage-check-link .lucide:last-child {
|
|
54
|
+
opacity: 0.5;
|
|
55
|
+
width: 10px;
|
|
56
|
+
height: 10px;
|
|
57
|
+
}
|
|
58
|
+
|
|
36
59
|
/* Clickable pill (update) */
|
|
37
60
|
button.top-bar-pill {
|
|
38
61
|
border: none;
|
|
@@ -364,6 +364,38 @@
|
|
|
364
364
|
.ask-user-container.answered .ask-user-other input { opacity: 0.5; pointer-events: none; }
|
|
365
365
|
.ask-user-container.answered .ask-user-submit { display: none; }
|
|
366
366
|
|
|
367
|
+
/* Answer summary (shown after answering and during replay) */
|
|
368
|
+
.ask-user-answer-summary {
|
|
369
|
+
margin-top: 8px;
|
|
370
|
+
padding: 8px 12px;
|
|
371
|
+
border-radius: 8px;
|
|
372
|
+
background: rgba(var(--overlay-rgb), 0.06);
|
|
373
|
+
border: 1px solid var(--border-subtle);
|
|
374
|
+
}
|
|
375
|
+
.ask-user-answer-row {
|
|
376
|
+
display: flex;
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
gap: 2px;
|
|
379
|
+
padding: 4px 0;
|
|
380
|
+
}
|
|
381
|
+
.ask-user-answer-row + .ask-user-answer-row {
|
|
382
|
+
border-top: 1px solid var(--border-subtle);
|
|
383
|
+
margin-top: 4px;
|
|
384
|
+
padding-top: 8px;
|
|
385
|
+
}
|
|
386
|
+
.ask-user-answer-label {
|
|
387
|
+
font-size: 11px;
|
|
388
|
+
color: var(--text-dimmer);
|
|
389
|
+
text-transform: uppercase;
|
|
390
|
+
letter-spacing: 0.3px;
|
|
391
|
+
}
|
|
392
|
+
.ask-user-answer-value {
|
|
393
|
+
font-size: 13px;
|
|
394
|
+
color: var(--text);
|
|
395
|
+
line-height: 1.4;
|
|
396
|
+
white-space: pre-wrap;
|
|
397
|
+
}
|
|
398
|
+
|
|
367
399
|
/* ==========================================================================
|
|
368
400
|
Permission Request
|
|
369
401
|
========================================================================== */
|
|
@@ -295,6 +295,7 @@
|
|
|
295
295
|
padding: 0 16px;
|
|
296
296
|
min-width: 0;
|
|
297
297
|
border-bottom: 1px solid var(--border-subtle);
|
|
298
|
+
overflow: visible;
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
.title-bar-content #header-left {
|
|
@@ -314,6 +315,7 @@
|
|
|
314
315
|
color: var(--text-muted);
|
|
315
316
|
flex: 1;
|
|
316
317
|
flex-shrink: 0;
|
|
318
|
+
overflow: visible;
|
|
317
319
|
}
|
|
318
320
|
|
|
319
321
|
/* --- Mobile --- */
|
|
@@ -396,6 +398,7 @@
|
|
|
396
398
|
.header-rate-limit-wrap {
|
|
397
399
|
position: relative;
|
|
398
400
|
display: inline-flex;
|
|
401
|
+
overflow: visible;
|
|
399
402
|
}
|
|
400
403
|
|
|
401
404
|
/* Rate limit states */
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
/* --- Modal box --- */
|
|
21
21
|
.us-modal {
|
|
22
22
|
position: relative;
|
|
23
|
-
background: var(--bg
|
|
23
|
+
background: var(--sidebar-bg);
|
|
24
24
|
border: 1px solid var(--border);
|
|
25
25
|
border-radius: 14px;
|
|
26
26
|
width: 680px;
|
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
flex-shrink: 0;
|
|
93
93
|
padding: 12px 8px;
|
|
94
94
|
border-right: 1px solid var(--border-subtle);
|
|
95
|
-
background: var(--sidebar-bg);
|
|
96
95
|
overflow-y: auto;
|
|
97
96
|
}
|
|
98
97
|
|
|
@@ -156,6 +155,7 @@
|
|
|
156
155
|
min-width: 0;
|
|
157
156
|
overflow-y: auto;
|
|
158
157
|
padding: 20px 24px;
|
|
158
|
+
background: var(--bg);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/* --- Sections --- */
|
package/lib/public/index.html
CHANGED
|
@@ -45,14 +45,6 @@
|
|
|
45
45
|
<!-- Pill badges -->
|
|
46
46
|
<div id="skip-perms-pill" class="top-bar-pill pill-error hidden"><i data-lucide="shield-off"></i> <span>Skip perms</span></div>
|
|
47
47
|
<div id="client-count" class="top-bar-pill pill-accent hidden"><i data-lucide="users"></i> <span id="client-count-text"></span></div>
|
|
48
|
-
<label id="theme-toggle-btn" class="theme-toggle" title="Toggle dark/light mode">
|
|
49
|
-
<input type="checkbox" id="theme-toggle-check">
|
|
50
|
-
<span class="theme-toggle-track">
|
|
51
|
-
<span class="theme-toggle-icon theme-toggle-moon"><i data-lucide="moon"></i></span>
|
|
52
|
-
<span class="theme-toggle-icon theme-toggle-sun"><i data-lucide="sun"></i></span>
|
|
53
|
-
<span class="theme-toggle-thumb"></span>
|
|
54
|
-
</span>
|
|
55
|
-
</label>
|
|
56
48
|
<button id="server-settings-btn" title="Server settings"><i data-lucide="settings"></i></button>
|
|
57
49
|
</div>
|
|
58
50
|
</div>
|
|
@@ -206,6 +198,7 @@
|
|
|
206
198
|
<button id="mate-sidebar-toggle-btn" class="sidebar-collapse-btn" title="Collapse sidebar"><i data-lucide="panel-left-close"></i></button>
|
|
207
199
|
</div>
|
|
208
200
|
<div id="mate-sidebar-tools">
|
|
201
|
+
<button id="mate-memory-btn"><i data-lucide="brain"></i> <span>Memory</span><span id="mate-memory-count" class="sidebar-badge hidden"></span></button>
|
|
209
202
|
<button id="mate-knowledge-btn"><i data-lucide="book-open"></i> <span>Knowledge</span><span id="mate-knowledge-count" class="sidebar-badge hidden"></span></button>
|
|
210
203
|
<button id="mate-sticky-notes-btn"><i data-lucide="sticky-note"></i> <span>Sticky Notes</span></button>
|
|
211
204
|
<button id="mate-skills-btn"><i data-lucide="puzzle"></i> <span>Skills</span></button>
|
|
@@ -226,6 +219,7 @@
|
|
|
226
219
|
</div>
|
|
227
220
|
<div id="mate-session-list" class="mate-session-list"></div>
|
|
228
221
|
</div>
|
|
222
|
+
<div id="mate-sidebar-memory" class="hidden"></div>
|
|
229
223
|
<div id="mate-sidebar-knowledge" class="hidden">
|
|
230
224
|
<div class="mate-sidebar-sessions-header">
|
|
231
225
|
<span>Knowledge</span>
|
|
@@ -499,6 +493,26 @@
|
|
|
499
493
|
<div id="mate-knowledge-viewer-content" class="mate-knowledge-preview-content md-content"></div>
|
|
500
494
|
</div>
|
|
501
495
|
</div>
|
|
496
|
+
<!-- Memory viewer (side panel) -->
|
|
497
|
+
<div id="mate-memory-viewer" class="hidden">
|
|
498
|
+
<div class="mate-memory-viewer-header">
|
|
499
|
+
<i data-lucide="brain" class="mate-knowledge-header-icon"></i>
|
|
500
|
+
<span class="mate-knowledge-active-name">Memory</span>
|
|
501
|
+
<div class="mate-knowledge-toolbar-spacer"></div>
|
|
502
|
+
<button id="mate-memory-viewer-close-btn" class="file-viewer-btn" title="Close"><i data-lucide="x"></i></button>
|
|
503
|
+
</div>
|
|
504
|
+
<div class="mate-memory-viewer-tabs">
|
|
505
|
+
<button class="mate-memory-tab active" data-tab="summary">Summary</button>
|
|
506
|
+
<button class="mate-memory-tab" data-tab="digests">Session Logs</button>
|
|
507
|
+
</div>
|
|
508
|
+
<div id="mate-memory-tab-summary" class="mate-memory-tab-body">
|
|
509
|
+
<div id="mate-memory-summary-content" class="mate-knowledge-preview-content md-content"></div>
|
|
510
|
+
</div>
|
|
511
|
+
<div id="mate-memory-tab-digests" class="mate-memory-tab-body hidden">
|
|
512
|
+
<div id="mate-memory-digest-list" class="mate-memory-digest-list"></div>
|
|
513
|
+
<div id="mate-memory-digest-detail" class="mate-memory-digest-detail hidden"></div>
|
|
514
|
+
</div>
|
|
515
|
+
</div>
|
|
502
516
|
<div id="project-settings" class="hidden panel-fullscreen">
|
|
503
517
|
<div class="project-settings-layout">
|
|
504
518
|
<div class="project-settings-nav">
|
|
@@ -761,16 +775,20 @@
|
|
|
761
775
|
<div class="confirm-backdrop" id="user-settings-backdrop"></div>
|
|
762
776
|
<div class="us-modal">
|
|
763
777
|
<div class="us-modal-header">
|
|
764
|
-
<span class="us-modal-title">
|
|
778
|
+
<span class="us-modal-title">Settings</span>
|
|
765
779
|
<button class="us-modal-close" id="user-settings-close" title="Close"><i data-lucide="x"></i></button>
|
|
766
780
|
</div>
|
|
767
781
|
<div class="us-modal-body">
|
|
768
782
|
<nav class="us-modal-nav">
|
|
769
783
|
<select id="user-settings-nav-dropdown" class="settings-nav-dropdown">
|
|
770
784
|
<option value="us-account" selected>Account</option>
|
|
785
|
+
<option value="us-appearance">Appearance</option>
|
|
786
|
+
<option value="us-chat">Chat</option>
|
|
771
787
|
</select>
|
|
772
788
|
<div class="us-modal-nav-items">
|
|
773
789
|
<button class="us-nav-item active" data-section="us-account"><span>Account</span></button>
|
|
790
|
+
<button class="us-nav-item" data-section="us-appearance"><span>Appearance</span></button>
|
|
791
|
+
<button class="us-nav-item" data-section="us-chat"><span>Chat</span></button>
|
|
774
792
|
<div class="us-nav-separator"></div>
|
|
775
793
|
<button class="us-nav-item us-nav-danger" data-section="us-logout"><span>Log Out</span></button>
|
|
776
794
|
</div>
|
|
@@ -788,25 +806,56 @@
|
|
|
788
806
|
</div>
|
|
789
807
|
</div>
|
|
790
808
|
</div>
|
|
791
|
-
<h3>
|
|
809
|
+
<h3>Security</h3>
|
|
792
810
|
<div class="settings-card">
|
|
793
811
|
<div class="settings-field">
|
|
794
|
-
<label class="settings-label">
|
|
812
|
+
<label class="settings-label">PIN</label>
|
|
813
|
+
<div class="settings-hint">6-digit code used to sign in to your account.</div>
|
|
795
814
|
<div class="us-pin-row">
|
|
796
|
-
<input type="password" class="us-text-input us-pin-input" id="us-pin-input" maxlength="6" inputmode="numeric" pattern="[0-9]*" placeholder="
|
|
797
|
-
<button class="us-btn" id="us-pin-save" disabled>
|
|
815
|
+
<input type="password" class="us-text-input us-pin-input" id="us-pin-input" maxlength="6" inputmode="numeric" pattern="[0-9]*" placeholder="Enter new PIN" autocomplete="off">
|
|
816
|
+
<button class="us-btn" id="us-pin-save" disabled>Change PIN</button>
|
|
798
817
|
</div>
|
|
799
818
|
<div class="us-pin-msg hidden" id="us-pin-msg"></div>
|
|
800
819
|
</div>
|
|
801
820
|
</div>
|
|
802
821
|
</div>
|
|
803
822
|
|
|
823
|
+
<!-- Appearance section -->
|
|
824
|
+
<div class="us-section" data-section="us-appearance">
|
|
825
|
+
<h2>Appearance</h2>
|
|
826
|
+
<div class="settings-card">
|
|
827
|
+
<label class="settings-toggle-row">
|
|
828
|
+
<div>
|
|
829
|
+
<span class="settings-label">Light theme</span>
|
|
830
|
+
<div class="settings-hint">Use a light color scheme instead of dark.</div>
|
|
831
|
+
</div>
|
|
832
|
+
<input type="checkbox" id="us-theme-toggle">
|
|
833
|
+
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
|
834
|
+
</label>
|
|
835
|
+
</div>
|
|
836
|
+
</div>
|
|
837
|
+
|
|
838
|
+
<!-- Chat section -->
|
|
839
|
+
<div class="us-section" data-section="us-chat">
|
|
840
|
+
<h2>Chat</h2>
|
|
841
|
+
<div class="settings-card">
|
|
842
|
+
<label class="settings-toggle-row">
|
|
843
|
+
<div>
|
|
844
|
+
<span class="settings-label">Auto-continue</span>
|
|
845
|
+
<div class="settings-hint">Automatically resume the conversation when a rate limit clears.</div>
|
|
846
|
+
</div>
|
|
847
|
+
<input type="checkbox" id="us-auto-continue">
|
|
848
|
+
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
|
849
|
+
</label>
|
|
850
|
+
</div>
|
|
851
|
+
</div>
|
|
852
|
+
|
|
804
853
|
<!-- Log out section -->
|
|
805
854
|
<div class="us-section" data-section="us-logout">
|
|
806
855
|
<h2>Log Out</h2>
|
|
807
856
|
<div class="settings-card settings-card-danger">
|
|
808
857
|
<div class="settings-field">
|
|
809
|
-
<p class="settings-hint" style="margin:0 0 12px;font-size:14px;color:var(--text-secondary)">
|
|
858
|
+
<p class="settings-hint" style="margin:0 0 12px;font-size:14px;color:var(--text-secondary)">End your current session. You can sign back in anytime.</p>
|
|
810
859
|
<button class="us-btn us-btn-danger" id="us-logout-btn">Log Out</button>
|
|
811
860
|
</div>
|
|
812
861
|
</div>
|
|
@@ -1109,6 +1158,7 @@
|
|
|
1109
1158
|
</label>
|
|
1110
1159
|
</div>
|
|
1111
1160
|
</div>
|
|
1161
|
+
<!-- Auto-continue moved to User Settings > Behavior -->
|
|
1112
1162
|
<div class="server-settings-section hidden" data-section="keep-awake" id="settings-keep-awake-section">
|
|
1113
1163
|
<h2>Keep Awake</h2>
|
|
1114
1164
|
<div class="settings-card">
|
|
@@ -202,6 +202,15 @@ function fetchHomeData() {
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
function findMateById(mateId) {
|
|
206
|
+
if (!mateId || !ctx.matesList) return null;
|
|
207
|
+
var mates = ctx.matesList();
|
|
208
|
+
for (var i = 0; i < mates.length; i++) {
|
|
209
|
+
if (mates[i].id === mateId) return mates[i];
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
|
|
205
214
|
function renderHome(filter) {
|
|
206
215
|
var f = (filter || "").toLowerCase();
|
|
207
216
|
items = [];
|
|
@@ -237,9 +246,21 @@ function renderHome(filter) {
|
|
|
237
246
|
html += '<div class="cmd-palette-group-label">Recent</div>';
|
|
238
247
|
for (var r = 0; r < recentSessions.length; r++) {
|
|
239
248
|
var s = recentSessions[r];
|
|
240
|
-
items.push({ type: "session", data: s });
|
|
249
|
+
items.push({ type: s.isMate ? "mate-session" : "session", data: s });
|
|
250
|
+
var iconHtml;
|
|
251
|
+
if (s.isMate) {
|
|
252
|
+
var mate = findMateById(s.mateId);
|
|
253
|
+
if (mate) {
|
|
254
|
+
var avUrl = mateAvatarUrl(mate, 28);
|
|
255
|
+
iconHtml = '<img src="' + avUrl + '" width="28" height="28" style="border-radius:50%;" alt="">';
|
|
256
|
+
} else {
|
|
257
|
+
iconHtml = '<i data-lucide="bot"></i>';
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
iconHtml = s.projectIcon || '<i data-lucide="message-square"></i>';
|
|
261
|
+
}
|
|
241
262
|
var projLabel = (s.projectIcon || "") + " " + escapeHtml(s.projectTitle || s.projectSlug);
|
|
242
|
-
html += renderItem(flatIndex,
|
|
263
|
+
html += renderItem(flatIndex, iconHtml, escapeHtml(s.sessionTitle || "New Session"), projLabel.trim(), null);
|
|
243
264
|
flatIndex++;
|
|
244
265
|
}
|
|
245
266
|
}
|
|
@@ -382,10 +403,22 @@ function appendHomeSearchResults(results, query) {
|
|
|
382
403
|
var flatIndex = items.length;
|
|
383
404
|
for (var i = 0; i < newResults.length; i++) {
|
|
384
405
|
var r = newResults[i];
|
|
385
|
-
items.push({ type: "search-result", data: r, query: query });
|
|
406
|
+
items.push({ type: r.isMate ? "mate-session" : "search-result", data: r, query: query });
|
|
407
|
+
var srIconHtml;
|
|
408
|
+
if (r.isMate) {
|
|
409
|
+
var srMate = findMateById(r.mateId);
|
|
410
|
+
if (srMate) {
|
|
411
|
+
var srAvUrl = mateAvatarUrl(srMate, 28);
|
|
412
|
+
srIconHtml = '<img src="' + srAvUrl + '" width="28" height="28" style="border-radius:50%;" alt="">';
|
|
413
|
+
} else {
|
|
414
|
+
srIconHtml = '<i data-lucide="bot"></i>';
|
|
415
|
+
}
|
|
416
|
+
} else {
|
|
417
|
+
srIconHtml = r.projectIcon || '<i data-lucide="message-square"></i>';
|
|
418
|
+
}
|
|
386
419
|
var projLabel = (r.projectIcon || "") + " " + escapeHtml(r.projectTitle || r.projectSlug);
|
|
387
420
|
var snippet = r.snippet ? escapeHtml(r.snippet) : "";
|
|
388
|
-
html += renderItem(flatIndex,
|
|
421
|
+
html += renderItem(flatIndex, srIconHtml, escapeHtml(r.sessionTitle || "New Session"), projLabel.trim(), snippet);
|
|
389
422
|
flatIndex++;
|
|
390
423
|
}
|
|
391
424
|
|
|
@@ -453,6 +486,13 @@ function setActive(idx, skipScroll) {
|
|
|
453
486
|
function activateItem(entry) {
|
|
454
487
|
if (entry.type === "command") {
|
|
455
488
|
executeCommand(entry.data);
|
|
489
|
+
} else if (entry.type === "mate-session") {
|
|
490
|
+
closeCommandPalette();
|
|
491
|
+
// Open mate DM, then select the specific session after connection
|
|
492
|
+
if (entry.data.mateId && ctx.openDm) {
|
|
493
|
+
pendingNav = { slug: entry.data.projectSlug, sessionId: entry.data.sessionId, query: entry.query || null };
|
|
494
|
+
ctx.openDm(entry.data.mateId);
|
|
495
|
+
}
|
|
456
496
|
} else if (entry.type === "session" || entry.type === "search-result") {
|
|
457
497
|
navigateToSession(entry.data, entry.query || null);
|
|
458
498
|
} else if (entry.type === "project") {
|
|
@@ -2,6 +2,7 @@ import { iconHtml, refreshIcons } from './icons.js';
|
|
|
2
2
|
import { escapeHtml, copyToClipboard } from './utils.js';
|
|
3
3
|
import { renderMarkdown, highlightCodeBlocks, renderMermaidBlocks, exportMarkdownAsPdf } from './markdown.js';
|
|
4
4
|
import { closeSidebar } from './sidebar.js';
|
|
5
|
+
import { closeTerminal } from './terminal.js';
|
|
5
6
|
import { renderUnifiedDiff, renderSplitDiff } from './diff.js';
|
|
6
7
|
import { initFileIcons, getFileIconSvg, getFolderIconSvg } from './fileicons.js';
|
|
7
8
|
|
|
@@ -524,6 +525,7 @@ function showFileContent(msg) {
|
|
|
524
525
|
}
|
|
525
526
|
}
|
|
526
527
|
|
|
528
|
+
closeTerminal();
|
|
527
529
|
ctx.fileViewerEl.classList.remove("hidden");
|
|
528
530
|
sendWatch(msg.path);
|
|
529
531
|
refreshIcons();
|
|
@@ -101,10 +101,18 @@ export function sendMessage() {
|
|
|
101
101
|
if (mention) {
|
|
102
102
|
hideMentionMenu();
|
|
103
103
|
if (ctx.hideSuggestionChips) ctx.hideSuggestionChips();
|
|
104
|
+
var mentionImages = pendingImages.slice();
|
|
104
105
|
var mentionPastes = pendingPastes.map(function (p) { return p.text; });
|
|
106
|
+
// Prepend file paths to mention text (same pattern as regular messages)
|
|
107
|
+
var mentionFiles = pendingFiles.slice();
|
|
108
|
+
var mentionText = mention.text;
|
|
109
|
+
if (mentionFiles.length > 0) {
|
|
110
|
+
var mFilePaths = mentionFiles.map(function (f) { return "[Uploaded file: " + f.path + "]"; }).join("\n");
|
|
111
|
+
mentionText = mentionText ? mFilePaths + "\n\n" + mentionText : mFilePaths;
|
|
112
|
+
}
|
|
105
113
|
// Render user message with mention chip (same as history replay)
|
|
106
|
-
renderMentionUser({ mateName: mention.mateName, text:
|
|
107
|
-
sendMention(mention.mateId,
|
|
114
|
+
renderMentionUser({ mateName: mention.mateName, text: mentionText, images: mentionImages.length > 0 ? mentionImages : null, pastes: mentionPastes.length > 0 ? mentionPastes : null });
|
|
115
|
+
sendMention(mention.mateId, mentionText, mentionPastes, mentionImages);
|
|
108
116
|
clearMentionState();
|
|
109
117
|
ctx.inputEl.value = "";
|
|
110
118
|
sendInputSync();
|
|
@@ -574,7 +582,7 @@ export function initInput(_ctx) {
|
|
|
574
582
|
document.addEventListener("paste", function (e) {
|
|
575
583
|
// Don't intercept paste when typing in modals or other non-chat inputs
|
|
576
584
|
var target = e.target;
|
|
577
|
-
if (target && target.closest && target.closest(".sticky-note, #notes-archive, #ralph-wizard, .confirm-modal, .scheduler-detail")) return;
|
|
585
|
+
if (target && target.closest && target.closest(".sticky-note, #notes-archive, #ralph-wizard, .confirm-modal, .scheduler-detail, #debate-modal, .us-modal")) return;
|
|
578
586
|
|
|
579
587
|
var cd = e.clipboardData;
|
|
580
588
|
if (!cd) return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { iconHtml, refreshIcons } from './icons.js';
|
|
2
2
|
import { hideNotes } from './sticky-notes.js';
|
|
3
|
+
import { hideMemory } from './mate-memory.js';
|
|
3
4
|
import { renderMarkdown, highlightCodeBlocks } from './markdown.js';
|
|
4
5
|
|
|
5
6
|
var getMateWs = null;
|
|
@@ -281,6 +282,7 @@ function openEditor(fileName, content) {
|
|
|
281
282
|
export function showKnowledge() {
|
|
282
283
|
visible = true;
|
|
283
284
|
hideNotes();
|
|
285
|
+
hideMemory();
|
|
284
286
|
|
|
285
287
|
// Toggle sidebar panels: hide conversations, show knowledge file list
|
|
286
288
|
if (conversationsPanel) conversationsPanel.classList.add("hidden");
|