Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,31 @@ tag: vVERSION
## 1.2.0

`2025-04-25`

- ๐Ÿ› Delete Conversations ellipsis tooltip , fix 'tooltip' display error issue.[#776](https://github.com/ant-design/x/pull/776) by [@afc163](https://github.com/afc163)
- ๐Ÿ› Fixed Attachments `image` card style.[#751](https://github.com/ant-design/x/pull/751) by [@wzc520pyfm](https://github.com/wzc520pyfm)
- ๐Ÿ› Fixed ThoughtChain controlled issue.[#752](https://github.com/ant-design/x/pull/752) by [@Youzi2233](https://github.com/Youzi2233)
- ๐Ÿ› Fixed Attachments `image` card style.[#751](https://github.com/ant-design/x/pull/751) by [@wzc520pyfm](https://github.com/wzc520pyfm)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ๅ›žๆปšไธ€ไธ‹ไธ็›ธๅนฒ็š„ๅ˜ๅŠจ๏ผŒๅฆๅˆ™ไผšๅฏผ่‡ด blame ้ƒฝๅฏนๅบ”ๅˆฐ่ฟ™ไธช PR ไธŠ

- ๐Ÿ› Fixed ThoughtChain controlled issue.[#752](https://github.com/ant-design/x/pull/752) by [@Youzi2233](https://github.com/Youzi2233)
- XRequest
- ๐Ÿ†• XRequestCallbacks adds an 'onStream' callback that allows for stream listening and abort operations.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fixed the issue of XRequestOptions changes not taking effect and added a demo.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add an example of model integration. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ“– Inaccurate parameter naming in optimizing API methods.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XRequestCallbacks adds an 'onStream' callback that allows for stream listening and abort operations.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fixed the issue of XRequestOptions changes not taking effect and added a demo.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add an example of model integration. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ“– Inaccurate parameter naming in optimizing API methods.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- useXAgent
- ๐Ÿ†• RequestFn adds an `onStream` callback that allows for stream listening and abort operations.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• RequestFn has added a `transformStream` transformation function for processing stream data.[#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fix the issue of XAgentConfig Preset changes not taking effect and add an example.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fix the issue of incorrect callback types for RequestFn ` onSuccess ` and update the corresponding demo. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add model access, Custom RequestParams,and customize `XRequestOptions`demos. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon) ๆไบคใ€[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• RequestFn adds an `onStream` callback that allows for stream listening and abort operations.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• RequestFn has added a `transformStream` transformation function for processing stream data.[#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fix the issue of XAgentConfig Preset changes not taking effect and add an example.[#736](https://github.com/ant-design/x/pull/736) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fix the issue of incorrect callback types for RequestFn `onSuccess` and update the corresponding demo. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add model access, Custom RequestParams,and customize `XRequestOptions`demos. [#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon) ๆไบคใ€[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- useXChat
- ๐Ÿ†• XChatConfig adds input and output generic types.[#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `transformMessage` transformation function,which can transform `messages` when updating data and update to `messages` at the same time. [#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `transformStream`conversion function for processing stream data.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `resolveAbortController`callback function, which can obtain the`AbortController` controller for controlling the stream state.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add model access examples and remove incorrect abort examples. [#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fixed the issue of Sender `header` `border-radius` style overflow.[#732](https://github.com/ant-design/x/pull/732) by [@Bao0630](https://github.com/Bao0630)
- ๐Ÿ“– Add a copilot style model room.[#657](https://github.com/ant-design/x/pull/657) by [@vanndxh](https://github.com/vanndxh)
- ๐Ÿ“– Refactoring the independent model room.[#753](https://github.com/ant-design/x/pull/753) by [@vanndxh](https://github.com/vanndxh)
- ๐Ÿ“– Enhance the official website to improve user experience.[#730](https://github.com/ant-design/x/pull/730) by [@afc163](https://github.com/afc163) ๆไบคใ€[#758](https://github.com/ant-design/x/pull/758) by [@coding-ice](https://github.com/coding-ice) ๆไบคใ€ [#761](https://github.com/ant-design/x/pull/761) by [@ONLY-yours](https://github.com/ONLY-yours)
- ๐Ÿ†• XChatConfig adds input and output generic types.[#725](https://github.com/ant-design/x/pull/725) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `transformMessage` transformation function,which can transform `messages` when updating data and update to `messages` at the same time. [#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `transformStream`conversion function for processing stream data.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• XChatConfig adds `resolveAbortController`callback function, which can obtain the`AbortController` controller for controlling the stream state.[#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ†• Add model access examples and remove incorrect abort examples. [#711](https://github.com/ant-design/x/pull/711) by [@kimteayon](https://github.com/kimteayon)
- ๐Ÿ› Fixed the issue of Sender `header` `border-radius` style overflow.[#732](https://github.com/ant-design/x/pull/732) by [@Bao0630](https://github.com/Bao0630)
- ๐Ÿ“– Add a copilot style model room.[#657](https://github.com/ant-design/x/pull/657) by [@vanndxh](https://github.com/vanndxh)
- ๐Ÿ“– Refactoring the independent model room.[#753](https://github.com/ant-design/x/pull/753) by [@vanndxh](https://github.com/vanndxh)
- ๐Ÿ“– Enhance the official website to improve user experience.[#730](https://github.com/ant-design/x/pull/730) by [@afc163](https://github.com/afc163) ๆไบคใ€[#758](https://github.com/ant-design/x/pull/758) by [@coding-ice](https://github.com/coding-ice) ๆไบคใ€ [#761](https://github.com/ant-design/x/pull/761) by [@ONLY-yours](https://github.com/ONLY-yours)

## 1.1.1

Expand Down
7 changes: 5 additions & 2 deletions components/bubble/Bubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const Bubble: React.ForwardRefRenderFunction<BubbleRef, BubbleProps> = (props, r
onTypingComplete,
header,
footer,
_key,
...otherHtmlProps
} = props;

Expand Down Expand Up @@ -116,6 +117,8 @@ const Bubble: React.ForwardRefRenderFunction<BubbleRef, BubbleProps> = (props, r
() => (messageRender ? messageRender(typedContent as any) : typedContent),
[typedContent, messageRender],
);
const renderSlot = (node: BubbleProps<any>['footer'] | BubbleProps<any>['header']) =>
typeof node === 'function' ? node(typedContent, { key: _key }) : node;

// ============================ Render ============================
let contentNode: React.ReactNode;
Expand Down Expand Up @@ -163,7 +166,7 @@ const Bubble: React.ForwardRefRenderFunction<BubbleRef, BubbleProps> = (props, r
...styles.header,
}}
>
{header}
{renderSlot(header)}
</div>
)}
{fullContent}
Expand All @@ -179,7 +182,7 @@ const Bubble: React.ForwardRefRenderFunction<BubbleRef, BubbleProps> = (props, r
...styles.footer,
}}
>
{typeof footer === 'function' ? footer(mergedContent) : footer}
{renderSlot(footer)}
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/bubble/BubbleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export interface BubbleListRef {
}) => void;
}

export type BubbleDataType = BubbleProps & {
export type BubbleDataType = BubbleProps<any> & {
key?: string | number;
role?: string;
};

export type RoleType = Partial<Omit<BubbleProps, 'content'>>;
export type RoleType = Partial<Omit<BubbleProps<any>, 'content'>>;

export type RolesType =
| Record<string, RoleType>
Expand Down
Loading