diff --git a/src/ActionIconGroup/index.tsx b/src/ActionIconGroup/index.tsx index 18668bc..f43be8a 100644 --- a/src/ActionIconGroup/index.tsx +++ b/src/ActionIconGroup/index.tsx @@ -69,7 +69,6 @@ const ActionIconGroup = memo( const tooltipsPlacement = placement || (direction === 'column' ? 'right' : 'top'); const mergeDropDownList = dropdownMenu?.map((item: any) => { - console.log('##cloes', item); return { ...item, icon: , diff --git a/src/ChatItem/type.ts b/src/ChatItem/type.ts index 865c37c..86ca8b0 100644 --- a/src/ChatItem/type.ts +++ b/src/ChatItem/type.ts @@ -2,6 +2,7 @@ import { ReactNode } from 'react'; import { ActionsProps } from '@/ChatList/ActionsBar'; import { EditableMessageProps } from '@/EditableMessage'; +import { OpenAIChatMessage } from '@/ProChat/types/chat'; import { ChatMessageError, DivProps, MetaData } from '@/types'; import { MarkdownProps } from '@ant-design/pro-editor'; @@ -104,11 +105,11 @@ export interface ChatItemProps> { ) => ReactNode >; actionsCallbacks?: { - onEditFinished?: (id?: string, value?: string) => void; - beforeDelFinished?: (id?: string) => void; - onRegenerateFinished?: (id?: string, error?: boolean) => void; + onEdit?: (id?: string, value?: string) => Promise | void; + onDelete?: (id?: string) => Promise | void; + onRegenerate?: (id?: string, error?: boolean) => Promise | void; }; - actionsProps?: Record; + actionsProps?: Record; }; renderErrorMessages?: (data: ChatMessageError) => ReactNode; diff --git a/src/ProChat/__test__/__snapshots__/demo.test.tsx.snap b/src/ProChat/__test__/__snapshots__/demo.test.tsx.snap index afe0649..16e6ded 100644 --- a/src/ProChat/__test__/__snapshots__/demo.test.tsx.snap +++ b/src/ProChat/__test__/__snapshots__/demo.test.tsx.snap @@ -280,6 +280,575 @@ exports[` > renders actions.tsx correctly 1`] = ` `; +exports[` > renders actionsCallBack.tsx correctly 1`] = ` + +
+
+
+
+
+
+
+ + avatar + +
+
+
+ Ant Design + +
+
+
+
+
+
+

+ 我对三体世界说话。 +

+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+ 🛸 +
+
+
+
+
+
+ 三体世界 + +
+
+
+
+
+
+

+ 保持静默,不要回答,不要回答。 +

+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+