对多个会话独立聊天进行管理场景问题咨询
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.2k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 2
Description
### Conversations 组件创建新会话问题
点击创建新会话后,切换到其他会话,然后再点击创建新会话,会重复添加新会话到会话列表。
这个只能自己去判断是否继续添加新会话到会话列表吗?
### 新会话 AI 返回消息后,怎么将 Conversations 里新会话数据的 key 更新为AI消息返回的 conversationId 数据
Conversations 的新会话key是一个临时的手动创建的数据,并且同步传递给了 useXChat hook 的 conversationKey 配置实现多会话独立聊天切换。
但是如果将 Conversations 里新会话数据的 key 更新为AI消息返回的 conversationId,并调用 setActiveConversationKey 更新选中的会话,会导致会话消息清空并无法获取最新消息(useXChat hook 的 conversationKey 配置使用的是useXConversations hook 返回的 activeConversationKey 数据)
这个有什么好的方案能保证更新 conversationId 后消息数据不丢失并能正常更新消息数据吗?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Conversations component and the useXChat and useXConversations hooks described in the report. Reproduce creating two sessions, switching sessions, and replacing a temporary key with the returned conversationId. Done means new sessions are not duplicated and switching to the updated key preserves and refreshes its messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100