Repository navigation
Expand file tree
/
Copy pathapp.css
More file actions
2332 lines (2026 loc) · 57.2 KB
/
Copy pathapp.css
File metadata and controls
2332 lines (2026 loc) · 57.2 KB
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
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* JevLoop · 布局与组件
*
* 视觉照搬自 **DeepSeek Harness**(MIT,Copyright © 2026 DeepSeek)——
* 令牌见 tokens.css,完整许可见 LICENSE-DSH。
*
* 三条从 DSH 的 docs/web-styling.md 一起搬过来的规矩:
*
* 1. **只用第二层语义别名。** 这个文件里不出现任何字面颜色值 ——
* 写死一个颜色意味着换主题时它不会跟着变,而且没人会发现。
* 2. **中性描边一律 0.5px。** 按钮、输入框、卡片、分隔线同一条发丝线,
* Chromium 上渲染成一个设备像素。状态色描边保持 1px。
* 3. **抬起来的表面不用 border,用阴影。** 发丝线是阴影的第一层,
* `--jl-elevation-stroke-color` 逐表面重绑。两者同时上会被
* DSH 那边的测试拒绝 —— 那看起来像描边套描边。
* 状态色的边框(比如告警面板)仍然是真边框。
*
* ## 待拆
*
* 这个文件的标题就写着**两件事**(「布局」与「组件」)—— 按 §12 的判据,
* 一句话说不完的文件就是住了两件以上的事。内部现在是十二节:
* 布局轴 / 框架 / 会话头部 / 视图容器 / 对话 / 输入卡 / 轨迹 /
* 左栏 / 右栏 / 通用 / 详情面板。
*
* 接缝是**每个视图一套**,与 `app.js` 的分节对齐:
* 骨架(布局轴 + 框架 + 视图容器)、对话(对话 + 输入卡)、
* 轨迹(轨迹 + 详情)、两侧面板(左栏 + 右栏 + 通用)。
* 拆的时候按这四条走,不按行数。
*/
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
height: 100%;
background: var(--jl-alias-bg-base);
color: var(--jl-alias-label-primary);
font-family: var(--jl-font-family);
font-size: var(--jl-font-size);
line-height: var(--jl-line);
-webkit-font-smoothing: antialiased;
}
/* ═══════════════════════════════════════════════════════════
布局轴
对话内容列居中,输入卡比它宽 32px(DSH 的共享宽度规则)。
两侧留白由 --jl-composer-side-clearance 决定,窄屏时内容列
正好比输入卡窄 32px。
═══════════════════════════════════════════════════════════ */
:root {
--jl-chat-content-width: min(748px, 100%);
--jl-composer-card-max-width: calc(var(--jl-chat-content-width) + 32px);
--jl-composer-side-clearance: 16px;
--jl-composer-text-max-height: 240px;
}
/* ═══════════════════════════════════════════════════════════
框架:侧栏 | 中栏 | 右栏
═══════════════════════════════════════════════════════════ */
.frame {
display: grid;
grid-template-columns: 280px minmax(0, 1fr) 260px;
grid-template-rows: 100%;
height: 100%;
overflow: hidden;
background: var(--jl-alias-bg-base);
}
/*
窄屏:三栏竖排,页面滚动,轨迹的详情面板收起来。
★ **`grid-template-rows` 必须跟着改。**
上面 `.frame` 是「三列 × 一行」,行高 `100%`。这里只改列不改行的话,
变成「一列 × 三行」之后 **第一行仍然吃掉 100% 的高度**,后面两行塌成
**0**。
实测(2026-09-21,1024px):
side top=0 bottom=800 高=800 ← 左栏独占整个高度
center top=800 bottom=800 高=0 ← ★ 对话区完全看不见
aside top=800 bottom=828 高=28
也就是说**窗口窄于 1080px 时,这个界面用不了** —— 连标签都点不到
(它在一个高度为 0 的面板里)。修的时候顺带发现,不是用户报的那个,
但比那个严重。
*/
@media (max-width: 1080px) {
.frame {
grid-template-columns: minmax(0, 1fr);
/* 每行按内容,帧本身让页面滚 */
grid-template-rows: auto;
height: auto;
min-height: 100%;
}
/* 竖排之后每一栏要自己带高度 —— 否则对话栏会被内容撑成任意高 */
.pane.side {
max-height: 55vh;
}
.pane.center {
min-height: 85vh;
}
.pane.aside {
max-height: 55vh;
}
.details {
display: none;
}
}
.pane {
min-width: 0;
min-height: 0;
overflow: auto;
}
.pane.side {
/*
三段的列:工作区(固定)→ 会话列表(滚动)→ 图例(固定底部)。
以前这里是整栏一起滚,加了会话列表之后那样不行 —— 列表长起来会把
图例顶出屏幕,而图例是**钥匙**,读轨迹时要一直在。
*/
display: flex;
flex-direction: column;
overflow: hidden;
padding: 14px 12px;
background: var(--jl-specific-sidebar-fill);
border-right: 0.5px solid var(--jl-alias-border-l3);
}
/* ── 工作区 ───────────────────────────────────────────────── */
.ws-bar {
display: flex;
align-items: stretch;
gap: 4px;
flex: none;
}
.ws-current {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 7px;
padding: 6px 8px;
border: 0;
border-radius: var(--jl-radius-sm);
background: none;
text-align: left;
cursor: pointer;
transition: background-color 120ms ease;
}
.ws-current:hover,
.ws-current[aria-expanded='true'] {
background: var(--jl-alias-interactive-bg-hover);
}
/* 圆点只是个「已选」的记号,不用颜色编码状态 */
.ws-dot {
flex: none;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--jl-kind-decide-fg);
}
.ws-text {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 1px;
}
.ws-name {
font-size: var(--jl-font-size-sm);
font-weight: 600;
color: var(--jl-alias-label-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 路径要能看清尾段 —— 头和尾都有信息,所以中间截断 */
.ws-path {
font-family: var(--jl-font-mono);
font-size: 10px;
line-height: 13px;
color: var(--jl-alias-label-caption);
direction: rtl;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ws-caret {
flex: none;
font-size: 9px;
color: var(--jl-alias-label-caption);
}
.ws-add,
.sess-new {
flex: none;
width: 26px;
border: 0;
border-radius: var(--jl-radius-sm);
background: none;
color: var(--jl-alias-label-tertiary);
font-size: 15px;
line-height: 1;
cursor: pointer;
transition: background-color 120ms ease, color 120ms ease;
}
.ws-add:hover,
.sess-new:hover {
background: var(--jl-alias-interactive-bg-hover);
color: var(--jl-alias-label-primary);
}
/* 工作区切换菜单 */
.ws-menu {
flex: none;
margin-top: 4px;
padding: 4px;
border-radius: var(--jl-radius);
background: var(--jl-alias-bg-layer-1);
box-shadow: var(--jl-elevation-panel);
max-height: 240px;
overflow-y: auto;
}
.ws-menu[hidden] {
display: none;
}
.ws-item {
display: flex;
align-items: center;
gap: 2px;
border-radius: var(--jl-radius-sm);
}
.ws-item:hover {
background: var(--jl-alias-interactive-bg-hover);
}
.ws-item-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 1px;
padding: 6px 4px 6px 8px;
border: 0;
border-radius: var(--jl-radius-sm);
background: none;
text-align: left;
cursor: pointer;
}
/* 目录不在了 —— 灰掉并挂一句,不要等选中跑起来才报错 */
.ws-item.gone .ws-item-name,
.ws-item.gone .ws-item-path {
color: var(--jl-alias-label-caption);
}
.ws-item-gone {
font-size: 10px;
line-height: 14px;
color: var(--jl-alias-state-warn-label);
}
.ws-item-del {
flex: none;
width: 18px;
height: 18px;
margin-right: 4px;
border: 0;
border-radius: 4px;
background: none;
color: var(--jl-alias-label-caption);
font-size: 13px;
line-height: 1;
cursor: pointer;
opacity: 0;
}
.ws-item:hover .ws-item-del,
.ws-item-del:focus-visible {
opacity: 1;
}
.ws-item-del:hover {
background: var(--jl-alias-interactive-bg-hover-danger);
color: var(--jl-alias-state-error-primary);
}
.ws-item.on .ws-item-name {
color: var(--jl-kind-decide-fg);
}
.ws-item-name {
font-size: var(--jl-font-size-caption);
font-weight: 600;
color: var(--jl-alias-label-secondary);
}
.ws-item-path {
font-family: var(--jl-font-mono);
font-size: 10px;
color: var(--jl-alias-label-caption);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ws-empty {
padding: 8px;
font-size: var(--jl-font-size-caption);
color: var(--jl-alias-label-caption);
}
/* ── 会话列表 ─────────────────────────────────────────────── */
.sess-head {
flex: none;
display: flex;
align-items: center;
gap: 4px;
margin-top: 14px;
}
.sess-head .section-title {
flex: 1;
margin: 0;
}
.sess-list {
flex: 1;
min-height: 0;
overflow-y: auto;
margin-top: 4px;
}
.sess-item {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-radius: var(--jl-radius-sm);
cursor: pointer;
transition: background-color 120ms ease;
}
.sess-item:hover {
background: var(--jl-alias-interactive-bg-hover);
}
.sess-item.on {
background: var(--jl-alias-state-business-tertiary);
}
.sess-body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 1px;
}
.sess-title {
font-size: var(--jl-font-size-caption);
color: var(--jl-alias-label-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sess-item.on .sess-title {
color: var(--jl-alias-state-business-primary);
font-weight: 600;
}
.sess-meta {
font-family: var(--jl-font-mono);
font-size: 10px;
color: var(--jl-alias-label-caption);
}
/*
「其他 N 个会话」那一组。
它们属于别的工作区(或者目录没被登记)。**不删掉是有意的** ——
那里面是真的聊过的内容,只是不在当前这个目录下。藏起来比混在一起更糟。
*/
.sess-more {
display: block;
width: 100%;
margin-top: 6px;
padding: 5px 8px;
border: 0;
border-top: 0.5px solid var(--jl-alias-border-l1);
border-radius: 0;
background: none;
color: var(--jl-alias-label-caption);
font-size: 11px;
text-align: left;
cursor: pointer;
}
.sess-more:hover {
color: var(--jl-alias-label-secondary);
}
/* 删除按钮平时不出现 —— 列表是拿来点的,不是拿来删的 */
.sess-del {
flex: none;
width: 18px;
height: 18px;
border: 0;
border-radius: 4px;
background: none;
color: var(--jl-alias-label-caption);
font-size: 13px;
line-height: 1;
cursor: pointer;
opacity: 0;
}
.sess-item:hover .sess-del,
.sess-del:focus-visible {
opacity: 1;
}
.sess-del:hover {
background: var(--jl-alias-interactive-bg-hover-danger);
color: var(--jl-alias-state-error-primary);
}
/* ── 规格页 ───────────────────────────────────────────────── */
.spec-pane {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 16px calc(var(--jl-composer-side-clearance) + 16px);
}
/* ── 选目录对话框 ─────────────────────────────────────────── */
.picker-mask {
position: fixed;
inset: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: center;
background: var(--jl-alias-bg-mask-1);
}
.picker-mask[hidden] {
display: none;
}
.picker {
display: flex;
flex-direction: column;
width: min(560px, calc(100vw - 48px));
max-height: min(560px, calc(100vh - 96px));
border-radius: var(--jl-radius);
background: var(--jl-alias-bg-layer-1);
box-shadow: var(--jl-elevation-prominent);
overflow: hidden;
}
.picker-head {
flex: none;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 14px;
border-bottom: 0.5px solid var(--jl-alias-border-l1);
font-size: var(--jl-font-size);
font-weight: 600;
color: var(--jl-alias-label-primary);
}
.picker-x {
width: 24px;
height: 24px;
border: 0;
border-radius: var(--jl-radius-sm);
background: none;
color: var(--jl-alias-label-tertiary);
font-size: 16px;
line-height: 1;
cursor: pointer;
}
.picker-x:hover {
background: var(--jl-alias-interactive-bg-hover);
}
/* 面包屑:每一节都是跳转目标 —— 它是导航,不是装饰 */
.picker-crumbs {
flex: none;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 2px;
padding: 8px 14px;
border-bottom: 0.5px solid var(--jl-alias-border-l1);
}
.crumb {
padding: 2px 5px;
border: 0;
border-radius: 4px;
background: none;
color: var(--jl-alias-label-tertiary);
font-family: var(--jl-font-mono);
font-size: 11px;
cursor: pointer;
}
.crumb:hover {
background: var(--jl-alias-interactive-bg-hover);
color: var(--jl-alias-label-primary);
}
.crumb.last {
color: var(--jl-alias-label-primary);
font-weight: 600;
}
.crumb-sep {
color: var(--jl-alias-label-caption);
font-size: 10px;
}
.picker-entries {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 6px;
}
.entry {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 6px 8px;
border: 0;
border-radius: var(--jl-radius-sm);
background: none;
text-align: left;
cursor: pointer;
}
.entry:hover {
background: var(--jl-alias-interactive-bg-hover);
}
.entry-icon {
flex: none;
color: var(--jl-alias-label-caption);
font-size: 12px;
}
.entry-name {
flex: 1;
min-width: 0;
font-size: var(--jl-font-size-caption);
color: var(--jl-alias-label-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.entry.hidden-dir .entry-name {
color: var(--jl-alias-label-caption);
}
.picker-note {
flex: none;
padding: 0 14px 8px;
font-size: 11px;
line-height: 15px;
color: var(--jl-alias-label-caption);
}
/* 警告是接在路径后面的第二句,不是一个替代它的东西 */
.picker-note .warn {
color: var(--jl-alias-state-warn-label);
}
.picker-note.err {
color: var(--jl-alias-state-error-primary);
}
.picker-foot {
flex: none;
display: flex;
gap: 6px;
padding: 10px 14px;
border-top: 0.5px solid var(--jl-alias-border-l1);
}
.picker-new {
flex: 1;
min-width: 0;
padding: 6px 8px;
border: 1px solid var(--jl-alias-border-l3);
border-radius: var(--jl-radius-sm);
background: var(--jl-alias-bg-base);
color: var(--jl-alias-label-primary);
font-family: inherit;
font-size: var(--jl-font-size-caption);
}
.picker-mk,
.picker-pick {
flex: none;
padding: 6px 12px;
border: 0;
border-radius: var(--jl-radius-sm);
font-size: var(--jl-font-size-caption);
cursor: pointer;
}
.picker-mk {
background: var(--jl-alias-interactive-bg-hover);
color: var(--jl-alias-label-secondary);
}
.picker-pick {
background: var(--jl-alias-state-business-primary);
color: var(--jl-alias-label-primary-inverted);
font-weight: 600;
}
.pane.aside {
overflow: hidden auto;
padding: 14px 12px;
background: var(--jl-specific-sidebar-fill);
border-left: 0.5px solid var(--jl-alias-border-l3);
}
/* 中栏自己管滚动:头部固定,视图区滚动,输入卡钉在底部 */
.pane.center {
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ═══════════════════════════════════════════════════════════
会话头部:tab 在左,计数在右
DSH 里没有全局顶栏 —— 头部属于中栏的占用者。计数放这里而不是
单独一行,因为它描述的是**这次会话**,不是整个应用。
═══════════════════════════════════════════════════════════ */
.conv-header {
flex: none;
display: flex;
align-items: center;
gap: 8px;
padding: 0 12px 0 16px;
border-bottom: 0.5px solid var(--jl-alias-border-l2);
background: var(--jl-alias-bg-base);
}
.tabs {
display: flex;
align-items: center;
gap: 2px;
}
.tab {
appearance: none;
border: 0;
background: none;
padding: 12px 10px 10px;
margin-bottom: -0.5px;
border-bottom: 2px solid transparent;
color: var(--jl-alias-label-tertiary);
font: inherit;
font-size: var(--jl-font-size-sm);
cursor: pointer;
transition: color var(--jl-duration-fast) var(--jl-ease);
}
.tab:hover {
color: var(--jl-alias-label-primary);
}
.tab[aria-selected='true'] {
color: var(--jl-alias-label-primary);
font-weight: 500;
border-bottom-color: var(--jl-alias-brand-primary);
}
.tab:focus-visible {
outline: 1.5px solid var(--jl-alias-button-info-fill);
outline-offset: -2px;
border-radius: var(--jl-radius-sm);
}
.header-right {
margin-left: auto;
display: flex;
align-items: center;
gap: 14px;
}
/* 计数:一眼看出判定多少次、模型多少次 */
.tally {
display: flex;
gap: 12px;
align-items: baseline;
}
.tally-item {
display: flex;
align-items: baseline;
gap: 4px;
font-size: var(--jl-font-size-caption);
line-height: var(--jl-line-caption);
color: var(--jl-alias-label-tertiary);
font-variant-numeric: tabular-nums;
}
.tally-item b {
font-family: var(--jl-font-mono);
font-size: 13px;
font-weight: 600;
color: var(--jl-alias-label-primary);
}
/* 四个计数各用自己的语义色 —— 和轨迹里卡片的左边框是同一套 */
.tally-item.decide b {
color: var(--jl-kind-decide-fg);
}
.tally-item.rule b {
color: var(--jl-alias-label-tertiary);
}
.tally-item.tool b {
color: var(--jl-kind-tool-fg);
}
.tally-item.model b {
color: var(--jl-kind-model-fg);
}
/* ═══════════════════════════════════════════════════════════
视图容器
═══════════════════════════════════════════════════════════ */
.view {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.view[hidden] {
display: none;
}
/* ═══════════════════════════════════════════════════════════
对话
═══════════════════════════════════════════════════════════ */
.stream {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 16px calc(var(--jl-composer-side-clearance) + 16px);
}
/* 消息列居中 —— 和输入卡共享同一条轴(输入卡宽 32px,两边各让 16px) */
.stream-inner {
max-width: var(--jl-chat-content-width);
width: 100%;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 16px;
}
/*
滚动区的定位壳。存在的唯一理由是给两个悬浮件一个**不滚动**的参照:
它们要是放进 `.stream` 里,就会和内容一起被滚走。
*/
.stream-holder {
position: relative;
flex: 1;
min-height: 0;
display: flex;
}
/* ── 回到最新 ─────────────────────────────────────────────── */
.to-bottom-slot {
position: absolute;
right: 20px;
bottom: 16px;
z-index: 8;
/* 槽位不接指针,只有按钮接 —— 否则它会在正文右下角挡出一块死区 */
pointer-events: none;
}
.to-bottom {
pointer-events: auto;
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 50%;
background: var(--jl-alias-bg-base);
box-shadow: var(--jl-elevation-panel);
color: var(--jl-alias-label-secondary);
font-size: 15px;
line-height: 1;
cursor: pointer;
transition: background-color 120ms ease, color 120ms ease;
}
.to-bottom:hover {
background: var(--jl-alias-interactive-bg-hover);
color: var(--jl-alias-label-primary);
}
/* hidden 是属性选择器最低优先级,所以要显式让位给上面的 display:flex */
.to-bottom[hidden] {
display: none;
}
/* ── 跳转轨 ───────────────────────────────────────────────── */
/*
轨道本身不接指针(正文的右侧留白要能正常选中文字),
只有刻度接 —— 这和 DSH 的做法一致。
*/
.turn-rail {
position: absolute;
/*
让开滚动条,再留 6px。宽度**读 token 不写死** —— 这正是
--jl-scrollbar-width 注释里说的那个用途(「贴着占位滚动条的表面读它,
而不是硬编码这个数」)。轨道比滚动条宽 28px,压上去的话点滚动条左沿
会打到刻度上。
*/
right: calc(var(--jl-scrollbar-width) + 6px);
top: 50%;
transform: translateY(-50%);
z-index: 7;
width: 28px;
height: min(70%, 420px);
pointer-events: none;
}
.turn-rail[hidden] {
display: none;
}
.turn-rail-scroller {
position: relative;
width: 100%;
height: 100%;
}
/* 一个刻度 = 一次用户输入。绝对定位,top 按它在内容里的比例算 */
.turn-mark {
position: absolute;
left: 0;
width: 28px;
height: 10px;
display: flex;
align-items: center;
justify-content: center;
transform: translateY(-50%);
pointer-events: auto;
padding: 0;
border: 0;
background: none;
cursor: pointer;
}
.turn-mark::before {
content: '';
width: 12px;
height: 2px;
border-radius: 1px;
background: var(--jl-alias-border-l4);
transition: width 120ms ease, background-color 120ms ease;
}
.turn-mark:hover::before,
.turn-mark.active::before {
width: 18px;
background: var(--jl-alias-label-tertiary);
}
/* 用户消息:右对齐的胶囊。**只有用户消息有气泡** ——
助手消息是背景上的正文,这是 DSH 界面的主要视觉特征。 */
.msg-user {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 6px;
}
.bubble {
max-width: min(calc(var(--jl-chat-content-width) * 0.702), 82%);
padding: 10px 16px;
border-radius: 22px;
background: var(--jl-specific-bubble);
color: var(--jl-alias-label-primary);
font-size: var(--jl-font-size);
line-height: var(--jl-line);
white-space: pre-wrap;
word-break: break-word;
}
.msg-assistant {
display: flex;
flex-direction: column;
gap: 8px;
max-width: 100%;
}
/* 助手正文:没有气泡,直接落在背景上 */
.answer {
/*
⚠️ **不再是 `white-space: pre-wrap`。**
那是回答还是纯文本时留下的:靠它保住换行。现在回答走
`renderMarkdown`(`markdown.js`)渲染成块级元素 —— 换行由 `<p>` /
`<li>` / `<pre>` 表达,再叠一层 `pre-wrap` 会在每个块内部
多留一份空白。
没有 markdown 的纯字符串(比如「(没有回答)」)照样正常显示。
*/
overflow-wrap: anywhere;
font-size: var(--jl-font-size);
line-height: var(--jl-line);
}
/* ── 回答里的 markdown ────────────────────────────────────── */
.answer > :first-child {
margin-top: 0;
}
.answer > :last-child {
margin-bottom: 0;
}
.md-p {
margin: 0 0 8px;
}
.md-h {
margin: 14px 0 6px;
line-height: 1.35;
font-weight: 650;
color: var(--jl-alias-label-primary);
}
/* 缩小一级:回答里的 `#` 不该和界面的标题一样大 */
.answer h1.md-h { font-size: 17px; }
.answer h2.md-h { font-size: 15px; }
.answer h3.md-h { font-size: 14px; }
.answer h4.md-h,
.answer h5.md-h,
.answer h6.md-h { font-size: 13px; }
.md-ul,
.md-ol {
margin: 0 0 8px;
padding-left: 20px;
}
.md-ul li,
.md-ol li {
margin: 2px 0;
}