Skip to content

Commit b02c79f

Browse files
committed
Change chat container height to be relative to the parent's height
1 parent 0a3bcb6 commit b02c79f

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/ui-components/src/components/assistant-ui/assistant-top-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const AssistantTopBar = ({
5959
return (
6060
<div
6161
className={cn(
62-
'flex flex-col px-4 py-2 gap-[7px] flex-shrink-0 text-md dark:text-primary font-bold border-b border-gray-200',
62+
'flex flex-col px-4 py-2 gap-1 flex-shrink-0 text-md dark:text-primary font-bold border-b border-gray-200',
6363
)}
6464
>
6565
<div className="flex justify-between items-center gap-2">

packages/ui-components/src/components/assistant-ui/assistant-ui-chat-container.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type AssistantUiChatContainerProps = {
1818
} & ConnectionStatusProps &
1919
AssistantTopBarProps &
2020
ThreadProps & {
21-
// Step settings specific props
2221
stepLogoUrl?: string;
2322
stepDisplayName?: string;
2423
stepIndex?: number;

packages/ui-components/src/components/assistant-ui/step-settings-assistant-ui-chat-container.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import { AssistantUiChatContainer } from './assistant-ui-chat-container';
1515
import { ConnectionStatusProps } from './types';
1616

1717
const COLLAPSED_HEIGHT = 57;
18-
const DOCKED_HEIGHT = 700;
1918
const EXPANDED_HEIGHT_OFFSET = 122;
19+
const DOCKED_HEIGHT_OFFSET = 40;
2020
const FULL_WIDTH_HEIGHT = 100;
2121
const EXPANDED_WIDTH_OFFSET = 40;
2222
const REGULAR_WIDTH = 450;
@@ -74,7 +74,7 @@ const StepSettingsAssistantUiChatContainer = ({
7474
if (containerSize === AI_CHAT_CONTAINER_SIZES.COLLAPSED) {
7575
height = COLLAPSED_HEIGHT;
7676
} else if (containerSize === AI_CHAT_CONTAINER_SIZES.DOCKED) {
77-
height = DOCKED_HEIGHT;
77+
height = parentHeight - DOCKED_HEIGHT_OFFSET;
7878
} else if (containerSize === AI_CHAT_CONTAINER_SIZES.EXPANDED) {
7979
height = parentHeight - EXPANDED_HEIGHT_OFFSET;
8080
} else {

0 commit comments

Comments
 (0)