clay-server 2.26.0-beta.1 → 2.26.0-beta.11

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 (42) hide show
  1. package/bin/cli.js +5 -9
  2. package/lib/browser-mcp-server.js +496 -0
  3. package/lib/daemon.js +1 -1
  4. package/lib/os-users.js +23 -0
  5. package/lib/project-debate.js +243 -95
  6. package/lib/project-mate-interaction.js +766 -0
  7. package/lib/project-memory.js +677 -0
  8. package/lib/project.js +546 -1361
  9. package/lib/public/app.js +817 -175
  10. package/lib/public/css/debate.css +224 -2
  11. package/lib/public/css/icon-strip.css +10 -10
  12. package/lib/public/css/input.css +296 -83
  13. package/lib/public/css/mates.css +56 -57
  14. package/lib/public/css/mention.css +7 -4
  15. package/lib/public/css/menus.css +7 -0
  16. package/lib/public/css/messages.css +17 -0
  17. package/lib/public/css/mobile-nav.css +3 -1
  18. package/lib/public/css/overlays.css +181 -0
  19. package/lib/public/css/rewind.css +79 -0
  20. package/lib/public/css/server-settings.css +1 -0
  21. package/lib/public/css/sidebar.css +10 -0
  22. package/lib/public/css/title-bar.css +189 -3
  23. package/lib/public/index.html +53 -16
  24. package/lib/public/modules/context-sources.js +328 -0
  25. package/lib/public/modules/debate.js +184 -97
  26. package/lib/public/modules/input.js +18 -1
  27. package/lib/public/modules/mate-knowledge.js +11 -11
  28. package/lib/public/modules/mate-memory.js +5 -5
  29. package/lib/public/modules/mate-sidebar.js +13 -9
  30. package/lib/public/modules/mention.js +40 -2
  31. package/lib/public/modules/notifications.js +109 -1
  32. package/lib/public/modules/rewind.js +36 -0
  33. package/lib/public/modules/sidebar.js +107 -28
  34. package/lib/public/modules/terminal.js +8 -0
  35. package/lib/public/modules/theme.js +2 -1
  36. package/lib/public/modules/tools.js +69 -24
  37. package/lib/sdk-bridge.js +81 -7
  38. package/lib/sdk-worker.js +13 -1
  39. package/lib/server.js +42 -0
  40. package/lib/sessions.js +39 -7
  41. package/lib/terminal-manager.js +36 -6
  42. package/package.json +2 -2
@@ -1798,6 +1798,23 @@ body.wide-view .msg-assistant:hover {
1798
1798
  background: var(--bg-alt);
1799
1799
  }
1800
1800
 
1801
+ /* Grouped messages: same sender within same minute, hide avatar + header */
1802
+ body.wide-view .msg-user.grouped > .dm-bubble-avatar,
1803
+ body.wide-view .msg-assistant.grouped > .dm-bubble-avatar,
1804
+ body.mate-dm-active .msg-assistant.grouped > .dm-bubble-avatar {
1805
+ visibility: hidden;
1806
+ }
1807
+ body.wide-view .msg-user.grouped .dm-bubble-header,
1808
+ body.wide-view .msg-assistant.grouped .dm-bubble-header,
1809
+ body.mate-dm-active .msg-assistant.grouped .dm-bubble-header {
1810
+ display: none;
1811
+ }
1812
+ body.wide-view .msg-user.grouped,
1813
+ body.wide-view .msg-assistant.grouped,
1814
+ body.mate-dm-active .msg-assistant.grouped {
1815
+ padding-top: 1px;
1816
+ }
1817
+
1801
1818
  body.wide-view .msg-user {
1802
1819
  justify-content: flex-start;
1803
1820
  }
@@ -342,7 +342,6 @@
342
342
  margin-bottom: 4px;
343
343
  background: none;
344
344
  border: none;
345
- border-bottom: 1px solid var(--border-subtle);
346
345
  color: var(--accent);
347
346
  font-family: "Pretendard", system-ui, sans-serif;
348
347
  font-size: 15px;
@@ -351,6 +350,9 @@
351
350
  text-align: left;
352
351
  -webkit-tap-highlight-color: transparent;
353
352
  }
353
+ .mobile-session-new:last-of-type {
354
+ border-bottom: 1px solid var(--border-subtle);
355
+ }
354
356
 
355
357
  .mobile-session-new:active {
356
358
  background: rgba(var(--overlay-rgb), 0.06);
@@ -123,6 +123,187 @@ button.top-bar-pill.pill-accent:hover { background: color-mix(in srgb, var(--acc
123
123
  }
124
124
  .pwa-standalone .top-bar-share-btn { display: none !important; }
125
125
 
126
+ /* Extension pill button — same style as share/install pills */
127
+ .ext-pill-wrap {
128
+ position: relative;
129
+ display: flex;
130
+ align-items: center;
131
+ }
132
+ .top-bar-ext-btn {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ gap: 4px;
136
+ background: color-mix(in srgb, var(--text-muted) 10%, transparent);
137
+ color: var(--text-secondary);
138
+ border: none;
139
+ border-radius: 10px;
140
+ padding: 2px 10px;
141
+ font-family: inherit;
142
+ font-size: 11px;
143
+ font-weight: 600;
144
+ cursor: pointer;
145
+ white-space: nowrap;
146
+ line-height: 1;
147
+ transition: background 0.15s, color 0.15s;
148
+ }
149
+ .top-bar-ext-btn .lucide { width: 12px; height: 12px; }
150
+ .top-bar-ext-btn:hover { background: color-mix(in srgb, var(--text-muted) 18%, transparent); color: var(--text); }
151
+ @media (max-width: 768px) {
152
+ .top-bar-ext-btn span { display: none; }
153
+ }
154
+
155
+ /* Extension popover */
156
+ .ext-popover {
157
+ display: none;
158
+ position: absolute;
159
+ top: calc(100% + 8px);
160
+ left: 0;
161
+ background: var(--code-bg);
162
+ border: 1px solid var(--border);
163
+ border-radius: 12px;
164
+ padding: 16px;
165
+ z-index: 200;
166
+ box-shadow: 0 8px 32px rgba(var(--shadow-rgb), 0.35);
167
+ width: 340px;
168
+ }
169
+ .ext-popover.visible { display: block; }
170
+ .ext-popover-header { margin-bottom: 8px; }
171
+ .ext-popover-title {
172
+ font-size: 14px;
173
+ font-weight: 700;
174
+ color: var(--text);
175
+ }
176
+ .ext-experimental {
177
+ font-size: 10px;
178
+ font-weight: 600;
179
+ color: var(--warning, #f59e0b);
180
+ background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent);
181
+ padding: 2px 6px;
182
+ border-radius: 6px;
183
+ vertical-align: middle;
184
+ letter-spacing: 0.3px;
185
+ text-transform: uppercase;
186
+ position: relative;
187
+ top: -1px;
188
+ }
189
+ .ext-popover-sub {
190
+ font-size: 11px;
191
+ color: var(--text-muted);
192
+ margin-top: 2px;
193
+ }
194
+ .ext-popover-sub a {
195
+ color: var(--accent);
196
+ text-decoration: none;
197
+ }
198
+ .ext-popover-sub a:hover { text-decoration: underline; }
199
+ .ext-popover-desc {
200
+ font-size: 12px;
201
+ color: var(--text-secondary);
202
+ line-height: 1.5;
203
+ margin-bottom: 12px;
204
+ }
205
+ .ext-popover-download {
206
+ display: flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ gap: 6px;
210
+ width: 100%;
211
+ padding: 8px 0;
212
+ background: var(--accent);
213
+ color: #fff;
214
+ border: none;
215
+ border-radius: 8px;
216
+ font-family: inherit;
217
+ font-size: 12.5px;
218
+ font-weight: 600;
219
+ cursor: pointer;
220
+ transition: opacity 0.15s;
221
+ }
222
+ .ext-popover-download .lucide { width: 14px; height: 14px; }
223
+ .ext-popover-download:hover { opacity: 0.85; }
224
+ .ext-popover-download:disabled { opacity: 0.5; cursor: default; }
225
+ .ext-popover-status {
226
+ font-size: 11px;
227
+ color: var(--accent);
228
+ text-align: center;
229
+ margin-top: 6px;
230
+ }
231
+ .ext-popover-status.hidden { display: none; }
232
+ .ext-popover-divider {
233
+ height: 1px;
234
+ background: var(--border);
235
+ margin: 12px 0;
236
+ }
237
+ .ext-popover-guide-title {
238
+ font-size: 11px;
239
+ font-weight: 700;
240
+ color: var(--text-muted);
241
+ text-transform: uppercase;
242
+ letter-spacing: 0.5px;
243
+ margin-bottom: 8px;
244
+ }
245
+ .ext-popover-steps {
246
+ display: flex;
247
+ flex-direction: column;
248
+ gap: 6px;
249
+ }
250
+ .ext-popover-step {
251
+ font-size: 12px;
252
+ color: var(--text-secondary);
253
+ line-height: 1.5;
254
+ display: flex;
255
+ gap: 8px;
256
+ align-items: baseline;
257
+ }
258
+ .ext-snum {
259
+ display: inline-flex;
260
+ align-items: center;
261
+ justify-content: center;
262
+ width: 18px;
263
+ height: 18px;
264
+ border-radius: 50%;
265
+ background: var(--accent);
266
+ color: #fff;
267
+ font-size: 10px;
268
+ font-weight: 700;
269
+ flex-shrink: 0;
270
+ position: relative;
271
+ top: 1px;
272
+ }
273
+ .ext-popover-code {
274
+ font-family: "Roboto Mono", monospace;
275
+ font-size: 11px;
276
+ background: var(--bg-tertiary);
277
+ padding: 1px 5px;
278
+ border-radius: 4px;
279
+ cursor: pointer;
280
+ }
281
+ .ext-popover-code:hover { background: color-mix(in srgb, var(--accent) 15%, var(--bg-tertiary)); }
282
+
283
+ /* Extension connected state */
284
+ .top-bar-ext-btn.ext-connected {
285
+ background: color-mix(in srgb, var(--success, #22c55e) 12%, transparent);
286
+ color: var(--success, #22c55e);
287
+ }
288
+ .top-bar-ext-btn.ext-connected:hover {
289
+ background: color-mix(in srgb, var(--success, #22c55e) 20%, transparent);
290
+ color: var(--success, #22c55e);
291
+ }
292
+ .ext-popover-connected {
293
+ display: flex;
294
+ align-items: center;
295
+ gap: 6px;
296
+ padding: 8px 10px;
297
+ background: color-mix(in srgb, var(--success, #22c55e) 10%, transparent);
298
+ color: var(--success, #22c55e);
299
+ border-radius: 8px;
300
+ font-size: 12.5px;
301
+ font-weight: 600;
302
+ margin-bottom: 12px;
303
+ }
304
+ .ext-popover-connected .lucide { width: 15px; height: 15px; }
305
+ .ext-popover-connected.hidden { display: none; }
306
+
126
307
  /* PWA install modal */
127
308
  .pwa-modal {
128
309
  position: fixed;
@@ -171,6 +171,85 @@
171
171
 
172
172
  .sys-msg.error .sys-text { color: var(--error); }
173
173
 
174
+ /* ==========================================================================
175
+ Context Card (browser tab preview shown between user msg and assistant response)
176
+ ========================================================================== */
177
+
178
+ .context-card {
179
+ max-width: 400px;
180
+ margin: 8px auto 12px;
181
+ padding: 12px;
182
+ background: var(--bg-alt);
183
+ border: 1px solid var(--border);
184
+ border-radius: 10px;
185
+ box-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.08);
186
+ }
187
+
188
+ .context-card-header {
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 6px;
192
+ margin-bottom: 10px;
193
+ font-size: 11px;
194
+ color: var(--text-muted);
195
+ letter-spacing: 0.02em;
196
+ font-weight: 500;
197
+ }
198
+
199
+ .context-card-header .context-card-icon {
200
+ font-size: 13px;
201
+ opacity: 0.7;
202
+ }
203
+
204
+ .context-card-screenshot {
205
+ display: block;
206
+ width: 100%;
207
+ max-height: 200px;
208
+ object-fit: contain;
209
+ border-radius: 8px;
210
+ background: var(--bg);
211
+ cursor: pointer;
212
+ transition: transform 0.15s ease;
213
+ }
214
+
215
+ .context-card-screenshot:hover {
216
+ transform: scale(1.01);
217
+ }
218
+
219
+ .context-card-skeleton {
220
+ width: 100%;
221
+ height: 120px;
222
+ border-radius: 8px;
223
+ background: var(--bg);
224
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
225
+ }
226
+
227
+ .context-card-meta {
228
+ display: flex;
229
+ justify-content: space-between;
230
+ align-items: baseline;
231
+ margin-top: 8px;
232
+ gap: 12px;
233
+ }
234
+
235
+ .context-card-title {
236
+ font-size: 12px;
237
+ color: var(--text-muted);
238
+ white-space: nowrap;
239
+ overflow: hidden;
240
+ text-overflow: ellipsis;
241
+ flex: 1;
242
+ min-width: 0;
243
+ }
244
+
245
+ .context-card-domain {
246
+ font-size: 11px;
247
+ color: var(--text-dimmer);
248
+ font-family: monospace;
249
+ white-space: nowrap;
250
+ flex-shrink: 0;
251
+ }
252
+
174
253
  /* ==========================================================================
175
254
  Activity Indicator
176
255
  ========================================================================== */
@@ -906,3 +906,4 @@
906
906
  line-height: 1.45;
907
907
  margin-top: 2px;
908
908
  }
909
+
@@ -257,6 +257,16 @@
257
257
  letter-spacing: 0.5px;
258
258
  }
259
259
 
260
+ /* --- Section labels --- */
261
+ .sidebar-section-label {
262
+ font-size: 11px;
263
+ font-weight: 600;
264
+ color: var(--text-dimmer);
265
+ text-transform: uppercase;
266
+ letter-spacing: 0.5px;
267
+ padding: 4px 12px 2px;
268
+ }
269
+
260
270
  /* --- Tools section --- */
261
271
  #sidebar-tools {
262
272
  flex-shrink: 0;
@@ -23,8 +23,8 @@
23
23
  display: inline-flex;
24
24
  align-items: center;
25
25
  gap: 4px;
26
- background: color-mix(in srgb, var(--success) 12%, transparent);
27
- color: var(--success);
26
+ background: color-mix(in srgb, #3b82f6 12%, transparent);
27
+ color: #3b82f6;
28
28
  border: none;
29
29
  border-radius: 10px;
30
30
  padding: 2px 10px;
@@ -38,7 +38,7 @@
38
38
  }
39
39
 
40
40
  .top-bar-update-btn .lucide { width: 12px; height: 12px; }
41
- .top-bar-update-btn:hover { background: color-mix(in srgb, var(--success) 20%, transparent); }
41
+ .top-bar-update-btn:hover { background: color-mix(in srgb, #3b82f6 20%, transparent); }
42
42
 
43
43
  /* --- Top bar actions (right-aligned group) --- */
44
44
  .top-bar-actions {
@@ -342,6 +342,7 @@
342
342
  gap: 6px;
343
343
  width: 80px;
344
344
  cursor: default;
345
+ position: relative;
345
346
  }
346
347
 
347
348
  .header-context-bar {
@@ -370,6 +371,191 @@
370
371
  white-space: nowrap;
371
372
  }
372
373
 
374
+ /* --- Context usage popover --- */
375
+ .context-usage-popover {
376
+ position: absolute;
377
+ top: calc(100% + 10px);
378
+ right: -12px;
379
+ width: 320px;
380
+ background: var(--bg-alt);
381
+ border: 1px solid var(--border);
382
+ border-radius: 10px;
383
+ padding: 16px;
384
+ font-size: 12px;
385
+ color: var(--text-secondary);
386
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.4);
387
+ z-index: 200;
388
+ animation: ctx-popover-in 0.12s ease-out;
389
+ line-height: 1.5;
390
+ }
391
+
392
+ .context-usage-popover.hidden { display: none; }
393
+
394
+ @keyframes ctx-popover-in {
395
+ from { opacity: 0; transform: translateY(-4px); }
396
+ to { opacity: 1; transform: translateY(0); }
397
+ }
398
+
399
+ /* Header */
400
+ .ctx-pop-header {
401
+ display: flex;
402
+ justify-content: space-between;
403
+ align-items: baseline;
404
+ margin-bottom: 12px;
405
+ }
406
+
407
+ .ctx-pop-model {
408
+ font-size: 12px;
409
+ color: var(--text-muted);
410
+ font-family: "Roboto Mono", monospace;
411
+ }
412
+
413
+ .ctx-pop-pct {
414
+ font-size: 22px;
415
+ font-weight: 600;
416
+ color: var(--text);
417
+ font-family: "Roboto Mono", monospace;
418
+ letter-spacing: -0.5px;
419
+ }
420
+
421
+ .ctx-pop-tokens {
422
+ font-size: 11px;
423
+ color: var(--text-muted);
424
+ font-family: "Roboto Mono", monospace;
425
+ margin-left: 6px;
426
+ font-weight: 400;
427
+ }
428
+
429
+ /* Stacked category bar */
430
+ .ctx-cat-bar {
431
+ display: flex;
432
+ height: 10px;
433
+ border-radius: 5px;
434
+ overflow: hidden;
435
+ background: var(--border);
436
+ margin-bottom: 12px;
437
+ gap: 1px;
438
+ }
439
+
440
+ .ctx-cat-bar > div {
441
+ height: 100%;
442
+ min-width: 3px;
443
+ transition: width 0.3s ease;
444
+ border-radius: 2px;
445
+ }
446
+
447
+ /* Category legend */
448
+ .ctx-cat-legend {
449
+ display: flex;
450
+ flex-direction: column;
451
+ gap: 1px;
452
+ margin-bottom: 4px;
453
+ }
454
+
455
+ .ctx-cat-item {
456
+ display: flex;
457
+ align-items: center;
458
+ justify-content: space-between;
459
+ width: 100%;
460
+ font-size: 12px;
461
+ padding: 3px 0;
462
+ border-radius: 4px;
463
+ transition: background 0.1s ease;
464
+ }
465
+
466
+ .ctx-cat-item:hover {
467
+ background: rgba(var(--overlay-rgb), 0.03);
468
+ }
469
+
470
+ .ctx-emoji {
471
+ display: inline-block;
472
+ filter: grayscale(1);
473
+ font-size: 12px;
474
+ transition: filter 0.15s ease;
475
+ }
476
+
477
+ .ctx-cat-item:hover .ctx-emoji,
478
+ .ctx-pop-row:hover .ctx-emoji,
479
+ .ctx-pop-note .ctx-emoji {
480
+ filter: grayscale(0);
481
+ }
482
+
483
+ .ctx-cat-name {
484
+ color: var(--text-secondary);
485
+ }
486
+
487
+ .ctx-cat-value {
488
+ font-family: "Roboto Mono", monospace;
489
+ color: var(--text-muted);
490
+ font-size: 11px;
491
+ font-variant-numeric: tabular-nums;
492
+ }
493
+
494
+ /* Sections */
495
+ .ctx-pop-divider {
496
+ border: none;
497
+ height: 1px;
498
+ background: var(--border-subtle);
499
+ margin: 10px 0;
500
+ }
501
+
502
+ .ctx-pop-section-label {
503
+ font-size: 11px;
504
+ text-transform: uppercase;
505
+ color: var(--text-muted);
506
+ letter-spacing: 0.8px;
507
+ margin-bottom: 6px;
508
+ font-weight: 500;
509
+ }
510
+
511
+ .ctx-pop-row {
512
+ display: flex;
513
+ justify-content: space-between;
514
+ align-items: center;
515
+ font-size: 12px;
516
+ padding: 3px 0;
517
+ border-radius: 4px;
518
+ transition: background 0.1s ease;
519
+ }
520
+
521
+ .ctx-pop-row:hover {
522
+ background: rgba(var(--overlay-rgb), 0.03);
523
+ }
524
+
525
+ .ctx-pop-row-label {
526
+ color: var(--text-secondary);
527
+ white-space: nowrap;
528
+ overflow: hidden;
529
+ text-overflow: ellipsis;
530
+ margin-right: 12px;
531
+ }
532
+
533
+ .ctx-pop-row-value {
534
+ font-family: "Roboto Mono", monospace;
535
+ color: var(--text-muted);
536
+ font-size: 11px;
537
+ flex-shrink: 0;
538
+ font-variant-numeric: tabular-nums;
539
+ }
540
+
541
+ .ctx-pop-note {
542
+ font-size: 11px;
543
+ color: var(--text-muted);
544
+ margin-top: 10px;
545
+ text-align: center;
546
+ padding: 4px 8px;
547
+ background: var(--border-subtle);
548
+ border-radius: 4px;
549
+ font-family: "Roboto Mono", monospace;
550
+ }
551
+
552
+ @media (max-width: 400px) {
553
+ .context-usage-popover {
554
+ width: 260px;
555
+ right: -8px;
556
+ }
557
+ }
558
+
373
559
  /* --- Shared pill style for rate limit & fast mode --- */
374
560
  .header-rate-limit,
375
561
  .header-fast-mode {
@@ -52,6 +52,28 @@
52
52
  <div id="top-bar">
53
53
  <div class="top-bar-left-pills">
54
54
  <button id="pwa-install-pill" class="top-bar-install-btn hidden" title="Open as app"><i data-lucide="download"></i> Open as app</button>
55
+ <div id="ext-pill-wrap" class="ext-pill-wrap">
56
+ <button id="ext-pill" class="top-bar-ext-btn" title="Chrome Extension"><i data-lucide="puzzle"></i> Extension</button>
57
+ <div id="ext-popover" class="ext-popover">
58
+ <div class="ext-popover-header">
59
+ <div class="ext-popover-title">Clay for Chrome <span class="ext-experimental">Experimental</span></div>
60
+ <div class="ext-popover-sub">v0.1.0 &middot; <a href="https://github.com/chadbyte/clay-chrome" target="_blank" rel="noopener">GitHub</a></div>
61
+ </div>
62
+ <div class="ext-popover-connected hidden" id="ext-connected-banner"><i data-lucide="check-circle"></i> Extension connected</div>
63
+ <div class="ext-popover-desc" id="ext-popover-desc">Connect your browser to Clay. Gives Claude visibility into open tabs, console, network, DOM, and screenshots.</div>
64
+ <button class="ext-popover-download" id="ext-download-btn"><i data-lucide="download"></i> Download Extension (.zip)</button>
65
+ <div class="ext-popover-status hidden" id="ext-download-status"></div>
66
+ <div class="ext-popover-divider" id="ext-popover-divider"></div>
67
+ <div class="ext-popover-guide-title" id="ext-popover-guide-title">Installation</div>
68
+ <div class="ext-popover-steps">
69
+ <div class="ext-popover-step"><span class="ext-snum">1</span> Download above, then unzip to a permanent folder.</div>
70
+ <div class="ext-popover-step"><span class="ext-snum">2</span> Open <code id="ext-copy-url" class="ext-popover-code" title="Click to copy">chrome://extensions</code></div>
71
+ <div class="ext-popover-step"><span class="ext-snum">3</span> Enable <strong>Developer mode</strong> (top-right toggle).</div>
72
+ <div class="ext-popover-step"><span class="ext-snum">4</span> <strong>Load unpacked</strong> > select the unzipped folder.</div>
73
+ <div class="ext-popover-step"><span class="ext-snum">5</span> Refresh this page. Done!</div>
74
+ </div>
75
+ </div>
76
+ </div>
55
77
  <button id="share-pill" class="top-bar-share-btn" title="Share"><i data-lucide="qr-code"></i> Share</button>
56
78
  <div id="update-pill-wrap" class="top-bar-update hidden">
57
79
  <button id="update-pill" class="top-bar-update-btn"><i data-lucide="arrow-up-circle"></i> <span id="update-version"></span> is available. Update now</button>
@@ -234,11 +256,11 @@
234
256
  <button id="mate-sticky-notes-btn"><i data-lucide="sticky-note"></i> <span>Sticky Notes</span></button>
235
257
  <button id="mate-skills-btn"><i data-lucide="puzzle"></i> <span>Skills</span></button>
236
258
  <button id="mate-scheduler-btn"><i data-lucide="calendar-clock"></i> <span>Scheduled Tasks</span></button>
237
- <button id="mate-debate-btn"><i data-lucide="mic"></i> <span>Debate</span></button>
238
259
  </div>
239
260
  <div id="mate-sidebar-conversations">
240
261
  <div class="mate-sidebar-sessions-header">
241
262
  <span>Conversations</span>
263
+ <button id="mate-debate-btn" class="mate-debate-pill" title="New Debate"><i data-lucide="mic"></i> Debate</button>
242
264
  <div class="mate-sidebar-actions">
243
265
  <button id="mate-search-session-btn" type="button" title="Search sessions"><i data-lucide="search"></i></button>
244
266
  <button id="mate-new-session-btn" type="button" title="New session"><i data-lucide="plus"></i></button>
@@ -310,7 +332,6 @@
310
332
  <button id="header-info-btn" type="button" title="Session info"><i data-lucide="info"></i></button>
311
333
  <button id="header-rename-btn" type="button" title="Rename session"><i data-lucide="pencil"></i></button>
312
334
  <div id="mate-mobile-title" class="mate-mobile-title hidden">
313
- <button id="mate-mobile-back" class="mate-mobile-back" type="button" aria-label="Back"><i data-lucide="chevron-left"></i></button>
314
335
  <img id="mate-mobile-avatar" class="mate-mobile-avatar" alt="">
315
336
  <span id="mate-mobile-name" class="mate-mobile-name"></span>
316
337
  </div>
@@ -415,7 +436,14 @@
415
436
  <div id="input-wrapper">
416
437
  <div id="mention-menu"></div>
417
438
  <div id="slash-menu"></div>
418
- <div id="suggestion-chips" class="hidden"></div>
439
+ <div id="context-sources-bar">
440
+ <div id="context-sources-chips"></div>
441
+ <button id="context-sources-add" type="button" title="Add context source"><i data-lucide="plus"></i><span>Context Sources</span></button>
442
+ <div id="context-sources-picker" class="hidden">
443
+ <div class="context-picker-section" id="context-picker-terminals"></div>
444
+ <div class="context-picker-section" id="context-picker-tabs"></div>
445
+ </div>
446
+ </div>
419
447
  <div id="input-row">
420
448
  <div id="context-mini" class="hidden">
421
449
  <div class="context-mini-bar">
@@ -424,6 +452,7 @@
424
452
  <span class="context-mini-label" id="context-mini-label">0%</span>
425
453
  </div>
426
454
  <div id="image-preview-bar"></div>
455
+ <div id="suggestion-chips" class="hidden"></div>
427
456
  <textarea id="input" rows="1" placeholder="Message Claude Code..." enterkeyhint="send" dir="auto"></textarea>
428
457
  <div id="input-bottom">
429
458
  <div id="attach-wrap">
@@ -1477,30 +1506,38 @@
1477
1506
  </div>
1478
1507
  </div>
1479
1508
 
1480
- <!-- Debate Modal -->
1509
+ <!-- Debate Modal (Wizard) -->
1481
1510
  <div id="debate-modal" class="hidden">
1482
1511
  <div class="debate-modal-backdrop"></div>
1483
1512
  <div class="debate-modal-card">
1484
1513
  <div class="debate-modal-header">
1485
1514
  <span><i data-lucide="mic"></i> New Debate</span>
1515
+ <div class="debate-wizard-steps">
1516
+ <span class="debate-step-dot active" data-step="0"></span>
1517
+ <span class="debate-step-dot" data-step="1"></span>
1518
+ </div>
1486
1519
  <button id="debate-modal-close">&times;</button>
1487
1520
  </div>
1488
- <div class="debate-modal-body">
1489
- <label class="debate-field-label" for="debate-topic-input">Topic <span class="debate-field-req">*</span></label>
1490
- <textarea id="debate-topic-input" rows="2" placeholder="e.g. Should AI development be regulated?"></textarea>
1491
- <label class="debate-field-label" for="debate-panel-list">Select panelists</label>
1492
- <div id="debate-panel-list" class="debate-panel-list"></div>
1493
- <div id="debate-skip-setup-row" class="debate-skip-setup-row hidden">
1494
- <label class="debate-toggle-label">
1495
- <input type="checkbox" id="debate-skip-setup-toggle">
1496
- <span>Skip setup</span>
1497
- <span class="debate-skip-setup-hint">Moderator generates the brief automatically from conversation context</span>
1498
- </label>
1521
+ <!-- Step 0: Topic -->
1522
+ <div class="debate-wizard-page active" data-step="0">
1523
+ <div class="debate-modal-body">
1524
+ <label class="debate-field-label" for="debate-topic-input">Topic <span class="debate-field-req">*</span></label>
1525
+ <textarea id="debate-topic-input" rows="2" placeholder="e.g. Should AI development be regulated?"></textarea>
1526
+ </div>
1527
+ </div>
1528
+ <!-- Step 1: Panelists -->
1529
+ <div class="debate-wizard-page" data-step="1">
1530
+ <div class="debate-modal-body">
1531
+ <label class="debate-field-label" for="debate-panel-list">Select panelists</label>
1532
+ <div id="debate-panel-list" class="debate-panel-list"></div>
1499
1533
  </div>
1500
1534
  </div>
1501
1535
  <div class="debate-modal-footer">
1502
1536
  <button id="debate-modal-cancel" class="debate-btn-cancel">Cancel</button>
1503
- <button id="debate-modal-start" class="debate-btn-start">Start</button>
1537
+ <button id="debate-modal-back" class="debate-btn-back hidden">Back</button>
1538
+ <button id="debate-modal-quick" class="debate-btn-quick hidden">Quick Start</button>
1539
+ <button id="debate-modal-next" class="debate-btn-next hidden">Choose Panel</button>
1540
+ <button id="debate-modal-start" class="debate-btn-start hidden">Design Debate</button>
1504
1541
  </div>
1505
1542
  </div>
1506
1543
  </div>