Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 子对话上下文展开问题 #5365

Open
GowayLee opened this issue Jan 9, 2025 · 5 comments
Open

[Bug] 子对话上下文展开问题 #5365

GowayLee opened this issue Jan 9, 2025 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@GowayLee
Copy link

GowayLee commented Jan 9, 2025

📦 部署环境

Docker

📌 软件版本

v1.45.0

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

在进入子对话聊天窗口后, 上文(之前的消息)中的子对话被全部展开, 并且均只展开到第一层子对话中的消息.

创建子对话时勾选保留/不保留上下文均会触发此行为.

📷 复现步骤

设置测试上下文场景

image

子话题1-2拥有两条消息

image

进入子话题3-1时发现:

  • 子话题1-x, 2-x均被展开
  • 子话题1-2的多条消息只展开到第一层(子消息1-2-1)

image

🚦 期望结果

个人认为子对话的上下文不适合包含前文中子对话的内容, 子对话的唯一上下文应该只有主对话分支中的历史内容.

如果设计逻辑使得子对话上下文包含前文子对话内容, 那么无法确定仅展开至第一层消息的行为是否为Bug.

📝 补充信息

不是很确定该行为是否为正常设计的逻辑, 辛苦作者检查一下💕

@GowayLee GowayLee added the 🐛 Bug Something isn't working | 缺陷 label Jan 9, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Jan 9, 2025
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

v1.45.0

💻 System environment

Windows

🌐 Browser

Chrome

🐛 Problem description

After entering the sub-conversation chat window, all the sub-conversations in the above (previous message) are expanded, and only the messages in the first-level sub-conversation are expanded.

This behavior will be triggered by checking Keep/Do Not Keep Context when creating a sub-conversation.

📷 Steps to reproduce

Set up test context scenario

image

Subtopic 1-2 has two messages

image

When entering sub-topic 3-1, I found:

  • Subtopics 1-x and 2-x are expanded
  • Multiple messages in sub-topic 1-2 are only expanded to the first level (sub-message 1-2-1)

image

🚦 Expected results

Personally, I think the context of a sub-dialogue is not suitable to include the content of the previous sub-dialogue. The only context of a sub-dialogue should only be the historical content in the main dialogue branch.

If the logic is designed so that the sub-dialogue context contains the previous sub-dialogue content, then it is impossible to determine whether the logic of only expanding to the first layer of messages is a bug.

📝 Supplementary information

Not sure if this behavior is a normal design logic, please check it 💕

@lobehubbot
Copy link
Member

👀 @GowayLee

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Jan 9, 2025

The issue you're experiencing seems to be related to the behavior of sub-conversation expansion in the chat interface. When entering a sub-conversation, all previous sub-conversations are expanded, but only to the first level of messages. This occurs regardless of whether the "retain context" option is selected.

The intended behavior, as you described, is that the context of a sub-conversation should not include content from previous sub-conversations. Instead, it should only include historical content from the main conversation branch. If the current design logic includes previous sub-conversations in the context, it might not align with your expectations.

The functions responsible for handling the hierarchical display of messages and their expansion are located in the file src/store/chat/slices/thread/selectors/index.ts, specifically portalDisplayParentMessages, portalDisplayChildChatsByThreadId, and portalDisplayChats [1]. These functions manage the display of parent and child messages within a thread, which could be related to the issue you're encountering.

If this behavior is not as intended, it might be worth reviewing these functions to ensure they align with the expected logic for context retention and message expansion.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@arvinxx
Copy link
Contributor

arvinxx commented Jan 9, 2025

个人认为子对话的上下文不适合包含前文中子对话的内容, 子对话的唯一上下文应该只有主对话分支中的历史内容.

对,你说的没错,如果子话题3 包含了子话题1、2 的下文内容,应该是bug,我排查下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Personally, I think the context of a sub-dialogue is not suitable to include the content of the sub-dialogue in the previous article. The only context of a sub-dialogue should only be the historical content in the main dialogue branch.

Yes, you are right. If subtopic 3 contains the following content of subtopics 1 and 2, it should be a bug. I will check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants