@gis_victory/ai-chat 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,839 @@
1
+
2
+ /* ========== Variables ========== */
3
+ .ai-chat-panel {
4
+ --chat-bg: #ffffff;
5
+ --chat-bg-hover: #f5f4f1;
6
+ --chat-text: #1a1a1a;
7
+ --chat-text-secondary: #6b6b6b;
8
+ --chat-text-tertiary: #9a9a9a;
9
+ --chat-border: rgba(0, 0, 0, 0.08);
10
+ --chat-border-hover: rgba(0, 0, 0, 0.14);
11
+ --chat-accent: #4f46e5;
12
+ --chat-accent-hover: #4338ca;
13
+ --chat-accent-light: #eef2ff;
14
+ --chat-success: #10b981;
15
+ --chat-error: #ef4444;
16
+ --chat-radius: 16px;
17
+ --chat-radius-sm: 10px;
18
+ --chat-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
19
+ --chat-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
20
+ --chat-spring: 350ms cubic-bezier(0.16, 1, 0.3, 1);
21
+ }
22
+
23
+ /* ========== FAB Button ========== */
24
+ .ai-chat-fab {
25
+ position: fixed;
26
+ z-index: 1000;
27
+ width: 56px;
28
+ height: 56px;
29
+ border-radius: 50%;
30
+ border: none;
31
+ cursor: pointer;
32
+ background: var(--chat-accent);
33
+ color: #fff;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
38
+ transition: all var(--chat-transition);
39
+ }
40
+ .ai-chat-fab:hover {
41
+ transform: scale(1.05);
42
+ box-shadow: 0 6px 28px rgba(79, 70, 229, 0.4);
43
+ }
44
+ .ai-chat-fab:active {
45
+ transform: scale(0.97);
46
+ }
47
+ .ai-chat-fab.is-open {
48
+ background: var(--chat-text-secondary);
49
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
50
+ }
51
+ .fab-icon {
52
+ width: 26px;
53
+ height: 26px;
54
+ transition: transform 300ms ease;
55
+ }
56
+ .fab-ring {
57
+ position: absolute;
58
+ inset: -6px;
59
+ border-radius: 50%;
60
+ border: 2px solid rgba(79, 70, 229, 0.15);
61
+ animation: ring-pulse 2.5s ease-in-out infinite;
62
+ pointer-events: none;
63
+ }
64
+ @keyframes ring-pulse {
65
+ 0%,
66
+ 100% {
67
+ transform: scale(1);
68
+ opacity: 0.6;
69
+ }
70
+ 50% {
71
+ transform: scale(1.15);
72
+ opacity: 0;
73
+ }
74
+ }
75
+
76
+ /* ========== Chat Container ========== */
77
+ .ai-chat-container {
78
+ position: fixed;
79
+ z-index: 999;
80
+ border-radius: var(--chat-radius);
81
+ overflow: hidden;
82
+ background: var(--chat-bg);
83
+ border: 1px solid var(--chat-border);
84
+ box-shadow: var(--chat-shadow);
85
+ display: flex;
86
+ flex-direction: column;
87
+ transform-origin: bottom right;
88
+ height: 80vh; /* 固定高度,避免内容撑开 */
89
+ scrollbar-width: none;
90
+ -ms-overflow-style: none;
91
+ }
92
+ .ai-chat-container::-webkit-scrollbar {
93
+ display: none;
94
+ }
95
+ .ai-chat-container[data-position*='left'] {
96
+ transform-origin: bottom left;
97
+ }
98
+
99
+ /* chat-container-inner 需要是 flex 容器,聊天区域才能正常滚动 */
100
+ .chat-container-inner {
101
+ display: flex;
102
+ flex-direction: column;
103
+ min-height: 0;
104
+ overflow: hidden;
105
+ flex: 1;
106
+ scrollbar-width: none;
107
+ -ms-overflow-style: none;
108
+ }
109
+ .chat-container-inner::-webkit-scrollbar {
110
+ display: none;
111
+ }
112
+
113
+ /* ========== Header ========== */
114
+ .chat-header {
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: space-between;
118
+ padding: 14px 16px 8px;
119
+ flex-shrink: 0;
120
+ background: var(--chat-bg);
121
+ }
122
+ .header-left {
123
+ display: flex;
124
+ align-items: center;
125
+ gap: 10px;
126
+ }
127
+ .header-avatar {
128
+ width: 34px;
129
+ height: 34px;
130
+ border-radius: var(--chat-radius-sm);
131
+ background: linear-gradient(135deg, var(--chat-accent), #818cf8);
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: center;
135
+ flex-shrink: 0;
136
+ color: #fff;
137
+ overflow: hidden;
138
+ }
139
+ .header-avatar svg {
140
+ width: 18px;
141
+ height: 18px;
142
+ }
143
+ .avatar-img {
144
+ width: 100%;
145
+ height: 100%;
146
+ object-fit: cover;
147
+ }
148
+ .header-info {
149
+ display: flex;
150
+ flex-direction: column;
151
+ gap: 2px;
152
+ }
153
+ .header-title {
154
+ font-size: 14px;
155
+ font-weight: 600;
156
+ color: var(--chat-text);
157
+ line-height: 1.2;
158
+ }
159
+ .header-status {
160
+ font-size: 12px;
161
+ color: var(--chat-success);
162
+ display: flex;
163
+ align-items: center;
164
+ gap: 4px;
165
+ }
166
+ .status-dot {
167
+ width: 6px;
168
+ height: 6px;
169
+ border-radius: 50%;
170
+ background: var(--chat-success);
171
+ display: inline-block;
172
+ }
173
+ .header-actions {
174
+ display: flex;
175
+ gap: 2px;
176
+ }
177
+ .icon-btn {
178
+ width: 32px;
179
+ height: 32px;
180
+ border-radius: 8px;
181
+ border: none;
182
+ cursor: pointer;
183
+ background: transparent;
184
+ color: var(--chat-text-secondary);
185
+ display: flex;
186
+ align-items: center;
187
+ justify-content: center;
188
+ transition: all var(--chat-transition);
189
+ }
190
+ .icon-btn:hover {
191
+ background: var(--chat-bg-hover);
192
+ color: var(--chat-text);
193
+ }
194
+ .icon-btn svg {
195
+ width: 16px;
196
+ height: 16px;
197
+ }
198
+
199
+ /* ========== Skill Tabs ========== */
200
+ .skill-tabs {
201
+ display: flex;
202
+ gap: 4px;
203
+ padding: 8px 16px 12px;
204
+ flex-shrink: 0;
205
+ overflow-x: auto;
206
+ scrollbar-width: none;
207
+ align-items: center;
208
+ border-bottom: 1px solid var(--chat-border);
209
+ }
210
+ .skill-tabs::-webkit-scrollbar {
211
+ display: none;
212
+ }
213
+ .skill-tab {
214
+ display: inline-flex;
215
+ align-items: center;
216
+ gap: 6px;
217
+ padding: 8px 14px;
218
+ border-radius: 8px;
219
+ border: none;
220
+ cursor: pointer;
221
+ background: transparent;
222
+ color: var(--chat-text-secondary);
223
+ font-size: 13px;
224
+ font-family: inherit;
225
+ font-weight: 500;
226
+ white-space: nowrap;
227
+ position: relative;
228
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
229
+ }
230
+ .skill-tab:hover {
231
+ background: var(--chat-bg-hover);
232
+ color: var(--chat-text-secondary);
233
+ }
234
+ .skill-tab.active {
235
+ background: var(--chat-accent-light);
236
+ color: var(--chat-accent);
237
+ font-weight: 600;
238
+ }
239
+ .skill-tab.active .skill-icon {
240
+ transform: scale(1.1);
241
+ }
242
+ .skill-tab::after {
243
+ content: '';
244
+ position: absolute;
245
+ bottom: -2px;
246
+ left: 50%;
247
+ width: 0;
248
+ height: 2.5px;
249
+ border-radius: 2px;
250
+ background: var(--chat-accent);
251
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
252
+ transform: translateX(-50%);
253
+ }
254
+ .skill-tab.active::after {
255
+ width: 20px;
256
+ }
257
+ .skill-icon {
258
+ font-size: 16px;
259
+ display: inline-block;
260
+ transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
261
+ }
262
+
263
+ /* ========== Chat Body ========== */
264
+ .chat-body {
265
+ flex: 1;
266
+ min-height: 0;
267
+ overflow: hidden;
268
+ display: flex;
269
+ flex-direction: column;
270
+ padding: 0 25px;
271
+ /* 用于遮挡滚动条上下箭头 */
272
+ position: relative;
273
+ }
274
+ .chat-body :deep(.t-chat) {
275
+ flex: 1;
276
+ display: flex;
277
+ flex-direction: column;
278
+ height: 100%;
279
+ /* 消息较少时靠下对齐,符合聊天习惯 */
280
+ justify-content: flex-end;
281
+ }
282
+ .chat-body :deep(.t-chat__list) {
283
+ flex: 1;
284
+ overflow-y: auto;
285
+ overflow-x: hidden;
286
+ padding: 16px 0 16px 0;
287
+ /* 让滚动条紧贴右边,内容保留右侧内边距 */
288
+ margin-right: -25px;
289
+ padding-right: 25px;
290
+ /* Firefox:极细滚动条,轨道完全透明 */
291
+ scrollbar-width: thin;
292
+ scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
293
+ }
294
+
295
+ /* WebKit:滚动条宽度 6px,完全隐藏导轨 */
296
+ .chat-body :deep(.t-chat__list::-webkit-scrollbar) {
297
+ width: 6px;
298
+ background: transparent;
299
+ }
300
+
301
+
302
+ /* 隐藏滚动条上下箭头 */
303
+ .chat-body :deep(.t-chat__list::-webkit-scrollbar-button) {
304
+ width: 0;
305
+ height: 0;
306
+ display: none;
307
+ }
308
+
309
+ /* 浮动滚动条滑块 */
310
+ .chat-body :deep(.t-chat__list::-webkit-scrollbar-thumb) {
311
+ background: rgba(0, 0, 0, 0.15) !important;
312
+ border-radius: 3px !important;
313
+ border: none !important;
314
+ background-clip: border-box !important;
315
+ /* 让滑块看起来是浮动的 */
316
+ min-height: 40px;
317
+ }
318
+
319
+ /* 鼠标悬停时滑块颜色加深 */
320
+ .chat-body :deep(.t-chat__list:hover::-webkit-scrollbar-thumb) {
321
+ background: rgba(0, 0, 0, 0.3) !important;
322
+ }
323
+
324
+ /* 滑块激活状态 */
325
+ .chat-body :deep(.t-chat__list::-webkit-scrollbar-thumb:active) {
326
+ background: rgba(0, 0, 0, 0.4) !important;
327
+ }
328
+
329
+ /* 隐藏 TDesign Chat 自带的"回到底部"按钮(带箭头图标) */
330
+ .chat-body :deep(.t-chat__to-bottom) {
331
+ display: none !important;
332
+ }
333
+
334
+ /* ========== Message Avatars ========== */
335
+ .msg-avatar {
336
+ width: 30px;
337
+ height: 30px;
338
+ border-radius: 8px;
339
+ display: flex;
340
+ align-items: center;
341
+ justify-content: center;
342
+ overflow: hidden;
343
+ flex-shrink: 0;
344
+ }
345
+ .msg-avatar.assistant {
346
+ background: var(--chat-accent-light);
347
+ color: var(--chat-accent);
348
+ }
349
+ .msg-avatar.assistant svg {
350
+ width: 16px;
351
+ height: 16px;
352
+ }
353
+ .msg-avatar.user {
354
+ background: var(--chat-bg-hover);
355
+ color: var(--chat-text-secondary);
356
+ }
357
+ .msg-avatar.user svg {
358
+ width: 14px;
359
+ height: 14px;
360
+ }
361
+
362
+ /* ========== Empty State ========== */
363
+ .empty-state {
364
+ display: flex;
365
+ flex-direction: column;
366
+ align-items: center;
367
+ justify-content: center;
368
+ padding: 40px 20px;
369
+ text-align: center;
370
+ flex: 1; /* 占满剩余空间,在固定高度弹窗中居中 */
371
+ width: 100%;
372
+ min-height: 0; /* 允许在固定高度下收缩 */
373
+ }
374
+ .empty-icon {
375
+ width: 56px;
376
+ height: 56px;
377
+ border-radius: var(--chat-radius);
378
+ background: var(--chat-accent-light);
379
+ color: var(--chat-accent);
380
+ display: flex;
381
+ align-items: center;
382
+ justify-content: center;
383
+ margin-bottom: 16px;
384
+ }
385
+ .empty-icon svg {
386
+ width: 24px;
387
+ height: 24px;
388
+ }
389
+ .empty-title {
390
+ font-size: 14px;
391
+ font-weight: 600;
392
+ color: var(--chat-text);
393
+ margin-bottom: 4px;
394
+ }
395
+ .empty-desc {
396
+ font-size: 12px;
397
+ color: var(--chat-text-tertiary);
398
+ max-width: 220px;
399
+ line-height: 1.5;
400
+ }
401
+ .empty-suggestions {
402
+ display: flex;
403
+ flex-direction: column;
404
+ gap: 6px;
405
+ margin-top: 20px;
406
+ width: 100%;
407
+ max-width: 280px;
408
+ }
409
+ .suggestion-btn {
410
+ padding: 10px 14px;
411
+ border-radius: var(--chat-radius-sm);
412
+ border: 1px solid var(--chat-border);
413
+ background: var(--chat-bg);
414
+ color: var(--chat-text-secondary);
415
+ cursor: pointer;
416
+ font-family: inherit;
417
+ font-size: 13px;
418
+ text-align: center;
419
+ transition: all var(--chat-transition);
420
+ line-height: 1.4;
421
+ }
422
+ .suggestion-btn:hover {
423
+ border-color: var(--chat-accent);
424
+ color: var(--chat-accent);
425
+ background: var(--chat-accent-light);
426
+ }
427
+
428
+ /* ========== Footer / Input ========== */
429
+ .chat-footer {
430
+ padding: 12px 16px;
431
+ border-top: 1px solid var(--chat-border);
432
+ flex-shrink: 0;
433
+ background: var(--chat-bg);
434
+ }
435
+
436
+ /* ========== History Panel ========== */
437
+ .history-overlay {
438
+ position: absolute;
439
+ inset: 0;
440
+ z-index: 9;
441
+ background: rgba(0, 0, 0, 0.15);
442
+ backdrop-filter: blur(2px);
443
+ }
444
+ .history-panel {
445
+ position: absolute;
446
+ top: 0;
447
+ left: 0;
448
+ width: 100%;
449
+ height: 100%;
450
+ z-index: 10;
451
+ background: var(--chat-bg);
452
+ display: flex;
453
+ flex-direction: column;
454
+ }
455
+ .history-header {
456
+ display: flex;
457
+ align-items: center;
458
+ justify-content: space-between;
459
+ padding: 16px 16px 8px;
460
+ flex-shrink: 0;
461
+ }
462
+ .history-header h3 {
463
+ font-size: 14px;
464
+ font-weight: 600;
465
+ }
466
+ .history-list {
467
+ flex: 1;
468
+ overflow-y: auto;
469
+ padding: 6px;
470
+ scrollbar-width: none;
471
+ }
472
+ .history-list::-webkit-scrollbar {
473
+ display: none;
474
+ }
475
+ .history-item {
476
+ display: flex;
477
+ align-items: center;
478
+ gap: 10px;
479
+ padding: 10px 12px;
480
+ border-radius: var(--chat-radius-sm);
481
+ cursor: pointer;
482
+ transition: all var(--chat-transition);
483
+ }
484
+ .history-item:hover {
485
+ background: var(--chat-bg-hover);
486
+ }
487
+ .history-item.active {
488
+ background: var(--chat-accent-light);
489
+ }
490
+ .history-item-icon {
491
+ width: 32px;
492
+ height: 32px;
493
+ border-radius: 8px;
494
+ background: var(--chat-bg-hover);
495
+ display: flex;
496
+ align-items: center;
497
+ justify-content: center;
498
+ flex-shrink: 0;
499
+ }
500
+ .history-item.active .history-item-icon {
501
+ background: rgba(79, 70, 229, 0.12);
502
+ }
503
+ .history-item-icon svg {
504
+ width: 14px;
505
+ height: 14px;
506
+ color: var(--chat-text-secondary);
507
+ }
508
+ .history-item.active .history-item-icon svg {
509
+ color: var(--chat-accent);
510
+ }
511
+ .history-item-info {
512
+ flex: 1;
513
+ min-width: 0;
514
+ }
515
+ .history-item-title {
516
+ font-size: 13px;
517
+ font-weight: 500;
518
+ color: var(--chat-text);
519
+ white-space: nowrap;
520
+ overflow: hidden;
521
+ text-overflow: ellipsis;
522
+ }
523
+ .history-item.active .history-item-title {
524
+ color: var(--chat-accent);
525
+ }
526
+ .history-item-meta {
527
+ font-size: 12px;
528
+ color: var(--chat-text-tertiary);
529
+ }
530
+ .history-item-delete {
531
+ width: 28px;
532
+ height: 28px;
533
+ border-radius: 8px;
534
+ border: none;
535
+ cursor: pointer;
536
+ background: transparent;
537
+ color: var(--chat-text-tertiary);
538
+ display: flex;
539
+ align-items: center;
540
+ justify-content: center;
541
+ flex-shrink: 0;
542
+ opacity: 0;
543
+ transition: all var(--chat-transition);
544
+ }
545
+ .history-item:hover .history-item-delete {
546
+ opacity: 1;
547
+ }
548
+ .history-item-delete:hover {
549
+ background: var(--chat-error-light);
550
+ color: var(--chat-error);
551
+ }
552
+ .history-item-delete svg {
553
+ width: 14px;
554
+ height: 14px;
555
+ }
556
+ .history-empty {
557
+ padding: 40px 16px;
558
+ text-align: center;
559
+ color: var(--chat-text-tertiary);
560
+ font-size: 13px;
561
+ }
562
+ .history-footer {
563
+ padding: 10px 16px;
564
+ border-top: 1px solid var(--chat-border);
565
+ flex-shrink: 0;
566
+ }
567
+ .clear-all-btn {
568
+ width: 100%;
569
+ padding: 9px;
570
+ border-radius: var(--chat-radius-sm);
571
+ border: 1px solid rgba(239, 68, 68, 0.2);
572
+ background: #fef2f2;
573
+ color: var(--chat-error);
574
+ cursor: pointer;
575
+ font-family: inherit;
576
+ font-size: 13px;
577
+ font-weight: 500;
578
+ display: flex;
579
+ align-items: center;
580
+ justify-content: center;
581
+ gap: 6px;
582
+ transition: all var(--chat-transition);
583
+ }
584
+ .clear-all-btn:hover {
585
+ background: #fee2e2;
586
+ border-color: rgba(239, 68, 68, 0.3);
587
+ }
588
+ .clear-all-btn svg {
589
+ width: 14px;
590
+ height: 14px;
591
+ }
592
+
593
+ /* ========== Confirm Dialog ========== */
594
+ .confirm-overlay {
595
+ position: absolute;
596
+ inset: 0;
597
+ z-index: 30;
598
+ background: rgba(0, 0, 0, 0.25);
599
+ backdrop-filter: blur(2px);
600
+ display: flex;
601
+ align-items: center;
602
+ justify-content: center;
603
+ }
604
+ .confirm-dialog {
605
+ background: var(--chat-bg);
606
+ border-radius: var(--chat-radius);
607
+ padding: 20px;
608
+ width: 260px;
609
+ text-align: center;
610
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
611
+ }
612
+ .confirm-dialog h4 {
613
+ font-size: 14px;
614
+ font-weight: 600;
615
+ margin-bottom: 6px;
616
+ }
617
+ .confirm-dialog p {
618
+ font-size: 13px;
619
+ color: var(--chat-text-secondary);
620
+ margin-bottom: 16px;
621
+ line-height: 1.5;
622
+ }
623
+ .confirm-actions {
624
+ display: flex;
625
+ gap: 8px;
626
+ }
627
+ .confirm-actions button {
628
+ flex: 1;
629
+ padding: 8px 0;
630
+ border-radius: 8px;
631
+ border: none;
632
+ cursor: pointer;
633
+ font-family: inherit;
634
+ font-size: 13px;
635
+ font-weight: 500;
636
+ transition: all var(--chat-transition);
637
+ }
638
+ .confirm-cancel {
639
+ background: var(--chat-bg-hover);
640
+ color: var(--chat-text-secondary);
641
+ }
642
+ .confirm-cancel:hover {
643
+ background: var(--chat-border-hover);
644
+ }
645
+ .confirm-ok {
646
+ background: var(--chat-error);
647
+ color: #fff;
648
+ }
649
+ .confirm-ok:hover {
650
+ opacity: 0.9;
651
+ }
652
+
653
+ /* ========== Transitions ========== */
654
+ .chat-slide-enter-active {
655
+ transition: all var(--chat-spring);
656
+ }
657
+ .chat-slide-leave-active {
658
+ transition: all 250ms cubic-bezier(0.4, 0, 1, 1);
659
+ }
660
+ .chat-slide-enter-from {
661
+ opacity: 0;
662
+ transform: scale(0.92) translateY(20px);
663
+ }
664
+ .chat-slide-leave-to {
665
+ opacity: 0;
666
+ transform: scale(0.92) translateY(20px);
667
+ }
668
+ .overlay-fade-enter-active,
669
+ .overlay-fade-leave-active {
670
+ transition: opacity 300ms ease;
671
+ }
672
+ .overlay-fade-enter-from,
673
+ .overlay-fade-leave-to {
674
+ opacity: 0;
675
+ }
676
+ .history-slide-enter-active {
677
+ transition: transform var(--chat-spring);
678
+ }
679
+ .history-slide-leave-active {
680
+ transition: transform 250ms cubic-bezier(0.4, 0, 1, 1);
681
+ }
682
+ .history-slide-enter-from,
683
+ .history-slide-leave-to {
684
+ transform: translateX(-100%);
685
+ }
686
+
687
+ /* ========== Page Mode Styles ========== */
688
+ .ai-chat-panel--page {
689
+ position: fixed;
690
+ inset: 0;
691
+ z-index: 100;
692
+ background: var(--chat-bg);
693
+ display: flex;
694
+ flex-direction: column;
695
+ }
696
+ .ai-chat-panel--page .ai-chat-container {
697
+ position: static;
698
+ flex: 1;
699
+ width: 100%;
700
+ height: auto;
701
+ max-width: none;
702
+ max-height: none;
703
+ border-radius: 0;
704
+ box-shadow: none;
705
+ border: none;
706
+ display: flex;
707
+ flex-direction: row;
708
+ }
709
+ .ai-chat-panel--page .chat-container-inner {
710
+ flex: 1;
711
+ display: flex;
712
+ flex-direction: column;
713
+ min-width: 0;
714
+ border-left: 1px solid var(--chat-border);
715
+ }
716
+ .ai-chat-panel--page .history-wrapper {
717
+ width: 280px;
718
+ flex-shrink: 0;
719
+ height: 100%;
720
+ display: flex;
721
+ flex-direction: column;
722
+ background: var(--chat-bg);
723
+ border-right: 1px solid var(--chat-border);
724
+ }
725
+ .ai-chat-panel--page .history-wrapper--page {
726
+ order: -1;
727
+ }
728
+ .ai-chat-panel--page .history-panel {
729
+ position: static;
730
+ width: 100%;
731
+ height: 100%;
732
+ border-radius: 0;
733
+ flex: 1;
734
+ display: flex;
735
+ flex-direction: column;
736
+ }
737
+ .ai-chat-panel--page .history-header {
738
+ position: sticky;
739
+ top: 0;
740
+ background: var(--chat-bg);
741
+ z-index: 1;
742
+ flex-shrink: 0;
743
+ }
744
+ .ai-chat-panel--page .history-list {
745
+ flex: 1;
746
+ overflow-y: auto;
747
+ scrollbar-width: none;
748
+ }
749
+ .ai-chat-panel--page .history-list::-webkit-scrollbar {
750
+ display: none;
751
+ }
752
+ .ai-chat-panel--page .chat-header {
753
+ position: sticky;
754
+ top: 0;
755
+ z-index: 1;
756
+ }
757
+ .ai-chat-panel--page .chat-body {
758
+ flex: 1;
759
+ min-height: 0;
760
+ }
761
+ .ai-chat-panel--page .history-footer {
762
+ flex-shrink: 0;
763
+ padding: 0 16px 16px;
764
+ }
765
+ .ai-chat-panel--page .history-empty {
766
+ padding: 40px 20px;
767
+ text-align: center;
768
+ color: var(--chat-text-tertiary);
769
+ font-size: 13px;
770
+ }
771
+
772
+ /* File Download Item */
773
+ .file-download-item {
774
+ display: flex;
775
+ align-items: center;
776
+ justify-content: space-between;
777
+ padding: 12px 16px;
778
+ margin: 8px 0;
779
+ background: var(--chat-bg-secondary, #f5f5f5);
780
+ border-radius: 8px;
781
+ border: 1px solid var(--chat-border, #e0e0e0);
782
+ }
783
+ .file-info {
784
+ display: flex;
785
+ align-items: center;
786
+ gap: 12px;
787
+ flex: 1;
788
+ min-width: 0;
789
+ }
790
+ .file-icon {
791
+ width: 32px;
792
+ height: 32px;
793
+ flex-shrink: 0;
794
+ color: var(--chat-primary, #1f4e79);
795
+ }
796
+ .file-details {
797
+ flex: 1;
798
+ min-width: 0;
799
+ display: flex;
800
+ flex-direction: column;
801
+ gap: 4px;
802
+ }
803
+ .file-name {
804
+ font-size: 14px;
805
+ font-weight: 500;
806
+ color: var(--chat-text-primary, #333);
807
+ white-space: nowrap;
808
+ overflow: hidden;
809
+ text-overflow: ellipsis;
810
+ }
811
+ .file-size {
812
+ font-size: 12px;
813
+ color: var(--chat-text-secondary, #666);
814
+ }
815
+ .download-btn {
816
+ display: flex;
817
+ align-items: center;
818
+ gap: 6px;
819
+ padding: 8px 16px;
820
+ background: var(--chat-primary, #1f4e79);
821
+ color: white;
822
+ border: none;
823
+ border-radius: 6px;
824
+ font-size: 14px;
825
+ cursor: pointer;
826
+ transition: all 0.2s;
827
+ flex-shrink: 0;
828
+ }
829
+ .download-btn:hover {
830
+ background: var(--chat-primary-hover, #184063);
831
+ transform: translateY(-1px);
832
+ }
833
+ .download-btn:active {
834
+ transform: translateY(0);
835
+ }
836
+ .download-btn svg {
837
+ width: 16px;
838
+ height: 16px;
839
+ }