yc-agent-ui 1.2.2 → 1.2.3

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 (45) hide show
  1. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +19 -1
  2. package/es/components/yc-ai-chat/src/studio.vue.d.ts +6 -0
  3. package/es/components/yc-ai-chat/src/type.d.ts +2 -0
  4. package/es/index.css +8 -8
  5. package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +709 -129
  6. package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +194 -42
  7. package/es/version.d.ts +1 -1
  8. package/es/version.mjs +1 -1
  9. package/index.css +1 -1
  10. package/index.js +1655 -922
  11. package/index.min.js +22 -22
  12. package/index.min.mjs +24 -24
  13. package/index.mjs +1645 -912
  14. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +19 -1
  15. package/lib/components/yc-ai-chat/src/studio.vue.d.ts +6 -0
  16. package/lib/components/yc-ai-chat/src/type.d.ts +2 -0
  17. package/lib/index.css +10 -10
  18. package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +708 -128
  19. package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +193 -41
  20. package/lib/version.d.ts +1 -1
  21. package/lib/version.js +1 -1
  22. package/locale/en.js +1 -1
  23. package/locale/en.min.js +1 -1
  24. package/locale/en.min.mjs +1 -1
  25. package/locale/en.mjs +1 -1
  26. package/locale/ja.js +1 -1
  27. package/locale/ja.min.js +1 -1
  28. package/locale/ja.min.mjs +1 -1
  29. package/locale/ja.mjs +1 -1
  30. package/locale/ko.js +1 -1
  31. package/locale/ko.min.js +1 -1
  32. package/locale/ko.min.mjs +1 -1
  33. package/locale/ko.mjs +1 -1
  34. package/locale/zh-cn.js +1 -1
  35. package/locale/zh-cn.min.js +1 -1
  36. package/locale/zh-cn.min.mjs +1 -1
  37. package/locale/zh-cn.mjs +1 -1
  38. package/locale/zh-tw.js +1 -1
  39. package/locale/zh-tw.min.js +1 -1
  40. package/locale/zh-tw.min.mjs +1 -1
  41. package/locale/zh-tw.mjs +1 -1
  42. package/package.json +1 -1
  43. package/theme-chalk/index.css +1 -1
  44. package/theme-chalk/plus-yc-ai-chat.css +1 -1
  45. package/theme-chalk/src/yc-ai-chat.scss +478 -75
@@ -267,6 +267,11 @@
267
267
  }
268
268
  }
269
269
 
270
+ &.is-resizing-sidebar {
271
+ user-select: none;
272
+ cursor: col-resize;
273
+ }
274
+
270
275
  &__web-body {
271
276
  flex: 1;
272
277
  min-height: 0;
@@ -275,19 +280,83 @@
275
280
  }
276
281
 
277
282
  &__sidebar-wrap {
278
- width: 256px;
283
+ width: 280px;
284
+ min-width: 0;
279
285
  flex-shrink: 0;
280
- border-right: 1px solid var(--yc-line-200);
281
- background: #fcfcfd;
282
- transition: width 0.2s ease;
286
+ border-right: 1px solid #e8eef7;
287
+ background: #f0f4f9;
288
+ transition: width 0.2s cubic-bezier(0.2, 0, 0, 1);
283
289
  overflow: hidden;
284
290
 
291
+ &.is-resizing {
292
+ transition: none !important;
293
+ }
294
+
285
295
  &.is-collapsed {
286
- width: 0;
296
+ width: 0 !important;
287
297
  border-right-color: transparent;
288
298
  }
289
299
  }
290
300
 
301
+ &__sidebar-resizer {
302
+ position: relative;
303
+ z-index: 12;
304
+ width: 8px;
305
+ margin: 0 -4px;
306
+ flex-shrink: 0;
307
+ cursor: col-resize;
308
+ display: flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ outline: none;
312
+ touch-action: none;
313
+
314
+ &-line {
315
+ position: relative;
316
+ width: 2px;
317
+ height: 100%;
318
+ border-radius: 999px;
319
+ background: transparent;
320
+ transition: background-color 0.16s ease, box-shadow 0.16s ease;
321
+
322
+ &::after {
323
+ content: "";
324
+ position: absolute;
325
+ top: 50%;
326
+ left: 50%;
327
+ width: 4px;
328
+ height: 28px;
329
+ border-radius: 999px;
330
+ background: #a8c7fa;
331
+ transform: translate(-50%, -50%) scaleY(0.6);
332
+ opacity: 0;
333
+ transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
334
+ }
335
+ }
336
+
337
+ &:hover .yc-chat-studio__sidebar-resizer-line,
338
+ &:focus-visible .yc-chat-studio__sidebar-resizer-line {
339
+ background: rgba(27, 110, 243, 0.35);
340
+
341
+ &::after {
342
+ opacity: 1;
343
+ transform: translate(-50%, -50%) scaleY(1);
344
+ background: #1b6ef3;
345
+ }
346
+ }
347
+
348
+ &.is-active .yc-chat-studio__sidebar-resizer-line {
349
+ background: #1b6ef3;
350
+ box-shadow: 0 0 0 1px rgba(27, 110, 243, 0.14);
351
+
352
+ &::after {
353
+ opacity: 1;
354
+ transform: translate(-50%, -50%) scaleY(1.1);
355
+ background: #0b57d0;
356
+ }
357
+ }
358
+ }
359
+
291
360
  &__main {
292
361
  flex: 1;
293
362
  min-width: 0;
@@ -569,87 +638,144 @@
569
638
  }
570
639
  }
571
640
 
572
- /* 左侧会话栏 */
641
+ /* 左侧会话栏(Google Gemini 官方 Material 3 审美) */
573
642
  .yc-chat-sidebar {
574
643
  display: flex;
575
644
  flex-direction: column;
576
645
  width: 100%;
577
646
  height: 100%;
578
- min-width: 220px;
647
+ min-width: 0;
648
+ box-sizing: border-box;
649
+ background: #f0f4f9;
650
+ color: #1f1f1f;
579
651
 
580
652
  &__header {
581
653
  display: flex;
582
654
  flex-direction: column;
583
- gap: 8px;
584
- padding: 12px;
585
- border-bottom: 1px solid #f1f5f9;
655
+ gap: 10px;
656
+ padding: 14px 12px 10px;
657
+ flex-shrink: 0;
586
658
  }
587
659
 
588
660
  &__create-btn {
589
661
  display: inline-flex;
590
662
  align-items: center;
591
663
  justify-content: center;
592
- gap: 6px;
664
+ gap: 8px;
593
665
  width: 100%;
594
- height: 36px;
595
- padding: 0 12px;
596
- border-radius: 8px;
597
- border: 1px solid var(--yc-chat-accent, #0f172a);
598
- background: var(--yc-chat-accent, #0f172a);
599
- color: #ffffff;
600
- font-size: 13px;
601
- font-weight: 500;
666
+ height: 40px;
667
+ padding: 0 16px;
668
+ border-radius: 999px;
669
+ border: 1px solid transparent;
670
+ background: #e1ecfe;
671
+ color: #0b57d0;
672
+ font-size: 13.5px;
673
+ font-weight: 600;
674
+ letter-spacing: -0.01em;
602
675
  cursor: pointer;
603
- transition: all 0.15s ease;
676
+ box-sizing: border-box;
677
+ min-width: 0;
678
+ transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
604
679
 
605
680
  svg,
606
681
  img {
607
- width: 15px;
608
- height: 15px;
682
+ width: 16px;
683
+ height: 16px;
609
684
  object-fit: contain;
685
+ flex-shrink: 0;
610
686
  }
611
687
 
612
688
  &:hover:not(:disabled) {
613
- background: color-mix(in srgb, var(--yc-chat-accent, #0f172a) 82%, #000);
614
- border-color: color-mix(in srgb, var(--yc-chat-accent, #0f172a) 82%, #000);
689
+ background: #d3e3fd;
690
+ color: #0842a0;
691
+ box-shadow: 0 1px 3px rgba(11, 87, 208, 0.12);
692
+ }
693
+
694
+ &:active:not(:disabled) {
695
+ background: #c4dafc;
615
696
  }
616
697
 
617
698
  &:disabled {
618
- background: #f1f5f9;
619
- border-color: #e2e8f0;
620
- color: #94a3b8;
699
+ background: rgba(31, 31, 31, 0.05);
700
+ color: #8e918f;
621
701
  cursor: not-allowed;
622
702
  }
623
703
  }
624
704
 
705
+ &__create-icon {
706
+ display: inline-flex;
707
+ align-items: center;
708
+ justify-content: center;
709
+ flex-shrink: 0;
710
+ }
711
+
712
+ &__create-label {
713
+ overflow: hidden;
714
+ text-overflow: ellipsis;
715
+ white-space: nowrap;
716
+ }
717
+
625
718
  &__search {
626
719
  display: flex;
627
720
  align-items: center;
628
- gap: 6px;
629
- height: 30px;
630
- padding: 0 9px;
631
- border: 1px solid #e2e8f0;
632
- border-radius: 7px;
721
+ gap: 8px;
722
+ height: 36px;
723
+ padding: 0 12px;
724
+ border: 1px solid rgba(68, 71, 70, 0.12);
725
+ border-radius: 999px;
633
726
  background: #ffffff;
727
+ box-sizing: border-box;
728
+ transition: border-color 0.16s ease, box-shadow 0.16s ease;
634
729
 
635
730
  svg {
636
- width: 13px;
637
- height: 13px;
638
- color: #94a3b8;
731
+ width: 14px;
732
+ height: 14px;
733
+ color: #5f6368;
639
734
  flex-shrink: 0;
640
735
  }
736
+
737
+ &:focus-within {
738
+ border-color: #a8c7fa;
739
+ box-shadow: 0 2px 8px rgba(27, 110, 243, 0.1);
740
+ }
641
741
  }
642
742
 
643
743
  &__search-input {
644
744
  width: 100%;
745
+ min-width: 0;
645
746
  border: none;
646
747
  outline: none;
647
748
  background: transparent;
648
- font-size: 12px;
649
- color: #0f172a;
749
+ font-size: 13px;
750
+ color: #1f1f1f;
650
751
 
651
752
  &::placeholder {
652
- color: #94a3b8;
753
+ color: #747775;
754
+ }
755
+ }
756
+
757
+ &__search-clear {
758
+ display: inline-flex;
759
+ align-items: center;
760
+ justify-content: center;
761
+ width: 20px;
762
+ height: 20px;
763
+ padding: 0;
764
+ border: none;
765
+ border-radius: 999px;
766
+ background: transparent;
767
+ color: #5f6368;
768
+ cursor: pointer;
769
+ flex-shrink: 0;
770
+
771
+ svg {
772
+ width: 12px;
773
+ height: 12px;
774
+ }
775
+
776
+ &:hover {
777
+ background: #edf2f8;
778
+ color: #1f1f1f;
653
779
  }
654
780
  }
655
781
 
@@ -657,95 +783,372 @@
657
783
  flex: 1;
658
784
  min-height: 0;
659
785
  overflow-y: auto;
786
+ overflow-x: hidden;
787
+ padding: 2px 8px 12px;
788
+ scrollbar-width: thin;
789
+ scrollbar-color: rgba(68, 71, 70, 0.18) transparent;
790
+
791
+ &::-webkit-scrollbar {
792
+ width: 5px;
793
+ }
794
+
795
+ &::-webkit-scrollbar-thumb {
796
+ border-radius: 999px;
797
+ background: rgba(68, 71, 70, 0.18);
798
+ }
660
799
  }
661
800
 
662
801
  &__empty {
663
802
  padding: 40px 16px;
664
803
  text-align: center;
665
804
  font-size: 12.5px;
666
- color: #94a3b8;
667
- line-height: 1.6;
805
+ color: #5f6368;
806
+ line-height: 1.65;
807
+ }
808
+
809
+ &__archived-only-hint {
810
+ padding: 16px 14px 8px;
811
+ font-size: 12px;
812
+ color: #747775;
668
813
  }
669
814
 
670
- &__item {
815
+ &__groups {
671
816
  display: flex;
672
- align-items: center;
673
- justify-content: space-between;
674
- gap: 8px;
675
- width: 100%;
817
+ flex-direction: column;
818
+ gap: 6px;
676
819
  min-width: 0;
677
- padding: 2px 0;
678
820
  }
679
821
 
680
- &__item-main {
681
- flex: 1;
822
+ &__group {
823
+ display: flex;
824
+ flex-direction: column;
682
825
  min-width: 0;
826
+
827
+ &--archived {
828
+ margin-top: 6px;
829
+ padding-top: 6px;
830
+ border-top: 1px solid rgba(68, 71, 70, 0.08);
831
+ }
683
832
  }
684
833
 
685
- &__item-title {
686
- font-size: 13px;
834
+ &__group-label {
835
+ padding: 8px 14px 4px;
836
+ font-size: 11.5px;
687
837
  font-weight: 500;
688
- color: #0f172a;
838
+ color: #5f6368;
839
+ letter-spacing: 0.01em;
689
840
  overflow: hidden;
690
841
  text-overflow: ellipsis;
691
842
  white-space: nowrap;
692
- line-height: 1.4;
693
843
  }
694
844
 
695
- &__item-time {
696
- margin-top: 2px;
697
- font-size: 11px;
698
- color: #94a3b8;
699
- line-height: 1.3;
845
+ &__group-items {
846
+ display: flex;
847
+ flex-direction: column;
848
+ gap: 2px;
849
+ min-width: 0;
850
+ }
851
+
852
+ &__row {
853
+ display: flex;
854
+ align-items: center;
855
+ justify-content: space-between;
856
+ gap: 4px;
857
+ min-height: 38px;
858
+ padding: 5px 6px 5px 14px;
859
+ border-radius: 999px;
860
+ background: transparent;
861
+ color: #1f1f1f;
862
+ cursor: pointer;
863
+ box-sizing: border-box;
864
+ min-width: 0;
865
+ transition: background-color 0.15s ease, color 0.15s ease;
866
+
867
+ &:hover:not(.is-active):not(.is-disabled),
868
+ &.is-menu-open:not(.is-active) {
869
+ background: rgba(31, 31, 31, 0.06);
870
+ }
871
+
872
+ &.is-active {
873
+ background: #d3e3fd;
874
+ color: #041e49;
875
+
876
+ .yc-chat-sidebar__item-title {
877
+ color: #041e49;
878
+ font-weight: 600;
879
+ }
880
+
881
+ .yc-chat-sidebar__more-trigger {
882
+ color: #041e49;
883
+
884
+ &:hover,
885
+ &.is-open {
886
+ background: rgba(4, 30, 73, 0.1);
887
+ }
888
+ }
889
+ }
890
+
891
+ &.is-disabled {
892
+ opacity: 0.58;
893
+ cursor: not-allowed;
894
+ }
895
+
896
+ &--archived:not(.is-active) .yc-chat-sidebar__item-title {
897
+ color: #5f6368;
898
+ }
700
899
  }
701
900
 
702
- &__delete-btn {
901
+ &__item-title {
902
+ flex: 1;
903
+ min-width: 0;
904
+ font-size: 13.5px;
905
+ font-weight: 400;
906
+ color: #1f1f1f;
907
+ overflow: hidden;
908
+ text-overflow: ellipsis;
909
+ white-space: nowrap;
910
+ line-height: 20px;
911
+ }
912
+
913
+ &__item-actions {
914
+ display: inline-flex;
915
+ align-items: center;
916
+ flex-shrink: 0;
917
+ }
918
+
919
+ &__more-trigger {
703
920
  display: inline-flex;
704
921
  align-items: center;
705
922
  justify-content: center;
706
- width: 24px;
707
- height: 24px;
923
+ width: 0;
924
+ height: 28px;
925
+ padding: 0;
708
926
  border: none;
709
- border-radius: 6px;
927
+ border-radius: 999px;
710
928
  background: transparent;
711
- color: #94a3b8;
929
+ color: #444746;
712
930
  opacity: 0;
931
+ overflow: hidden;
932
+ pointer-events: none;
713
933
  cursor: pointer;
714
- transition: all 0.14s ease;
934
+ transition:
935
+ width 0.14s ease,
936
+ opacity 0.14s ease,
937
+ background-color 0.14s ease,
938
+ color 0.14s ease;
715
939
 
716
940
  svg {
717
- width: 14px;
718
- height: 14px;
941
+ width: 15px;
942
+ height: 15px;
943
+ flex-shrink: 0;
719
944
  }
720
945
 
721
- &:hover {
722
- background: #fef2f2;
723
- color: #dc2626;
946
+ &:hover,
947
+ &.is-open {
948
+ background: rgba(31, 31, 31, 0.08);
949
+ color: #1f1f1f;
950
+ }
951
+
952
+ &:focus-visible {
953
+ width: 28px;
954
+ opacity: 1;
955
+ pointer-events: auto;
956
+ outline: 2px solid #1b6ef3;
957
+ outline-offset: 1px;
724
958
  }
725
959
  }
726
960
 
727
- &__item:hover &__delete-btn,
728
- &__item.active &__delete-btn {
961
+ &__row:hover &__more-trigger,
962
+ &__row:focus-within &__more-trigger,
963
+ &__row.is-active &__more-trigger,
964
+ &__row.is-menu-open &__more-trigger {
965
+ width: 28px;
729
966
  opacity: 1;
967
+ pointer-events: auto;
968
+ }
969
+
970
+ &__archive-toggle {
971
+ display: flex;
972
+ align-items: center;
973
+ justify-content: space-between;
974
+ gap: 8px;
975
+ width: 100%;
976
+ height: 34px;
977
+ padding: 0 12px;
978
+ border: none;
979
+ border-radius: 999px;
980
+ background: transparent;
981
+ color: #444746;
982
+ font-size: 12.5px;
983
+ font-weight: 500;
984
+ cursor: pointer;
985
+ box-sizing: border-box;
986
+ transition: background-color 0.15s ease, color 0.15s ease;
987
+
988
+ &:hover {
989
+ background: rgba(31, 31, 31, 0.05);
990
+ color: #1f1f1f;
991
+ }
992
+ }
993
+
994
+ &__archive-toggle-left {
995
+ display: inline-flex;
996
+ align-items: center;
997
+ gap: 7px;
998
+ min-width: 0;
999
+
1000
+ svg {
1001
+ width: 14px;
1002
+ height: 14px;
1003
+ color: #5f6368;
1004
+ flex-shrink: 0;
1005
+ }
1006
+ }
1007
+
1008
+ &__archive-count {
1009
+ display: inline-flex;
1010
+ align-items: center;
1011
+ justify-content: center;
1012
+ min-width: 18px;
1013
+ height: 18px;
1014
+ padding: 0 6px;
1015
+ border-radius: 999px;
1016
+ background: rgba(68, 71, 70, 0.1);
1017
+ color: #444746;
1018
+ font-size: 11px;
1019
+ font-variant-numeric: tabular-nums;
1020
+ }
1021
+
1022
+ &__archive-chevron {
1023
+ width: 14px;
1024
+ height: 14px;
1025
+ color: #5f6368;
1026
+ flex-shrink: 0;
1027
+ transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1);
1028
+
1029
+ &.is-expanded {
1030
+ transform: rotate(180deg);
1031
+ }
730
1032
  }
731
1033
 
732
1034
  &__more {
733
- padding: 8px 0 12px;
1035
+ padding: 8px 0 6px;
734
1036
  text-align: center;
735
1037
  }
736
1038
 
737
1039
  &__more-btn {
1040
+ height: 30px;
1041
+ padding: 0 14px;
1042
+ border: 1px solid rgba(68, 71, 70, 0.14);
1043
+ border-radius: 999px;
1044
+ background: rgba(255, 255, 255, 0.72);
1045
+ color: #444746;
1046
+ font-size: 12px;
1047
+ font-weight: 500;
1048
+ cursor: pointer;
1049
+ transition: background-color 0.15s ease, color 0.15s ease;
1050
+
1051
+ &:hover:not(:disabled) {
1052
+ background: #ffffff;
1053
+ color: #0b57d0;
1054
+ }
1055
+
1056
+ &:disabled {
1057
+ opacity: 0.55;
1058
+ cursor: not-allowed;
1059
+ }
1060
+ }
1061
+
1062
+ /* Gemini Material 3 悬浮操作菜单(Teleport 到 body 避免侧栏裁切) */
1063
+ &__dropdown {
1064
+ position: fixed;
1065
+ z-index: 3500;
1066
+ min-width: 156px;
1067
+ padding: 6px;
1068
+ border-radius: 16px;
1069
+ background: #ffffff;
1070
+ border: 1px solid rgba(68, 71, 70, 0.1);
1071
+ box-shadow:
1072
+ 0 8px 24px -4px rgba(15, 23, 42, 0.12),
1073
+ 0 2px 6px rgba(15, 23, 42, 0.06);
1074
+ box-sizing: border-box;
1075
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
1076
+ transform-origin: top right;
1077
+ }
1078
+
1079
+ &__menu-item {
1080
+ display: flex;
1081
+ align-items: center;
1082
+ gap: 10px;
1083
+ width: 100%;
1084
+ height: 36px;
1085
+ padding: 0 12px;
738
1086
  border: none;
1087
+ border-radius: 10px;
739
1088
  background: transparent;
740
- color: #475569;
741
- font-size: 12px;
1089
+ color: #1f1f1f;
1090
+ font-size: 13.5px;
1091
+ font-weight: 450;
1092
+ text-align: left;
742
1093
  cursor: pointer;
1094
+ box-sizing: border-box;
1095
+ transition: background-color 0.14s ease, color 0.14s ease;
1096
+
1097
+ svg {
1098
+ width: 16px;
1099
+ height: 16px;
1100
+ color: #444746;
1101
+ flex-shrink: 0;
1102
+ transition: color 0.14s ease;
1103
+ }
743
1104
 
744
1105
  &:hover:not(:disabled) {
745
- color: #0f172a;
746
- text-decoration: underline;
1106
+ background: #f0f4f9;
1107
+ color: #041e49;
1108
+
1109
+ svg {
1110
+ color: #0b57d0;
1111
+ }
1112
+ }
1113
+
1114
+ &.is-danger {
1115
+ color: #444746;
1116
+
1117
+ &:hover:not(:disabled) {
1118
+ background: #fce8e6;
1119
+ color: #b3261e;
1120
+
1121
+ svg {
1122
+ color: #b3261e;
1123
+ }
1124
+ }
1125
+ }
1126
+
1127
+ &:disabled {
1128
+ opacity: 0.45;
1129
+ cursor: not-allowed;
747
1130
  }
748
1131
  }
1132
+
1133
+ &__menu-divider {
1134
+ height: 1px;
1135
+ margin: 4px 8px;
1136
+ background: rgba(68, 71, 70, 0.08);
1137
+ }
1138
+ }
1139
+
1140
+ .yc-gemini-menu-pop-enter-active {
1141
+ transition: opacity 0.14s ease, transform 0.16s cubic-bezier(0.2, 0, 0, 1);
1142
+ }
1143
+
1144
+ .yc-gemini-menu-pop-leave-active {
1145
+ transition: opacity 0.1s ease, transform 0.1s ease;
1146
+ }
1147
+
1148
+ .yc-gemini-menu-pop-enter-from,
1149
+ .yc-gemini-menu-pop-leave-to {
1150
+ opacity: 0;
1151
+ transform: scale(0.94) translateY(-4px);
749
1152
  }
750
1153
 
751
1154
  /* 欢迎空态与示例卡片 */