Skip to content

Commit 838b63c

Browse files
committed
move constants out from bot.tsx
1 parent 670212b commit 838b63c

9 files changed

Lines changed: 403 additions & 400 deletions

File tree

dist/components/Bot.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export type MessageType = {
8080
};
8181
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
8282
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
83-
export declare const CHAT_HEADER_HEIGHT = 50;
8483
export type BotProps = {
8584
chatflowid: string;
8685
apiHost?: string;

dist/components/Bot.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/constants.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import type { BubbleProps } from './features/bubble';
22
export declare const defaultBotProps: BubbleProps;
3+
export declare const CHAT_HEADER_HEIGHT = 50;
34
//# sourceMappingURL=constants.d.ts.map

dist/constants.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.js

Lines changed: 198 additions & 197 deletions
Large diffs are not rendered by default.

dist/web.umd.js

Lines changed: 198 additions & 197 deletions
Large diffs are not rendered by default.

src/components/Bot.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
} from '@/utils';
4646
import { FollowUpPromptBubble } from '@/components/bubbles/FollowUpPromptBubble';
4747
import { fetchEventSource, EventStreamContentType } from '@microsoft/fetch-event-source';
48+
import { CHAT_HEADER_HEIGHT } from '@/constants';
4849

4950
export type FileEvent<T = EventTarget> = {
5051
target: T;
@@ -145,8 +146,6 @@ type IUploads = {
145146
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
146147
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
147148

148-
export const CHAT_HEADER_HEIGHT = 50;
149-
150149
export type BotProps = {
151150
chatflowid: string;
152151
apiHost?: string;

src/components/treeview/NodeDetailsDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createSignal, Show, For, JSXElement } from 'solid-js';
22
import { Marked } from '@ts-stack/markdown';
33
import DOMPurify from 'dompurify';
44
import { getAgentflowIcon } from './AgentflowIcons';
5-
import { CHAT_HEADER_HEIGHT } from '../Bot';
5+
import { CHAT_HEADER_HEIGHT } from '@/constants';
66

77
type NodeDetailsDialogProps = {
88
isOpen: boolean;

src/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ export const defaultBotProps: BubbleProps = {
88
theme: undefined,
99
observersConfig: undefined,
1010
};
11+
12+
export const CHAT_HEADER_HEIGHT = 50;

0 commit comments

Comments
 (0)