@gravity-ui/aikit 0.4.0 → 0.4.1

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.
@@ -23,5 +23,6 @@ export function PromptInputFull(props) {
23
23
  state: submitButtonState,
24
24
  tooltipSend: submitButtonTooltipSend,
25
25
  tooltipCancel: submitButtonTooltipCancel,
26
+ qa: 'submit-button-full',
26
27
  }, showSettings: showSettings, onSettingsClick: onSettingsClick, showAttachment: showAttachment, onAttachmentClick: onAttachmentClick, showMicrophone: showMicrophone, onMicrophoneClick: onMicrophoneClick, children: bottomContent }))] }));
27
28
  }
@@ -19,5 +19,6 @@ export function PromptInputSimple(props) {
19
19
  state: submitButtonState,
20
20
  tooltipSend: submitButtonTooltipSend,
21
21
  tooltipCancel: submitButtonTooltipCancel,
22
+ qa: 'submit-button-simple',
22
23
  }, showAttachment: showAttachment, onAttachmentClick: onAttachmentClick, showMicrophone: showMicrophone, onMicrophoneClick: onMicrophoneClick, buttonSize: "l", children: bottomContent })] }) }));
23
24
  }
@@ -47,7 +47,7 @@ export function useChatContainer(props) {
47
47
  // Build baseActions for Header
48
48
  const baseActions = useMemo(() => {
49
49
  const actions = [];
50
- if (showNewChat) {
50
+ if (showNewChat && chatContentView !== 'empty') {
51
51
  actions.push(HeaderAction.NewChat);
52
52
  }
53
53
  if (showHistory) {
@@ -57,7 +57,7 @@ export function useChatContainer(props) {
57
57
  actions.push(HeaderAction.Close);
58
58
  }
59
59
  return actions;
60
- }, [showNewChat, showHistory, showClose]);
60
+ }, [showNewChat, showHistory, showClose, chatContentView]);
61
61
  return {
62
62
  // State
63
63
  chatContentView,
@@ -15,5 +15,5 @@ export function ChatContent(props) {
15
15
  const isEmptyView = view === 'empty';
16
16
  return (_jsx("div", { className: b(null, className), "data-qa": qa, children: isEmptyView
17
17
  ? emptyContainerProps && _jsx(EmptyContainer, Object.assign({}, emptyContainerProps))
18
- : messageListProps && (_jsx("div", { className: b('message-list-container'), children: _jsx(MessageList, Object.assign({}, messageListProps, { className: b('message-list', messageListProps.className) })) })) }));
18
+ : messageListProps && (_jsx("div", { className: b('message-list-container'), children: _jsx(MessageList, Object.assign({}, messageListProps, { className: b('message-list', messageListProps.className), qa: `message-list${qa ? `-${qa}` : ''}` })) })) }));
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/aikit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Gravity UI base kit for building ai assistant chats",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",