import React from 'react'; import { ThoughtChainListProps } from '../ThoughtChainList/types'; import { BubbleProps, BubbleRenderConfig } from './type'; type ContextRenderCallback = T extends (props: BubbleProps, ...args: infer Args) => infer Result ? { render(props: ContextBubbleProps, ...args: Args): Result; }['render'] : T; type ContextBubbleRenderConfig = { [K in keyof BubbleRenderConfig]: K extends 'extraRender' | 'extraRightRender' | 'customConfig' ? BubbleRenderConfig[K] : ContextRenderCallback; }; interface ContextBubbleProps extends Omit { bubbleRenderConfig?: ContextBubbleRenderConfig; } export type ChatConfigType = { agentId?: string; sessionId?: string; standalone: boolean; clientIdRef?: React.MutableRefObject; thoughtChain?: { enable?: boolean; alwaysRender?: boolean; render?: (bubble: BubbleProps>, taskList: string) => React.ReactNode; } & ThoughtChainListProps; tracert?: { /** * 是否开启 */ enable: boolean; }; /** 当前气泡属性 */ bubble?: ContextBubbleProps; compact?: boolean; /** * extra(点赞、踩、复制等)是否仅在 hover 时展示 * @default false 默认常驻展示 */ extraShowOnHover?: boolean; }; export declare const BubbleConfigContext: React.Context; export {};