@lvce-editor/chat-view 6.65.0 → 6.66.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.
@@ -1873,6 +1873,11 @@ const OpenApiApiKeyPlaceholder = 'Enter OpenAI API key';
1873
1873
  const SendMessage = 'Send message';
1874
1874
  const StartVoiceDictation = 'Start voice dictation';
1875
1875
  const AddContext$1 = 'Add Context';
1876
+ const AddAction = 'Add Action';
1877
+ const OpenInVsCode = 'Open in VSCode';
1878
+ const Commit = 'Commit';
1879
+ const OpenTerminal = 'Open Terminal';
1880
+ const ShowDiff = 'Show Diff';
1876
1881
  const CreatePullRequest$2 = 'Create PR';
1877
1882
  const Save = 'Save';
1878
1883
  const Saving = 'Saving...';
@@ -1985,6 +1990,21 @@ const startVoiceDictation = () => {
1985
1990
  const addContext = () => {
1986
1991
  return i18nString(AddContext$1);
1987
1992
  };
1993
+ const addAction = () => {
1994
+ return i18nString(AddAction);
1995
+ };
1996
+ const openInVsCode = () => {
1997
+ return i18nString(OpenInVsCode);
1998
+ };
1999
+ const commit = () => {
2000
+ return i18nString(Commit);
2001
+ };
2002
+ const openTerminal = () => {
2003
+ return i18nString(OpenTerminal);
2004
+ };
2005
+ const showDiff = () => {
2006
+ return i18nString(ShowDiff);
2007
+ };
1988
2008
  const createPullRequest = () => {
1989
2009
  return i18nString(CreatePullRequest$2);
1990
2010
  };
@@ -3331,6 +3351,11 @@ const ComposerAttachmentRemovePrefix = 'composer-attachment-remove:';
3331
3351
  const AddContext = 'add-context';
3332
3352
  const Dictate = 'dictate';
3333
3353
  const CreatePullRequest$1 = 'create-pull-request';
3354
+ const FocusAddAction = 'focus-add-action';
3355
+ const FocusOpenInVsCode = 'focus-open-in-vscode';
3356
+ const FocusCommit = 'focus-commit';
3357
+ const FocusOpenTerminal = 'focus-open-terminal';
3358
+ const FocusShowDiff = 'focus-show-diff';
3334
3359
  const Send = 'send';
3335
3360
  const Back = 'back';
3336
3361
  const ModelPickerToggle = 'model-picker-toggle';
@@ -6532,6 +6557,9 @@ const Chat = 'Chat';
6532
6557
  const ChatActions = 'ChatActions';
6533
6558
  const ChatAuthError = 'ChatAuthError';
6534
6559
  const ChatFocus = 'ChatFocus';
6560
+ const ChatFocusActions = 'ChatFocusActions';
6561
+ const ChatFocusHeader = 'ChatFocusHeader';
6562
+ const ChatFocusProject = 'ChatFocusProject';
6535
6563
  const ChatHeader = 'ChatHeader';
6536
6564
  const ChatHeaderLabel = 'ChatHeaderLabel';
6537
6565
  const ChatInputBox = 'ChatInputBox';
@@ -10845,6 +10873,10 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10845
10873
  pointer-events: auto;
10846
10874
  }
10847
10875
 
10876
+ .ChatViewDropOverlayActive{
10877
+ background: rgba(255, 255, 255, 0.1);
10878
+ }
10879
+
10848
10880
  .RunModePickerPopOver{
10849
10881
  overflow: hidden;
10850
10882
  border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
@@ -10899,6 +10931,15 @@ const getCss = (composerHeight, composerAttachmentsHeight, modelPickerHeight, li
10899
10931
  min-width: 0;
10900
10932
  }
10901
10933
 
10934
+ .ChatFocus .ChatMessages > .Message{
10935
+ inline-size: fit-content;
10936
+ max-inline-size: min(100%, var(--ChatFocusContentMaxWidth));
10937
+ }
10938
+
10939
+ .ChatFocus .ChatMessages > .Message > .ChatMessageContent{
10940
+ max-inline-size: 100%;
10941
+ }
10942
+
10902
10943
  `;
10903
10944
  return `${baseCss}
10904
10945
 
@@ -11390,6 +11431,57 @@ const getChatSendAreaDom = (composerValue, composerAttachments, agentMode, agent
11390
11431
  }, ...(showAgentModePicker ? getAgentModePickerVirtualDom(agentMode, agentModePickerOpen) : []), ...getChatModelPickerToggleVirtualDom(models, selectedModelId, modelPickerOpen), ...(reasoningPickerEnabled ? getReasoningEffortPickerVirtualDom(reasoningEffort, reasoningEffortPickerOpen) : []), ...(showResponsiveRunModePicker ? getRunModePickerVirtualDom(runMode, runModePickerOpen) : []), ...(usageOverviewEnabled ? getUsageOverviewDom(tokensUsed, tokensMax) : []), ...(addContextButtonEnabled ? getAddContextButtonDom() : []), ...(showCreatePullRequestButton ? getCreatePullRequestButtonDom() : []), ...getSendButtonDom(isSendDisabled, voiceDictationEnabled)];
11391
11432
  };
11392
11433
 
11434
+ const focusHeaderStyle = 'align-items:center;border-bottom:1px solid var(--vscode-panel-border, transparent);display:flex;gap:12px;justify-content:space-between;padding:8px 12px;';
11435
+ const focusHeaderMetaStyle = 'align-items:baseline;display:flex;gap:8px;min-width:0;overflow:hidden;';
11436
+ const focusHeaderTitleStyle = 'margin:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;';
11437
+ const focusHeaderProjectStyle = 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap;';
11438
+ const focusHeaderActionsStyle = 'display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;';
11439
+ const focusHeaderButtonStyle = 'white-space:nowrap;';
11440
+ const getFocusHeaderActionButtonDom = (label, name) => {
11441
+ return [{
11442
+ childCount: 1,
11443
+ className: mergeClassNames(Button, ButtonSecondary),
11444
+ inputType: 'button',
11445
+ name,
11446
+ onClick: HandleClick,
11447
+ style: focusHeaderButtonStyle,
11448
+ title: label,
11449
+ type: Button$1
11450
+ }, text(label)];
11451
+ };
11452
+ const getChatHeaderDomFocusMode = (selectedSessionTitle, selectedProjectName) => {
11453
+ const items = [[addAction(), FocusAddAction], [openInVsCode(), FocusOpenInVsCode], [commit(), FocusCommit], [openTerminal(), FocusOpenTerminal], [showDiff(), FocusShowDiff]];
11454
+ const hasProjectName = !!selectedProjectName;
11455
+ return [{
11456
+ childCount: 2,
11457
+ className: ChatFocusHeader,
11458
+ style: focusHeaderStyle,
11459
+ type: Header
11460
+ }, {
11461
+ childCount: hasProjectName ? 2 : 1,
11462
+ className: ChatName,
11463
+ style: focusHeaderMetaStyle,
11464
+ type: Div
11465
+ }, {
11466
+ childCount: 1,
11467
+ className: ChatHeaderLabel,
11468
+ style: focusHeaderTitleStyle,
11469
+ type: H2
11470
+ }, text(selectedSessionTitle), ...(hasProjectName ? [{
11471
+ childCount: 1,
11472
+ className: mergeClassNames(LabelDetail, ChatFocusProject),
11473
+ style: focusHeaderProjectStyle,
11474
+ type: Span
11475
+ }, text(selectedProjectName)] : []), {
11476
+ 'aria-label': 'focus header actions',
11477
+ childCount: items.length,
11478
+ className: ChatFocusActions,
11479
+ role: ToolBar,
11480
+ style: focusHeaderActionsStyle,
11481
+ type: Div
11482
+ }, ...items.flatMap(([label, name]) => getFocusHeaderActionButtonDom(label, name))];
11483
+ };
11484
+
11393
11485
  const getCustomSelectPopOverVirtualDom = (optionCount, height, optionNodes, containerClassName = '', popOverClassName = '') => {
11394
11486
  return [{
11395
11487
  childCount: 1,
@@ -12963,19 +13055,20 @@ const getMessagesDom = (messages, parsedMessages, openRouterApiKeyInput, openApi
12963
13055
  }, ...displayMessages.flatMap(item => getChatMessageDom(item.message, item.parsedContent, openRouterApiKeyInput, openApiApiKeyInput, openApiApiKeyState, openApiApiKeysSettingsUrl, openApiApiKeyInputPattern, openRouterApiKeyState, useChatMathWorker))];
12964
13056
  };
12965
13057
 
13058
+ const arrowLeft$1 = {
13059
+ childCount: 0,
13060
+ className: mergeClassNames(MaskIcon, MaskIconArrowLeft),
13061
+ type: Div
13062
+ };
12966
13063
  const getBackToChatsButtonDom = () => {
12967
13064
  return [{
12968
13065
  childCount: 1,
12969
- className: mergeClassNames(Button, ButtonSecondary),
12970
- inputType: 'button',
13066
+ className: IconButton,
12971
13067
  name: Back,
12972
13068
  onClick: HandleClickBack,
12973
13069
  title: backToChatList(),
12974
13070
  type: Button$1
12975
- }, {
12976
- text: backToChatList(),
12977
- type: Text
12978
- }];
13071
+ }, arrowLeft$1];
12979
13072
  };
12980
13073
 
12981
13074
  const getProjectSessionDom = (session, selectedSessionId) => {
@@ -13118,21 +13211,24 @@ const getChatModeChatFocusVirtualDom = ({
13118
13211
  voiceDictationEnabled = false
13119
13212
  }) => {
13120
13213
  const selectedSession = sessions.find(session => session.id === selectedSessionId);
13214
+ const selectedProject = projects.find(project => project.id === selectedProjectId);
13121
13215
  const messages = selectedSession ? selectedSession.messages : [];
13216
+ const selectedSessionTitle = selectedSession?.title || chatTitle();
13217
+ const selectedProjectName = selectedProject?.name || '';
13122
13218
  const showCreatePullRequestButton = canCreatePullRequest(selectedSession);
13123
13219
  const isDropOverlayVisible = composerDropEnabled && composerDropActive;
13124
13220
  const isAgentModePickerVisible = hasSpaceForAgentModePicker && agentModePickerOpen;
13125
13221
  const isNewModelPickerVisible = modelPickerOpen;
13126
13222
  const isRunModePickerVisible = showRunMode && hasSpaceForRunModePicker && runModePickerOpen;
13127
13223
  const hasVisibleOverlays = isDropOverlayVisible || isAgentModePickerVisible || isNewModelPickerVisible || isRunModePickerVisible;
13128
- const chatRootChildCount = 3 + (hasVisibleOverlays ? 1 : 0);
13224
+ const chatRootChildCount = 4 + (hasVisibleOverlays ? 1 : 0);
13129
13225
  return [{
13130
13226
  childCount: chatRootChildCount,
13131
13227
  className: mergeClassNames(Viewlet, Chat, ChatFocus),
13132
13228
  onDragEnter: HandleDragEnterChatView,
13133
13229
  onDragOver: HandleDragOverChatView,
13134
13230
  type: Div
13135
- }, ...getProjectListDom(projects, sessions, projectExpandedIds, selectedProjectId, selectedSessionId, projectListScrollTop, true), ...getMessagesDom(messages, parsedMessages, openRouterApiKeyInput, openApiApiKeyInput, openApiApiKeyState, openApiApiKeysSettingsUrl, openApiApiKeyInputPattern, openRouterApiKeyState, messagesScrollTop, useChatMathWorker, true), ...getChatSendAreaDom(composerValue, composerAttachments, agentMode, agentModePickerOpen, hasSpaceForAgentModePicker, modelPickerOpen, models, selectedModelId, reasoningPickerEnabled, reasoningEffort, reasoningEffortPickerOpen, usageOverviewEnabled, tokensUsed, tokensMax, addContextButtonEnabled, showRunMode, hasSpaceForRunModePicker, runMode, runModePickerOpen, todoListToolEnabled, todoListItems, showCreatePullRequestButton, voiceDictationEnabled), ...getChatOverlaysVirtualDom({
13231
+ }, ...getProjectListDom(projects, sessions, projectExpandedIds, selectedProjectId, selectedSessionId, projectListScrollTop, true), ...getChatHeaderDomFocusMode(selectedSessionTitle, selectedProjectName), ...getMessagesDom(messages, parsedMessages, openRouterApiKeyInput, openApiApiKeyInput, openApiApiKeyState, openApiApiKeysSettingsUrl, openApiApiKeyInputPattern, openRouterApiKeyState, messagesScrollTop, useChatMathWorker, true), ...getChatSendAreaDom(composerValue, composerAttachments, agentMode, agentModePickerOpen, hasSpaceForAgentModePicker, modelPickerOpen, models, selectedModelId, reasoningPickerEnabled, reasoningEffort, reasoningEffortPickerOpen, usageOverviewEnabled, tokensUsed, tokensMax, addContextButtonEnabled, showRunMode, hasSpaceForRunModePicker, runMode, runModePickerOpen, todoListToolEnabled, todoListItems, showCreatePullRequestButton, voiceDictationEnabled), ...getChatOverlaysVirtualDom({
13136
13232
  agentMode,
13137
13233
  agentModePickerVisible: isAgentModePickerVisible,
13138
13234
  dropOverlayVisible: isDropOverlayVisible,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-view",
3
- "version": "6.65.0",
3
+ "version": "6.66.0",
4
4
  "description": "Chat View Worker",
5
5
  "repository": {
6
6
  "type": "git",