x icon indicating copy to clipboard operation
x copied to clipboard

Add response appearing effect

Open dachihmao opened this issue 9 months ago • 3 comments

需求动机

请参考腾讯元宝的回复效果。文字的 opacity 逐渐从 0 变为 1。这种 appearing 的效果给人一种逐渐思考的感觉,非常适合大模型回复这种场景

提议的 API 是什么样的?

可以在 BubbleProps 的 typing 里面增加一个 appearing

dachihmao avatar May 31 '25 06:05 dachihmao

你提到的需求是关于在文字显示时增加一个逐渐出现的效果,即文字的透明度从 0 逐渐变为 1。这种效果确实可以给人一种逐渐思考的感觉,尤其适合用于大模型的回复场景。

关于提议的 API,你建议在 BubbleProps 的类型定义中增加一个 appearing 属性。这是一个合理的建议,可以通过在组件的样式中控制 opacity 属性来实现这种效果。

如果你有更多的具体实现细节或需要进一步的帮助,请随时告诉我!

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

petercat-assistant[bot] avatar May 31 '25 06:05 petercat-assistant[bot]

一个比元宝更好的效果是微软的 new bing,即:https://copilot.microsoft.com/ 当 SSE 数据到达时,一次性 fadeIn(也许缓存了2~3个message) typing有一个矛盾的地方,如果SSE数据达到的速度小于typing,则还是有卡顿的感觉;如果数据到达速度大于typing,用户会延时看到答复(因为还在等typing动画结束),这就有点为了typing而typing了。 new bing很好的解决了这个问题,强烈建议 antd x 也实现

lancemao avatar Jun 09 '25 02:06 lancemao

@lancemao 在做了。cc @Div627

https://github.com/ant-design/x/discussions/863

afc163 avatar Jun 09 '25 02:06 afc163