@lvce-editor/chat-view 7.2.0 → 7.4.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.
@@ -1485,10 +1485,6 @@ const terminate = () => {
1485
1485
  globalThis.close();
1486
1486
  };
1487
1487
 
1488
- const getComposerWidth = width => {
1489
- return Math.max(1, width - 32);
1490
- };
1491
-
1492
1488
  const composerAttachmentGap = 8;
1493
1489
  const composerAttachmentMarginBottom = 8;
1494
1490
  const composerAttachmentFontSize = 12;
@@ -1497,6 +1493,18 @@ const composerAttachmentBorderWidth = 2;
1497
1493
  const composerAttachmentHeight = 26;
1498
1494
  const averageCharacterWidth = composerAttachmentFontSize * 0.6;
1499
1495
  const fallbackComposerWidth = 480;
1496
+
1497
+ const getComposerWidth = width => {
1498
+ return Math.max(1, width - 32);
1499
+ };
1500
+
1501
+ const getAttachmentContainerWidth = width => {
1502
+ if (width <= 0) {
1503
+ return fallbackComposerWidth;
1504
+ }
1505
+ return Math.max(1, getComposerWidth(width));
1506
+ };
1507
+
1500
1508
  const getComposerAttachmentLabel$1 = displayType => {
1501
1509
  switch (displayType) {
1502
1510
  case 'file':
@@ -1511,17 +1519,13 @@ const getComposerAttachmentLabel$1 = displayType => {
1511
1519
  return displayType;
1512
1520
  }
1513
1521
  };
1514
- const getAttachmentContainerWidth = width => {
1515
- if (width <= 0) {
1516
- return fallbackComposerWidth;
1517
- }
1518
- return Math.max(1, getComposerWidth(width));
1519
- };
1522
+
1520
1523
  const getComposerAttachmentWidth = (attachment, containerWidth) => {
1521
1524
  const label = `${getComposerAttachmentLabel$1(attachment.displayType)} · ${attachment.name}`;
1522
1525
  const estimatedWidth = Math.ceil(label.length * averageCharacterWidth) + composerAttachmentHorizontalPadding + composerAttachmentBorderWidth;
1523
1526
  return Math.min(containerWidth, estimatedWidth);
1524
1527
  };
1528
+
1525
1529
  const getComposerAttachmentsHeight = (composerAttachments, width) => {
1526
1530
  if (composerAttachments.length === 0) {
1527
1531
  return 0;
@@ -2595,14 +2599,21 @@ const getChatViewEvents = async sessionId => {
2595
2599
  return getEvents(sessionId);
2596
2600
  };
2597
2601
 
2598
- const textFileRegex = /\.txt$/i;
2599
- const pngSignature = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
2600
2602
  const isImageFile = mimeType => {
2601
2603
  return mimeType.startsWith('image/');
2602
2604
  };
2605
+
2606
+ const textFileRegex = /\.txt$/i;
2603
2607
  const isTextFile = (name, mimeType) => {
2604
2608
  return mimeType === 'text/plain' || textFileRegex.test(name);
2605
2609
  };
2610
+
2611
+ const isValidJpeg = async blob => {
2612
+ const bytes = new Uint8Array(await blob.arrayBuffer());
2613
+ return bytes.length >= 4 && bytes[0] === 0xff && bytes[1] === 0xd8 && bytes.at(-2) === 0xff && bytes.at(-1) === 0xd9;
2614
+ };
2615
+
2616
+ const pngSignature = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
2606
2617
  const isValidPng = async blob => {
2607
2618
  const header = new Uint8Array(await blob.slice(0, pngSignature.length).arrayBuffer());
2608
2619
  if (header.length !== pngSignature.length) {
@@ -2610,10 +2621,7 @@ const isValidPng = async blob => {
2610
2621
  }
2611
2622
  return pngSignature.every((value, index) => header[index] === value);
2612
2623
  };
2613
- const isValidJpeg = async blob => {
2614
- const bytes = new Uint8Array(await blob.arrayBuffer());
2615
- return bytes.length >= 4 && bytes[0] === 0xff && bytes[1] === 0xd8 && bytes.at(-2) === 0xff && bytes.at(-1) === 0xd9;
2616
- };
2624
+
2617
2625
  const isValidImage = async (blob, mimeType) => {
2618
2626
  if (mimeType.startsWith('image/') && mimeType !== 'image/png' && mimeType !== 'image/jpeg') {
2619
2627
  return true;
@@ -2635,6 +2643,7 @@ const isValidImage = async (blob, mimeType) => {
2635
2643
  return false;
2636
2644
  }
2637
2645
  };
2646
+
2638
2647
  const getComposerAttachmentDisplayType = async (blob, name, mimeType) => {
2639
2648
  if (isImageFile(mimeType)) {
2640
2649
  return (await isValidImage(blob, mimeType)) ? 'image' : 'invalid-image';
@@ -2694,8 +2703,7 @@ const getComposerAttachments = async sessionId => {
2694
2703
  continue;
2695
2704
  }
2696
2705
  const displayType = await getComposerAttachmentDisplayType(event.blob, event.name, event.mimeType);
2697
- const previewSrc = await getComposerAttachmentPreviewSrc(event.blob, displayType, event.mimeType);
2698
- const textContent = await getComposerAttachmentTextContent(event.blob, displayType);
2706
+ const [previewSrc, textContent] = await Promise.all([getComposerAttachmentPreviewSrc(event.blob, displayType, event.mimeType), getComposerAttachmentTextContent(event.blob, displayType)]);
2699
2707
  attachments.set(event.attachmentId, {
2700
2708
  attachmentId: event.attachmentId,
2701
2709
  displayType,
@@ -8800,6 +8808,18 @@ const handleClickClose = async () => {
8800
8808
  await invoke('Layout.hideSecondarySideBar');
8801
8809
  };
8802
8810
 
8811
+ const handleClickCustomSelectOverlay = async (state, defaultPrevented) => {
8812
+ if (defaultPrevented) {
8813
+ return state;
8814
+ }
8815
+ return closeGitBranchPicker({
8816
+ ...state,
8817
+ agentModePickerOpen: false,
8818
+ reasoningEffortPickerOpen: false,
8819
+ runModePickerOpen: false
8820
+ });
8821
+ };
8822
+
8803
8823
  const handleClickDelete = async (state, sessionId = '') => {
8804
8824
  return deleteSession(state, sessionId);
8805
8825
  };
@@ -9083,8 +9103,7 @@ const handleDropFiles = async (state, name, fileHandles = []) => {
9083
9103
  const file = await droppedFileHandle.getFile();
9084
9104
  const attachmentId = `attachment-${nextAttachmentId + nextAttachments.length}`;
9085
9105
  const displayType = await getComposerAttachmentDisplayType(file, file.name, file.type);
9086
- const previewSrc = await getComposerAttachmentPreviewSrc(file, displayType, file.type);
9087
- const textContent = await getComposerAttachmentTextContent(file, displayType);
9106
+ const [previewSrc, textContent] = await Promise.all([getComposerAttachmentPreviewSrc(file, displayType, file.type), getComposerAttachmentTextContent(file, displayType)]);
9088
9107
  await appendChatViewEvent({
9089
9108
  attachmentId,
9090
9109
  blob: file,
@@ -9152,11 +9171,13 @@ const handleInput = async (state, name, value, inputSource = 'user') => {
9152
9171
  }
9153
9172
  if (name === ModelPickerSearch) {
9154
9173
  const visibleModels = getVisibleModels(state.models, value);
9174
+ const selectedModelId = visibleModels.some(model => model.id === state.selectedModelId) ? state.selectedModelId : visibleModels[0]?.id || state.selectedModelId;
9155
9175
  return {
9156
9176
  ...state,
9157
9177
  modelPickerHeight: getModelPickerHeight(state.modelPickerHeaderHeight, visibleModels.length),
9158
9178
  modelPickerListScrollTop: 0,
9159
9179
  modelPickerSearchValue: value,
9180
+ selectedModelId,
9160
9181
  visibleModels
9161
9182
  };
9162
9183
  }
@@ -10324,6 +10345,7 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10324
10345
  const buttonsHeight = 20;
10325
10346
  const gap = 10;
10326
10347
  const contentPadding = 10;
10348
+ const runModePickerHeight = 84;
10327
10349
  const chatSendAreaHeight = composerHeight + composerAttachmentsHeight + chatSendAreaPaddingTop + chatSendAreaPaddingBottom + buttonsHeight + gap + contentPadding * 2;
10328
10350
  const baseCss = `:root {
10329
10351
  --ChatInputBoxHeight: ${composerHeight}px;
@@ -10344,6 +10366,11 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10344
10366
  --ChatMessageLineHeight: ${chatMessageLineHeight}px;
10345
10367
  --ChatMessageFontFamily: ${chatMessageFontFamily};
10346
10368
  --ChatFocusContentMaxWidth: ${chatFocusContentMaxWidth}px;
10369
+ --RunModePickerHeight: ${runModePickerHeight}px;
10370
+ }
10371
+
10372
+ :root{
10373
+ --WidgetBorder: white;
10347
10374
  }
10348
10375
 
10349
10376
  .ChatSendAreaBottom{
@@ -10369,7 +10396,7 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10369
10396
  min-width: 0;
10370
10397
  overflow: hidden;
10371
10398
  border-radius: 999px;
10372
- border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
10399
+ border: 1px solid var(--WidgetBorder, white);
10373
10400
  padding: 4px 10px;
10374
10401
  background: var(--vscode-badge-background, color-mix(in srgb, var(--vscode-editor-background) 88%, white));
10375
10402
  color: var(--vscode-badge-foreground, var(--vscode-foreground));
@@ -10419,7 +10446,7 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10419
10446
  }
10420
10447
 
10421
10448
  .ChatComposerAttachmentTextFile{
10422
- border-color: var(--vscode-charts-green, var(--vscode-widget-border, var(--vscode-panel-border)));
10449
+ border-color: var(--vscode-charts-green, var(--WidgetBorder, white));
10423
10450
  }
10424
10451
 
10425
10452
  .ChatAttachments{
@@ -10437,7 +10464,7 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10437
10464
  min-width: 0;
10438
10465
  overflow: hidden;
10439
10466
  border-radius: 999px;
10440
- border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
10467
+ border: 1px solid var(--WidgetBorder, white);
10441
10468
  padding: 4px 10px;
10442
10469
  background: var(--vscode-badge-background, color-mix(in srgb, var(--vscode-editor-background) 88%, white));
10443
10470
  color: var(--vscode-badge-foreground, var(--vscode-foreground));
@@ -10469,12 +10496,12 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10469
10496
  }
10470
10497
 
10471
10498
  .ChatAttachmentTextFile{
10472
- border-color: var(--vscode-charts-green, var(--vscode-widget-border, var(--vscode-panel-border)));
10499
+ border-color: var(--vscode-charts-green, var(--WidgetBorder, white));
10473
10500
  }
10474
10501
 
10475
10502
  .ChatImageMessageContent{
10476
10503
  padding: 6px;
10477
- border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
10504
+ border: 1px solid var(--WidgetBorder, white);
10478
10505
  border-radius: 12px;
10479
10506
  background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
10480
10507
  overflow: hidden;
@@ -10505,7 +10532,7 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10505
10532
  display: flex;
10506
10533
  align-items: center;
10507
10534
  justify-content: center;
10508
- border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
10535
+ border: 1px solid var(--WidgetBorder, white);
10509
10536
  border-radius: 12px;
10510
10537
  background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
10511
10538
  box-shadow: 0 12px 28px color-mix(in srgb, var(--vscode-editor-background) 45%, black);
@@ -10564,8 +10591,9 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10564
10591
  }
10565
10592
 
10566
10593
  .RunModePickerPopOver{
10594
+ height: var(--RunModePickerHeight);
10567
10595
  overflow: hidden;
10568
- border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
10596
+ border: 1px solid var(--WidgetBorder, white);
10569
10597
  border-radius: 8px;
10570
10598
  background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
10571
10599
  box-shadow: 0 8px 24px color-mix(in srgb, var(--vscode-editor-background) 50%, black);
@@ -10668,6 +10696,80 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10668
10696
  display: flex;
10669
10697
  contain: content;
10670
10698
  }
10699
+
10700
+
10701
+ .ChatSelect:hover{
10702
+ background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, var(--vscode-editor-background) 80%, white));
10703
+ color: var(--vscode-foreground);
10704
+ }
10705
+
10706
+ .SelectLabel {
10707
+ width: auto;
10708
+ max-width: 100%;
10709
+ min-width: 0;
10710
+ overflow: hidden;
10711
+ white-space: nowrap;
10712
+ text-overflow: ellipsis;
10713
+ }
10714
+
10715
+
10716
+ .ChatSelect {
10717
+ display: flex;
10718
+ gap: 4px;
10719
+ border: none;
10720
+ border-radius: 4px;
10721
+ background: transparent;
10722
+ color: var(--vscode-descriptionForeground, var(--vscode-disabledForeground));
10723
+ padding: 0 !important;
10724
+ }
10725
+
10726
+
10727
+
10728
+
10729
+
10730
+
10731
+
10732
+
10733
+
10734
+ .SelectLabel {
10735
+ width: auto;
10736
+ overflow: hidden;
10737
+ white-space: nowrap;
10738
+ text-overflow: ellipsis;
10739
+
10740
+ }
10741
+
10742
+
10743
+ .ChatSelect .MaskIcon {
10744
+
10745
+ width: 10px;
10746
+ height: 10px;
10747
+ pointer-events: none;
10748
+ }
10749
+
10750
+
10751
+ .ChatModelPickerList {
10752
+ flex-direction: column;
10753
+ flex: 1;
10754
+ display: flex;
10755
+ contain: strict;
10756
+
10757
+ }
10758
+
10759
+
10760
+ .ChatModelPickerItem {
10761
+ contain: strict;
10762
+ flex-shrink:0; /* TODO why?? */
10763
+ }
10764
+
10765
+
10766
+ .ChatModelPickerHeader {
10767
+ height: 40px;
10768
+ contain: strict;
10769
+
10770
+ }
10771
+
10772
+
10671
10773
  `;
10672
10774
  return `${baseCss}
10673
10775
 
@@ -10968,6 +11070,7 @@ const HandleClickAgentModePickerToggle = 57;
10968
11070
  const HandleContextMenuChatImageAttachment = 58;
10969
11071
  const HandleClickGitBranchPickerToggle = 59;
10970
11072
  const HandleErrorComposerAttachmentPreviewOverlay = 60;
11073
+ const HandleClickCustomSelectOverlay = 61;
10971
11074
 
10972
11075
  const getAddContextButtonDom = () => {
10973
11076
  return [{
@@ -10982,7 +11085,7 @@ const getAddContextButtonDom = () => {
10982
11085
  }];
10983
11086
  };
10984
11087
 
10985
- const getCustomSelectToggleVirtualDom = (label, name, open, onClick, title = label, ariaLabel = title) => {
11088
+ const getCustomSelectToggleVirtualDom = (label, name, open, onClick, title = label, ariaLabel = title, ariaControls = '') => {
10986
11089
  const getChevronDom = expanded => {
10987
11090
  return {
10988
11091
  childCount: 0,
@@ -10993,6 +11096,9 @@ const getCustomSelectToggleVirtualDom = (label, name, open, onClick, title = lab
10993
11096
  };
10994
11097
  };
10995
11098
  return [{
11099
+ ...(ariaControls ? {
11100
+ 'aria-controls': ariaControls
11101
+ } : {}),
10996
11102
  'aria-expanded': open ? 'true' : 'false',
10997
11103
  'aria-haspopup': 'true',
10998
11104
  'aria-label': ariaLabel,
@@ -11013,8 +11119,8 @@ const getCustomSelectToggleVirtualDom = (label, name, open, onClick, title = lab
11013
11119
  }, text(label), getChevronDom(open)];
11014
11120
  };
11015
11121
 
11016
- const getCustomSelectPickerToggleVirtualDom = (label, name, open, onClick, title = label, ariaLabel = title) => {
11017
- return getCustomSelectToggleVirtualDom(label, name, open, onClick, title, ariaLabel);
11122
+ const getCustomSelectPickerToggleVirtualDom = (label, name, open, onClick, title = label, ariaLabel = title, ariaControls = '') => {
11123
+ return getCustomSelectToggleVirtualDom(label, name, open, onClick, title, ariaLabel, ariaControls);
11018
11124
  };
11019
11125
 
11020
11126
  const getAgentModePickerVirtualDom = (selectedAgentMode, agentModePickerOpen) => {
@@ -11025,7 +11131,7 @@ const getChatModelPickerToggleVirtualDom = (models, selectedModelId, modelPicker
11025
11131
  const selectedModel = models.find(model => model.id === selectedModelId);
11026
11132
  const selectedModelLabel = selectedModel ? selectedModel.name : selectedModelId;
11027
11133
  const pickModelLabel = pickModel(selectedModelLabel);
11028
- return getCustomSelectPickerToggleVirtualDom(selectedModelLabel, ModelPickerToggle, modelPickerOpen, HandleClickModelPickerToggle, pickModelLabel, pickModelLabel);
11134
+ return getCustomSelectPickerToggleVirtualDom(selectedModelLabel, ModelPickerToggle, modelPickerOpen, HandleClickModelPickerToggle, pickModelLabel, pickModelLabel, ModelPickerList);
11029
11135
  };
11030
11136
 
11031
11137
  const getCreatePullRequestButtonDom = () => {
@@ -11107,6 +11213,11 @@ const getGitBranchPickerVirtualDom = (gitBranches, gitBranchPickerOpen, gitBranc
11107
11213
  const showMessage = messageDom.length > 0;
11108
11214
  const popOverHeight = gitBranches.length * itemHeight + (showMessage ? messageHeight : 0);
11109
11215
  return [...getCustomSelectPickerToggleVirtualDom(label, GitBranchPickerToggle, gitBranchPickerOpen, HandleClickGitBranchPickerToggle, 'Switch branch', 'Switch branch'), ...(gitBranchPickerOpen ? [{
11216
+ childCount: 1,
11217
+ className: ChatModelPickerContainer,
11218
+ onClick: HandleClickCustomSelectOverlay,
11219
+ type: Div
11220
+ }, {
11110
11221
  childCount: (showMessage ? 1 : 0) + 1,
11111
11222
  className: mergeClassNames(ChatModelPicker, CustomSelectPopOver, ChatGitBranchPicker),
11112
11223
  style: `height: ${popOverHeight}px;`,
@@ -11128,6 +11239,11 @@ const getReasoningEffortOptionsVirtualDom = selectedReasoningEffort => {
11128
11239
  };
11129
11240
  const getReasoningEffortPickerVirtualDom = (selectedReasoningEffort, reasoningEffortPickerOpen) => {
11130
11241
  return [...getCustomSelectPickerToggleVirtualDom(getReasoningEffortLabel(selectedReasoningEffort), ReasoningEffortPickerToggle, reasoningEffortPickerOpen, HandleClickReasoningEffortPickerToggle, 'Reasoning', 'Reasoning'), ...(reasoningEffortPickerOpen ? [{
11242
+ childCount: 1,
11243
+ className: ChatModelPickerContainer,
11244
+ onClick: HandleClickCustomSelectOverlay,
11245
+ type: Div
11246
+ }, {
11131
11247
  childCount: 1,
11132
11248
  className: mergeClassNames(ChatModelPicker, CustomSelectPopOver),
11133
11249
  style: `height: ${reasoningEffortPickerHeight}px;`,
@@ -11509,16 +11625,21 @@ const getAgentModeOptionsVirtualDom = selectedAgentMode => {
11509
11625
  return agentModes.flatMap(agentMode => getCustomSelectOptionVirtualDom(getAgentModePickerItemInputName(agentMode), getAgentModeLabel(agentMode), agentMode === selectedAgentMode));
11510
11626
  };
11511
11627
 
11512
- const getCustomSelectPopOverVirtualDom = (optionCount, height, optionNodes, containerClassName = '', popOverClassName = '') => {
11628
+ const getCustomSelectPopOverVirtualDom = (optionCount, height, optionNodes, containerClassName = '', popOverClassName = '', useInlineHeight = true) => {
11513
11629
  return [{
11514
11630
  childCount: 1,
11515
11631
  className: mergeClassNames(ChatModelPickerContainer, containerClassName),
11632
+ onClick: HandleClickCustomSelectOverlay,
11516
11633
  type: Div
11517
- }, {
11634
+ }, useInlineHeight ? {
11518
11635
  childCount: 1,
11519
11636
  className: mergeClassNames(ChatModelPicker, popOverClassName),
11520
11637
  style: `height: ${height}px;`,
11521
11638
  type: Div
11639
+ } : {
11640
+ childCount: 1,
11641
+ className: mergeClassNames(ChatModelPicker, popOverClassName),
11642
+ type: Div
11522
11643
  }, {
11523
11644
  childCount: optionCount,
11524
11645
  className: ChatModelPickerList,
@@ -11537,24 +11658,34 @@ const getUsageCostLabel = model => {
11537
11658
  return `${model.usageCost ?? 1}x`;
11538
11659
  };
11539
11660
 
11661
+ const getUsageCostDom = detail => {
11662
+ if (detail === '') {
11663
+ return [];
11664
+ }
11665
+ return [{
11666
+ childCount: 1,
11667
+ className: ChatModelPickerItemUsageCost,
11668
+ type: Span
11669
+ }, text(detail)];
11670
+ };
11540
11671
  const getChatModelListItemVirtualDom = (model, selectedModelId) => {
11541
11672
  const detail = getUsageCostLabel(model);
11542
11673
  const hasDetail = detail !== '';
11543
- const className = mergeClassNames(ChatModelPickerItem, model.id === selectedModelId ? ChatModelPickerItemSelected : '');
11674
+ const usageCostDom = getUsageCostDom(detail);
11675
+ const selected = model.id === selectedModelId;
11676
+ const className = mergeClassNames(ChatModelPickerItem, selected ? ChatModelPickerItemSelected : '');
11544
11677
  return [{
11678
+ 'aria-selected': selected ? 'true' : 'false',
11545
11679
  childCount: hasDetail ? 2 : 1,
11546
11680
  className,
11547
11681
  'data-id': model.id,
11682
+ role: 'option',
11548
11683
  type: Li
11549
11684
  }, {
11550
11685
  childCount: 1,
11551
11686
  className: ChatModelPickerItemLabel,
11552
11687
  type: Span
11553
- }, text(getModelLabel(model)), ...(hasDetail ? [{
11554
- childCount: 1,
11555
- className: ChatModelPickerItemUsageCost,
11556
- type: Span
11557
- }, text(detail)] : [])];
11688
+ }, text(getModelLabel(model)), ...usageCostDom];
11558
11689
  };
11559
11690
 
11560
11691
  const parentNode$2 = {
@@ -11573,10 +11704,12 @@ const getChatModelListVirtualDom = (visibleModels, selectedModelId) => {
11573
11704
  return [{
11574
11705
  childCount: visibleModels.length,
11575
11706
  className: ChatModelPickerList,
11707
+ id: ModelPickerList,
11576
11708
  onClick: HandleClickModelPickerList,
11577
11709
  onPointerDown: HandlePointerDownModelPickerList,
11578
11710
  onPointerUp: HandlePointerUpModelPickerList,
11579
11711
  onScroll: HandleModelPickerListScroll,
11712
+ role: 'listbox',
11580
11713
  type: Ul
11581
11714
  }, ...visibleModels.flatMap(model => getChatModelListItemVirtualDom(model, selectedModelId))];
11582
11715
  };
@@ -11615,6 +11748,17 @@ const getChatModelPickerPopOverVirtualDom = (models, selectedModelId, modelPicke
11615
11748
  }, ...getModelPickerHeaderDom(modelPickerSearchValue), ...getChatModelListVirtualDom(visibleModels, selectedModelId)];
11616
11749
  };
11617
11750
 
11751
+ const getImageCouldNotBeLoadedDom = () => {
11752
+ return [{
11753
+ childCount: 1,
11754
+ className: mergeClassNames(ChatComposerAttachmentPreviewOverlayError, ImageErrorMessage),
11755
+ name: ComposerAttachmentPreviewOverlay,
11756
+ type: Div
11757
+ }, {
11758
+ text: imageCouldNotBeLoaded(),
11759
+ type: Text
11760
+ }];
11761
+ };
11618
11762
  const getComposerAttachmentPreviewOverlayVirtualDom = (composerAttachments, attachmentId, hasError) => {
11619
11763
  if (!attachmentId) {
11620
11764
  return [];
@@ -11632,15 +11776,7 @@ const getComposerAttachmentPreviewOverlayVirtualDom = (composerAttachments, atta
11632
11776
  onPointerOut: HandleMouseOut,
11633
11777
  onPointerOver: HandleMouseOver,
11634
11778
  type: Div
11635
- }, ...(hasError ? [{
11636
- childCount: 1,
11637
- className: mergeClassNames(ChatComposerAttachmentPreviewOverlayError, ImageErrorMessage),
11638
- name: ComposerAttachmentPreviewOverlay,
11639
- type: Div
11640
- }, {
11641
- text: imageCouldNotBeLoaded(),
11642
- type: Text
11643
- }] : [{
11779
+ }, ...(hasError ? getImageCouldNotBeLoadedDom() : [{
11644
11780
  alt: `Large image preview for ${attachment.name}`,
11645
11781
  childCount: 0,
11646
11782
  className: ChatComposerAttachmentPreviewOverlayImage,
@@ -11657,7 +11793,7 @@ const getRunModeOptionsVirtualDom = selectedRunMode => {
11657
11793
  return runModes.flatMap(runMode => getCustomSelectOptionVirtualDom(getRunModePickerItemInputName(runMode), runMode, runMode === selectedRunMode));
11658
11794
  };
11659
11795
  const getRunModePickerPopOverVirtualDom = selectedRunMode => {
11660
- return getCustomSelectPopOverVirtualDom(runModes.length, runModePickerHeight, getRunModeOptionsVirtualDom(selectedRunMode), RunModePickerContainer, RunModePickerPopOver);
11796
+ return getCustomSelectPopOverVirtualDom(runModes.length, runModePickerHeight, getRunModeOptionsVirtualDom(selectedRunMode), RunModePickerContainer, RunModePickerPopOver, false);
11661
11797
  };
11662
11798
 
11663
11799
  const getDropOverlayVirtualDom = () => {
@@ -14454,6 +14590,9 @@ const renderEventListeners = () => {
14454
14590
  }, {
14455
14591
  name: HandleClickGitBranchPickerToggle,
14456
14592
  params: ['handleClickGitBranchPickerToggle']
14593
+ }, {
14594
+ name: HandleClickCustomSelectOverlay,
14595
+ params: ['handleClickCustomSelectOverlay', DefaultPrevented]
14457
14596
  }, {
14458
14597
  name: HandleClickModelPickerOverlay,
14459
14598
  params: ['handleClickModelPickerOverlay', DefaultPrevented]
@@ -14945,6 +15084,7 @@ const commandMap = {
14945
15084
  'Chat.handleClickBack': wrapCommand(handleClickBack),
14946
15085
  'Chat.handleClickClose': handleClickClose,
14947
15086
  'Chat.handleClickCreatePullRequest': wrapCommand(handleClickCreatePullRequest),
15087
+ 'Chat.handleClickCustomSelectOverlay': wrapCommand(handleClickCustomSelectOverlay),
14948
15088
  'Chat.handleClickDelete': wrapCommand(handleClickDelete),
14949
15089
  'Chat.handleClickDictationButton': wrapCommand(handleClickDictationButton),
14950
15090
  'Chat.handleClickFileName': wrapCommand(handleClickFileName),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-view",
3
- "version": "7.2.0",
3
+ "version": "7.4.0",
4
4
  "description": "Chat View Worker",
5
5
  "repository": {
6
6
  "type": "git",