File size: 14,459 Bytes
7c1820c
852b0d3
7c1820c
852b0d3
 
 
 
7c1820c
852b0d3
7c1820c
 
 
 
852b0d3
 
7c1820c
 
852b0d3
 
 
7c1820c
852b0d3
 
 
7c1820c
 
852b0d3
7c1820c
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
9b857f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
 
7c1820c
 
852b0d3
7c1820c
852b0d3
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
7c1820c
 
852b0d3
7c1820c
 
852b0d3
 
 
 
7c1820c
 
 
852b0d3
 
 
7c1820c
852b0d3
 
 
 
 
 
7c1820c
852b0d3
7c1820c
852b0d3
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
7c1820c
852b0d3
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
7c1820c
852b0d3
 
7c1820c
 
 
852b0d3
 
 
 
7c1820c
 
 
 
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
7c1820c
852b0d3
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
 
 
7c1820c
 
852b0d3
 
7c1820c
 
852b0d3
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b857f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
 
 
7c1820c
852b0d3
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
7c1820c
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
7c1820c
852b0d3
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
/* ---------------------------------------------------------------------------
   assistant/assistant.css β€” the AI assistant's chat surface (owner item 2).

   The shape is borrowed, reference by reference: ChatGPT's centred column and
   in-field composer, Glean's source chips under the field, Airtable's "New
   chat" panel. The PALETTE is Loopable's own β€” see AssistantPage.tsx's note on
   why the dark canvas and the vendor logos are the parts not copied.

   EVERY FONT SIZE IS A `--lp-fs-*` TOKEN AND EVERY COLOUR A `--lp-*` TOKEN.
   Wave-21 R5 is gated app-wide over every CSS file under src, and a literal
   here reds `web_ui` for the whole tree. No emojis, no ALL-CAPS chrome
   (DESIGN.md R6).

   AND DO NOT WRITE A GLOB IN THIS COMMENT: a star-star followed by a slash is
   the CSS comment terminator, and `lightningcss` then dies far from the cause.
--------------------------------------------------------------------------- */

.as-chat {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--lp-surface);
}

/* ── Airtable's panel: New chat, then the history ─────────────────────────── */

.as-history {
  flex: 0 0 var(--lp-rail-w);
  width: var(--lp-rail-w);
  min-width: var(--lp-rail-w);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  border-right: 1px solid var(--lp-line);
  background: var(--lp-surface);
  overflow: hidden;
}

/* ── R14 / C2: the Chat / Query toggle, directly above New chat ───────────── */

.as-mode-toggle {
  flex: 0 0 auto;
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  padding: 2px;
  border-radius: var(--lp-r-md);
  background: var(--lp-surface-2);
}

.as-mode {
  flex: 1 1 0;
  min-width: 0;
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-mode:hover { color: var(--lp-ink); }
.as-mode.is-on { background: var(--lp-surface); color: var(--lp-ink); }

/* The Query list is the SAME `QueryRail` the standalone page renders β€” only its host changed.
   These are the overrides a rail needs when it is nested inside a panel that is already one rail
   wide: it must FILL that panel rather than claim a second `--lp-rail-w` beside it, and it must
   not draw a second divider against the one `.as-history` already has.
   `.qy-rail-ask` goes because it links to the Assistant, which is the surface it is now inside. */
.as-history .qy-rail {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  border-right: 0;
}

.as-history .qy-rail-ask { display: none; }

/* Query fills the conversation column while the toggle is on Query. */
.as-conversation > .shell-db-frame,
.as-conversation > .qy-empty {
  flex: 1 1 auto;
  min-height: 0;
}

.as-new {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-xs);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.as-new:hover { background: var(--lp-surface-2); }

.as-new svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.as-thread-list {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.as-thread-row {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: var(--lp-r-md);
}

.as-thread-row:hover { background: var(--lp-surface-2); }
.as-thread-row.is-active { background: var(--lp-blue-tint); }
.as-thread-row.is-active .as-thread { font-weight: 600; }

.as-thread {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--lp-r-md);
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-xs);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.as-thread-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  opacity: 0;
  cursor: pointer;
}

.as-thread-del svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-thread-row:hover .as-thread-del,
.as-thread-row.is-active .as-thread-del,
.as-thread-del:focus-visible { opacity: 1; }

.as-thread-confirm {
  flex: 0 0 auto;
  margin-right: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--lp-red-deep);
  color: var(--lp-surface);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-thread-empty {
  margin: 8px 10px 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

/* ── ChatGPT's column ─────────────────────────────────────────────────────── */

.as-conversation {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* One measure, used by the stream, the dock and the opening state, so the
   composer does not shift sideways when the first answer arrives. */
.as-column {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.as-stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 0 8px;
}

.as-dock {
  flex: 0 0 auto;
  padding: 6px 0 18px;
  background: var(--lp-surface);
}

.as-opening {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
}

.as-opening-h {
  margin: 0 0 6px;
  color: var(--lp-ink);
  font-size: var(--lp-fs-lg);
  font-weight: 650;
}

.as-opening-p {
  max-width: 52ch;
  margin: 0 0 20px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
}

.as-opening .as-composer {
  width: 100%;
  max-width: 700px;
  text-align: left;
}

/* ── the messages ─────────────────────────────────────────────────────────── */

.as-message { margin: 0 0 22px; }

.as-message--user {
  display: flex;
  justify-content: flex-end;
}

.as-bubble {
  max-width: 78%;
  margin: 0;
  padding: 9px 14px;
  border-radius: 18px;
  background: var(--lp-surface-2);
  color: var(--lp-ink);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* No bubble and no "Assistant" label: the reference prints the answer as the
   page's own prose, and a role label on every turn is the thing that makes a
   chat read like a transcript instead of a reply. */
.as-message-text {
  margin: 0;
  color: var(--lp-ink);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.as-message--assistant.is-refusal .as-message-text { color: var(--lp-muted); }

.as-numeric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 0;
}

.as-numeric-label { color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-numeric-value { color: var(--lp-ink); font-size: var(--lp-fs-md); font-weight: 650; }

.as-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding: 9px 13px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.as-preview:hover { background: var(--lp-surface-2); }
.as-preview-name { color: var(--lp-ink); font-size: var(--lp-fs-xs); font-weight: 600; }
.as-preview-meta { color: var(--lp-blue-solid); font-size: var(--lp-fs-2xs); font-weight: 600; }

/* ── R20: the thumbs, which the server reads back into the next turn ───────── */

.as-rate {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

.as-rate-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
}

.as-rate-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-rate-btn:hover { background: var(--lp-surface-2); color: var(--lp-ink); }
.as-rate-btn.is-on { background: var(--lp-blue-tint); color: var(--lp-blue-solid); }

.as-rate-why-said {
  margin-left: 4px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.as-rate-why {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.as-rate-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
}

.as-rate-input:focus { outline: none; border-color: var(--lp-blue-solid); }

.as-rate-send {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-rate-send:hover { background: var(--lp-surface-2); }

.as-sources { margin-top: 8px; }

.as-sources-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lp-muted);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-sources-btn:hover { color: var(--lp-ink); }

.as-sources-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.as-citation {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: var(--lp-lh);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.as-citation:hover { color: var(--lp-blue-solid); text-decoration: underline; }

.as-working { margin: 0 0 22px; }

.as-problem {
  margin: 0 0 10px;
  color: var(--lp-red-deep);
  font-size: var(--lp-fs-2xs);
}

/* ── the composer ─────────────────────────────────────────────────────────── */

.as-field {
  border: 1px solid var(--lp-line);
  border-radius: 22px;
  background: var(--lp-surface);
  padding: 10px 8px 8px 16px;
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.05);
}

.as-field:focus-within { border-color: var(--lp-blue-solid); }

.as-prompt {
  display: block;
  width: 100%;
  max-height: 180px;
  border: 0;
  outline: none;
  padding: 0 8px 0 0;
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  resize: none;
  box-sizing: border-box;
}

.as-prompt::placeholder { color: var(--lp-muted); }

.as-field-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.as-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.as-pick-label { color: var(--lp-muted); font-size: var(--lp-fs-2xs); }

/* Text, not a boxed control β€” ChatGPT's "Instant" reads as part of the field. */
.as-pick-select {
  max-width: 150px;
  border: 0;
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-send {
  flex: 0 0 auto;
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--lp-ink);
  color: var(--lp-surface);
  cursor: pointer;
}

.as-send svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-send:disabled { background: var(--lp-surface-2); color: var(--lp-muted); cursor: default; }

/* ── Glean's chips ────────────────────────────────────────────────────────── */

.as-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 0 6px;
}

.as-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--lp-surface-2);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 500;
  cursor: pointer;
}

.as-chip:hover { border-color: var(--lp-line); }
.as-chip.is-selected { background: var(--lp-blue-tint); border-color: var(--lp-blue-tint); font-weight: 600; }
/* The one the answer will be built on, when more than one is picked (R3). */
.as-chip.is-target { border-color: var(--lp-blue-solid); }

.as-chip-mark {
  flex: 0 0 auto;
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--lp-muted);
}

.as-chip-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-chip.is-selected .as-chip-mark { color: var(--lp-blue-solid); }

.as-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A source this caller holds and cannot ask (see AssistantPage's note): still visible, because
   an artefact already built on it stays listed β€” but plainly not a door. */
.as-chip.is-blocked {
  color: var(--lp-muted);
  background: transparent;
  border-color: var(--lp-line);
  border-style: dashed;
  cursor: default;
}

.as-chip.is-blocked .as-chip-mark { opacity: 0.5; }
.as-chip.is-blocked:hover { border-color: var(--lp-line); }

.as-chips-note {
  flex: 1 0 100%;
  margin: 2px 0 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.as-chips-empty {
  margin: 2px 0 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}