-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[unification][oblt] Integrate AI Assistant CTA #215207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
50944f6
02828d1
502d74c
d277e0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,12 @@ import { i18n } from '@kbn/i18n'; | |
| import React, { MouseEvent, useEffect, useMemo, useState } from 'react'; | ||
| import type { AuthenticatedUser } from '@kbn/security-plugin/common'; | ||
| import type { UseConversationListResult } from '../hooks/use_conversation_list'; | ||
| import { useConfirmModal, useConversationsByDate, useConversationContextMenu } from '../hooks'; | ||
| import { | ||
| useConfirmModal, | ||
| useConversationsByDate, | ||
| useConversationContextMenu, | ||
| useGenAIConnectors, | ||
| } from '../hooks'; | ||
| import { DATE_CATEGORY_LABELS } from '../i18n'; | ||
| import { NewChatButton } from '../buttons/new_chat_button'; | ||
| import { ConversationListItemLabel } from './conversation_list_item_label'; | ||
|
|
@@ -88,6 +93,7 @@ export function ConversationList({ | |
| }) { | ||
| const euiTheme = useEuiTheme(); | ||
| const scrollBarStyles = euiScrollBarStyles(euiTheme); | ||
| const { connectors } = useGenAIConnectors(); | ||
|
|
||
| const [allConversations, activeConversations, archivedConversations] = useMemo(() => { | ||
| const conversationList = conversations.value?.conversations ?? []; | ||
|
|
@@ -325,18 +331,20 @@ export function ConversationList({ | |
| </> | ||
| ) : null} | ||
|
|
||
| <EuiFlexItem grow={false}> | ||
| <EuiPanel paddingSize="s" hasBorder={false} hasShadow={false}> | ||
| <EuiFlexGroup alignItems="center"> | ||
| <EuiFlexItem grow className={newChatButtonWrapperClassName}> | ||
| <NewChatButton | ||
| href={newConversationHref} | ||
| onClick={(event) => onClickConversation(event)} | ||
| /> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| </EuiPanel> | ||
| </EuiFlexItem> | ||
| {connectors?.length ? ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don’t we allow navigating to a new conversation when there are no connectors? Currently, if there is no connector, we show a button to add one directly from the AI Assistant, without requiring navigation to the connector settings page. However, if a user previously had a connector, started a conversation, and then deleted the connector, they can still see the list of past conversations. In this scenario, we should allow the user to navigate back to the “New Conversation” page from the “Add Connector” button.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be raised with @isaclfreire and others involved in the unified design. The designs make no allowances for "New Conversation" to be available. |
||
| <EuiFlexItem grow={false}> | ||
| <EuiPanel paddingSize="s" hasBorder={false} hasShadow={false}> | ||
| <EuiFlexGroup alignItems="center"> | ||
| <EuiFlexItem grow className={newChatButtonWrapperClassName}> | ||
| <NewChatButton | ||
| href={newConversationHref} | ||
| onClick={(event) => onClickConversation(event)} | ||
| /> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| </EuiPanel> | ||
| </EuiFlexItem> | ||
| ) : null} | ||
| </EuiFlexGroup> | ||
| </EuiPanel> | ||
| {confirmDeleteElement} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.