@gravity-ui/aikit 0.4.1 → 0.4.2

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.
@@ -12,6 +12,7 @@ import './MessageList.scss';
12
12
  const b = block('message-list');
13
13
  export function MessageList({ messages, messageRendererRegistry, transformOptions, showActionsOnHover, showTimestamp, showAvatar, userActions, assistantActions, loaderStatuses = ['submitted'], className, qa, status, errorMessage, onRetry, hasPreviousMessages = false, onLoadPreviousMessages, }) {
14
14
  const isStreaming = status === 'streaming';
15
+ const isSubmitted = status === 'submitted';
15
16
  const messagesCount = messages.length;
16
17
  const showLoader = status && loaderStatuses.includes(status);
17
18
  const { containerRef, endRef, scrollToBottom } = useSmartScroll(isStreaming, messagesCount);
@@ -27,7 +28,8 @@ export function MessageList({ messages, messageRendererRegistry, transformOption
27
28
  }
28
29
  if (isAssistantMessage(message)) {
29
30
  const isLastMessage = index === messages.length - 1;
30
- const showActions = !(isLastMessage && isStreaming);
31
+ const isNotCompleted = isSubmitted || isStreaming;
32
+ const showActions = !(isLastMessage && isNotCompleted);
31
33
  const actions = showActions
32
34
  ? resolveMessageActions(message, assistantActions)
33
35
  : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/aikit",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Gravity UI base kit for building ai assistant chats",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",