Skip to content

Commit

Permalink
[Obs AI Assistant] Address PR comments (#176299)
Browse files Browse the repository at this point in the history
  • Loading branch information
viduni94 committed Oct 31, 2024
1 parent ae8cc37 commit 98e0e2f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions x-pack/packages/kbn-ai-assistant/src/chat/chat_flyout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ export function ChatFlyout({
isOpen,
onClose,
navigateToConversation,
hidePreviousConversations,
hideConversationList,
}: {
initialTitle: string;
initialMessages: Message[];
initialFlyoutPositionMode?: FlyoutPositionMode;
isOpen: boolean;
onClose: () => void;
navigateToConversation?: (conversationId?: string) => void;
hidePreviousConversations?: boolean;
hideConversationList?: boolean;
}) {
const { euiTheme } = useEuiTheme();
const breakpoint = useCurrentEuiBreakpoint();
Expand Down Expand Up @@ -176,7 +176,7 @@ export function ChatFlyout({
}}
>
<EuiFlexGroup gutterSize="none" className={containerClassName}>
{!hidePreviousConversations ? (
{!hideConversationList ? (
<EuiFlexItem className={breakpoint === 'xs' ? hideClassName : sidebarClass}>
<EuiPopover
anchorPosition="downLeft"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function ChatContent({
service.conversations.openNewConversation({
messages,
title: defaultTitle,
hidePreviousConversations: true,
hideConversationList: true,
});
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function createService({
const predefinedConversation$ = new Subject<{
messages: Message[];
title?: string;
hidePreviousConversations?: boolean;
hideConversationList?: boolean;
}>();

const scope$ = new BehaviorSubject<AssistantScope[]>(scopes);
Expand Down Expand Up @@ -111,13 +111,13 @@ export function createService({
openNewConversation: ({
messages,
title,
hidePreviousConversations = false,
hideConversationList = false,
}: {
messages: Message[];
title?: string;
hidePreviousConversations?: boolean;
hideConversationList?: boolean;
}) => {
predefinedConversation$.next({ messages, title, hidePreviousConversations });
predefinedConversation$.next({ messages, title, hideConversationList });
},
predefinedConversation$: predefinedConversation$.asObservable(),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ export interface ObservabilityAIAssistantConversationService {
openNewConversation: ({}: {
messages: Message[];
title?: string;
hidePreviousConversations?: boolean;
hideConversationList?: boolean;
}) => void;
predefinedConversation$: Observable<{
messages: Message[];
title?: string;
hidePreviousConversations?: boolean;
hideConversationList?: boolean;
}>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export function NavControl() {
};
}, [service.conversations.predefinedConversation$]);

const { messages, title, hidePreviousConversations } = useObservable(
const { messages, title, hideConversationList } = useObservable(
service.conversations.predefinedConversation$
) ?? {
messages: [],
title: undefined,
hidePreviousConversations: false,
hideConversationList: false,
};

const theme = useTheme();
Expand Down Expand Up @@ -174,7 +174,7 @@ export function NavControl() {
)
);
}}
hidePreviousConversations={hidePreviousConversations}
hideConversationList={hideConversationList}
/>
</ObservabilityAIAssistantChatServiceContext.Provider>
) : undefined}
Expand Down

0 comments on commit 98e0e2f

Please sign in to comment.