@promptbook/wizard
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
48 lines (47 loc) • 1.84 kB
TypeScript
import { type MouseEvent, type MutableRefObject, type ReactNode } from 'react';
import type { Promisable } from 'type-fest';
import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
import type { ChatMessage } from '../types/ChatMessage';
import type { ChatParticipant } from '../types/ChatParticipant';
import type { ChatUiTranslations } from './ChatProps';
/**
* Props for the Chat actions toolbar.
*
* @private component of `<Chat/>`
*/
export type ChatActionsBarProps = {
actionsRef: MutableRefObject<HTMLDivElement | null>;
actionsContainer?: HTMLElement | null;
messages: ReadonlyArray<ChatMessage>;
participants: ReadonlyArray<ChatParticipant>;
title: string;
onReset?: () => Promisable<void>;
resetRequiresConfirmation?: boolean;
/**
* Optional navigation target for the "New chat" control.
*
* When provided, the control is rendered as a link so the host app can rely
* on browser-native navigation affordances such as opening in a new tab/window.
*/
newChatButtonHref?: string;
onUseTemplate?: () => void;
extraActions?: ReactNode;
saveFormats?: Array<string_chat_format_name>;
isSaveButtonEnabled: boolean;
shouldFadeActions: boolean;
/**
* Disables action interactions while scroll is active.
*/
shouldDisableActions: boolean;
/**
* Optional localized labels for Chat UI strings such as button labels.
*/
chatUiTranslations?: ChatUiTranslations;
onButtonClick: (handler?: (event: MouseEvent<HTMLButtonElement>) => void) => (event: MouseEvent<HTMLButtonElement>) => void;
};
/**
* Renders the action buttons row for Chat.
*
* @private component of `<Chat/>`
*/
export declare function ChatActionsBar(props: ChatActionsBarProps): import("react/jsx-runtime").JSX.Element;