refactor(chat): 优化聊天组件初始化逻辑和性能
- 修改了 ChatWrapper 组件中的 useEffect,增加了对 config.initial_message 的判断 - 移除了 ChatConfigProvider 中的 opening_statement 属性 - 调整了 useChat hook 中的逻辑,使用 initial_message 替代 opening_statement - 优化了 Chat 组件的结构,移除了不必要的类名和属性 - 改进了 InitQuestions 组件的性能,使用 useMemo 避免不必要的渲染
Showing
14 changed files
with
42 additions
and
68 deletions
-
Please register or sign in to post a comment