@lvce-editor/chat-view 7.2.0 → 7.3.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.
- package/dist/chatViewWorkerMain.js +78 -1
- package/package.json +1 -1
|
@@ -10668,6 +10668,80 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
|
|
|
10668
10668
|
display: flex;
|
|
10669
10669
|
contain: content;
|
|
10670
10670
|
}
|
|
10671
|
+
|
|
10672
|
+
|
|
10673
|
+
.ChatSelect:hover{
|
|
10674
|
+
background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, var(--vscode-editor-background) 80%, white));
|
|
10675
|
+
color: var(--vscode-foreground);
|
|
10676
|
+
}
|
|
10677
|
+
|
|
10678
|
+
.SelectLabel {
|
|
10679
|
+
width: auto;
|
|
10680
|
+
max-width: 100%;
|
|
10681
|
+
min-width: 0;
|
|
10682
|
+
overflow: hidden;
|
|
10683
|
+
white-space: nowrap;
|
|
10684
|
+
text-overflow: ellipsis;
|
|
10685
|
+
}
|
|
10686
|
+
|
|
10687
|
+
|
|
10688
|
+
.ChatSelect {
|
|
10689
|
+
display: flex;
|
|
10690
|
+
gap: 4px;
|
|
10691
|
+
border: none;
|
|
10692
|
+
border-radius: 4px;
|
|
10693
|
+
background: transparent;
|
|
10694
|
+
color: var(--vscode-descriptionForeground, var(--vscode-disabledForeground));
|
|
10695
|
+
padding: 0 !important;
|
|
10696
|
+
}
|
|
10697
|
+
|
|
10698
|
+
|
|
10699
|
+
|
|
10700
|
+
|
|
10701
|
+
|
|
10702
|
+
|
|
10703
|
+
|
|
10704
|
+
|
|
10705
|
+
|
|
10706
|
+
.SelectLabel {
|
|
10707
|
+
width: auto;
|
|
10708
|
+
overflow: hidden;
|
|
10709
|
+
white-space: nowrap;
|
|
10710
|
+
text-overflow: ellipsis;
|
|
10711
|
+
|
|
10712
|
+
}
|
|
10713
|
+
|
|
10714
|
+
|
|
10715
|
+
.ChatSelect .MaskIcon {
|
|
10716
|
+
|
|
10717
|
+
width: 10px;
|
|
10718
|
+
height: 10px;
|
|
10719
|
+
pointer-events: none;
|
|
10720
|
+
}
|
|
10721
|
+
|
|
10722
|
+
|
|
10723
|
+
.ChatModelPickerList {
|
|
10724
|
+
flex-direction: column;
|
|
10725
|
+
flex: 1;
|
|
10726
|
+
display: flex;
|
|
10727
|
+
contain: strict;
|
|
10728
|
+
|
|
10729
|
+
}
|
|
10730
|
+
|
|
10731
|
+
|
|
10732
|
+
.ChatModelPickerItem {
|
|
10733
|
+
contain: strict;
|
|
10734
|
+
flex-shrink:0; /* TODO why?? */
|
|
10735
|
+
}
|
|
10736
|
+
|
|
10737
|
+
|
|
10738
|
+
.ChatModelPickerHeader {
|
|
10739
|
+
height: 40px;
|
|
10740
|
+
contain: strict;
|
|
10741
|
+
|
|
10742
|
+
}
|
|
10743
|
+
|
|
10744
|
+
|
|
10671
10745
|
`;
|
|
10672
10746
|
return `${baseCss}
|
|
10673
10747
|
|
|
@@ -11540,11 +11614,13 @@ const getUsageCostLabel = model => {
|
|
|
11540
11614
|
const getChatModelListItemVirtualDom = (model, selectedModelId) => {
|
|
11541
11615
|
const detail = getUsageCostLabel(model);
|
|
11542
11616
|
const hasDetail = detail !== '';
|
|
11543
|
-
const
|
|
11617
|
+
const selected = model.id === selectedModelId;
|
|
11618
|
+
const className = mergeClassNames(ChatModelPickerItem, selected ? ChatModelPickerItemSelected : '');
|
|
11544
11619
|
return [{
|
|
11545
11620
|
childCount: hasDetail ? 2 : 1,
|
|
11546
11621
|
className,
|
|
11547
11622
|
'data-id': model.id,
|
|
11623
|
+
role: 'option',
|
|
11548
11624
|
type: Li
|
|
11549
11625
|
}, {
|
|
11550
11626
|
childCount: 1,
|
|
@@ -11577,6 +11653,7 @@ const getChatModelListVirtualDom = (visibleModels, selectedModelId) => {
|
|
|
11577
11653
|
onPointerDown: HandlePointerDownModelPickerList,
|
|
11578
11654
|
onPointerUp: HandlePointerUpModelPickerList,
|
|
11579
11655
|
onScroll: HandleModelPickerListScroll,
|
|
11656
|
+
role: 'listbox',
|
|
11580
11657
|
type: Ul
|
|
11581
11658
|
}, ...visibleModels.flatMap(model => getChatModelListItemVirtualDom(model, selectedModelId))];
|
|
11582
11659
|
};
|