@lvce-editor/chat-view 6.24.0 → 6.25.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.
@@ -9268,6 +9268,14 @@ const openMockSession = async (state, mockSessionId, mockChatMessages) => {
9268
9268
  };
9269
9269
  };
9270
9270
 
9271
+ const openModelPicker = state => {
9272
+ return {
9273
+ ...state,
9274
+ modelPickerOpen: !state.modelPickerOpen,
9275
+ modelPickerSearchValue: state.modelPickerOpen ? '' : state.modelPickerSearchValue
9276
+ };
9277
+ };
9278
+
9271
9279
  const pasteInput = async state => {
9272
9280
  const text = await readText();
9273
9281
  return handleInput(state, Composer, text, 'script');
@@ -9308,6 +9316,23 @@ const getCss = (composerHeight, listItemHeight, chatMessageFontSize, chatMessage
9308
9316
  height: ${buttonsHeight}px;
9309
9317
  }
9310
9318
 
9319
+ .ChatInputBox{
9320
+ width: 100%;
9321
+ margin: 0;
9322
+ border: none;
9323
+ outline: none;
9324
+ flex: 1;
9325
+ background: var(--InputBoxBackground);
9326
+ padding: 4px 6px;
9327
+ color: var(--InputBoxForeground);
9328
+ font-size: 13px;
9329
+ height: 24px;
9330
+ contain: strict;
9331
+ resize: none;
9332
+ overflow: hidden;
9333
+ white-space: pre;
9334
+ text-overflow: ellipsis;
9335
+ }
9311
9336
  .ChatSendArea:focus-within{
9312
9337
  border-color: darkcyan;
9313
9338
  }
@@ -9319,7 +9344,7 @@ const getCss = (composerHeight, listItemHeight, chatMessageFontSize, chatMessage
9319
9344
  }
9320
9345
 
9321
9346
  .ChatModelPicker{
9322
- border: 1px solid white;
9347
+ border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
9323
9348
  }
9324
9349
 
9325
9350
  .ChatListItem{
@@ -9391,8 +9416,9 @@ a.Button{
9391
9416
  }
9392
9417
 
9393
9418
  .ChatModelPickerList{
9419
+ margin:0;
9394
9420
  scrollbar-width: thin;
9395
- scrollbar-color: var(--vscode-scrollbarSlider-background) transparent;
9421
+ scrollbar-color: var(--vscode-scrollbarSlider-hoverBackground) var(--vscode-editorWidget-background, var(--vscode-editor-background));
9396
9422
  }
9397
9423
 
9398
9424
  .ChatModelPickerList::-webkit-scrollbar{
@@ -9400,11 +9426,11 @@ a.Button{
9400
9426
  }
9401
9427
 
9402
9428
  .ChatModelPickerList::-webkit-scrollbar-track{
9403
- background: transparent;
9429
+ background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
9404
9430
  }
9405
9431
 
9406
9432
  .ChatModelPickerList::-webkit-scrollbar-thumb{
9407
- background: var(--vscode-scrollbarSlider-background);
9433
+ background: var(--vscode-scrollbarSlider-hoverBackground);
9408
9434
  border: 2px solid transparent;
9409
9435
  border-radius: 999px;
9410
9436
  background-clip: content-box;
@@ -9430,6 +9456,22 @@ a.Button{
9430
9456
  text-overflow: ellipsis;
9431
9457
  }
9432
9458
 
9459
+ .ChatModelPickerContainer{
9460
+ position: absolute;
9461
+ inset:0;
9462
+ display: flex;
9463
+ flex-direction: column;
9464
+ pointer-events: none;
9465
+ }
9466
+
9467
+ .ChatModelPicker {
9468
+ position: static;
9469
+ background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
9470
+ margin-top: auto;
9471
+ margin-bottom: 90px;
9472
+ pointer-events: auto;
9473
+ }
9474
+
9433
9475
  `;
9434
9476
  return `${baseCss}
9435
9477
 
@@ -9599,7 +9641,8 @@ const ChatUnorderedList = 'ChatUnorderedList';
9599
9641
  const ChatUnorderedListItem = 'ChatUnorderedListItem';
9600
9642
  const MessageUser = 'MessageUser';
9601
9643
  const MessageAssistant = 'MessageAssistant';
9602
- const MultilineInputBox = 'MultilineInputBox';
9644
+ const ChatInputBox = 'ChatInputBox';
9645
+ const MultiLineInputBox = 'MultilineInputBox';
9603
9646
  const Option = 'Option';
9604
9647
  const TokenUsageOverview = 'TokenUsageOverview';
9605
9648
  const TokenUsageRing = 'TokenUsageRing';
@@ -9679,7 +9722,7 @@ const getChatModelPickerToggleVirtualDom = (models, selectedModelId, modelPicker
9679
9722
  name: ModelPickerToggle,
9680
9723
  onClick: HandleClick,
9681
9724
  title: selectedModelLabel,
9682
- type: Div
9725
+ type: Button$1
9683
9726
  }, {
9684
9727
  childCount: 1,
9685
9728
  type: Span
@@ -9842,6 +9885,16 @@ const getBackToChatsButtonDom = () => {
9842
9885
  }];
9843
9886
  };
9844
9887
 
9888
+ const getTodoItemClassName = status => {
9889
+ if (status === 'completed') {
9890
+ return `${ChatTodoListItem} ${ChatTodoListItemCompleted} completed`;
9891
+ }
9892
+ if (status === 'inProgress') {
9893
+ return `${ChatTodoListItem} ${ChatTodoListItemInProgress} inProgress`;
9894
+ }
9895
+ return `${ChatTodoListItem} ${ChatTodoListItemTodo} todo`;
9896
+ };
9897
+
9845
9898
  const clampToPercentage = (tokensUsed, tokensMax) => {
9846
9899
  if (tokensMax <= 0) {
9847
9900
  return 0;
@@ -9877,15 +9930,6 @@ const getUsageOverviewDom = (tokensUsed, tokensMax) => {
9877
9930
  }, text(usageLabel)];
9878
9931
  };
9879
9932
 
9880
- const getTodoItemClassName = status => {
9881
- if (status === 'completed') {
9882
- return `${ChatTodoListItem} ${ChatTodoListItemCompleted} completed`;
9883
- }
9884
- if (status === 'inProgress') {
9885
- return `${ChatTodoListItem} ${ChatTodoListItemInProgress} inProgress`;
9886
- }
9887
- return `${ChatTodoListItem} ${ChatTodoListItemTodo} todo`;
9888
- };
9889
9933
  const getChatSendAreaDom = (composerValue, modelPickerOpen, modelPickerSearchValue, models, newChatModelPickerEnabled, selectedModelId, usageOverviewEnabled, tokensUsed, tokensMax, addContextButtonEnabled, showRunMode, runMode, todoListToolEnabled, todoListItems, voiceDictationEnabled = false) => {
9890
9934
  const isSendDisabled = composerValue.trim() === '';
9891
9935
  const controlsCount = 2 + (usageOverviewEnabled ? 1 : 0) + (showRunMode ? 1 : 0) + (addContextButtonEnabled ? 1 : 0);
@@ -9920,7 +9964,7 @@ const getChatSendAreaDom = (composerValue, modelPickerOpen, modelPickerSearchVal
9920
9964
  type: Li
9921
9965
  }, text(item.text)])] : []), {
9922
9966
  childCount: 0,
9923
- className: MultilineInputBox,
9967
+ className: mergeClassNames(MultiLineInputBox, ChatInputBox),
9924
9968
  name: Composer,
9925
9969
  onContextMenu: HandleChatInputContextMenu,
9926
9970
  onFocus: HandleFocus,
@@ -12737,6 +12781,7 @@ const commandMap = {
12737
12781
  'Chat.mockOpenApiStreamPushChunk': wrapCommand(mockOpenApiStreamPushChunk),
12738
12782
  'Chat.mockOpenApiStreamReset': wrapCommand(mockOpenApiStreamReset),
12739
12783
  'Chat.openMockSession': wrapCommand(openMockSession),
12784
+ 'Chat.openModelPicker': wrapCommand(openModelPicker),
12740
12785
  'Chat.pasteInput': wrapCommand(pasteInput),
12741
12786
  'Chat.registerMockResponse': wrapCommand(registerMockResponse),
12742
12787
  'Chat.render2': render2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-view",
3
- "version": "6.24.0",
3
+ "version": "6.25.0",
4
4
  "description": "Chat View Worker",
5
5
  "repository": {
6
6
  "type": "git",