Skip to content

聊天界面限制历史消息数按钮在特定情况下出现显示异常 #7150

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

Open
heshunme opened this issue Mar 25, 2025 · 3 comments
Open
Labels
💄 Design Design an style | 样式问题 unconfirm 未被维护者确认的问题

Comments

@heshunme
Copy link

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

1.74.8

💻 系统环境

Other Linux

🌐 浏览器

Firefox

🐛 问题描述

上下文限制开关点击之后在UI上滑块没有动
F12调试发现服务器返回的值已经变了但是前端显示依然为不限制历史条数

📷 复现步骤

  1. 首先在中转平台添加claude的模型,我的情况是在one api部署了claude-3-5-sonnet-20241022
  2. 然后在OpenAI这个Provider里填入中转站地址密钥,并启用该模型
  3. 将助手的模型指定为这个OpenAI提供商(实际上是个人部署的中转平台)名下的claude-3-5-sonnet-20241022,尝试在对话界面进行调整
    Image

🚦 期望结果

No response

📝 补充信息

  1. 助手设定界面中可以正常修改
  2. 应该是近半个月出现的,我记得最晚两周前是没有这个问题的
@heshunme heshunme added the unconfirm 未被维护者确认的问题 label Mar 25, 2025
@lobehubbot
Copy link
Member

👀 @heshunme

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

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


📦 Deployment environment

Docker

📦 Deployment mode

Server-side mode (lobe-chat-database mirror)

📌 Software version

1.74.8

💻 System environment

Other Linux

🌐 Browser

Firefox

🐛 Question description

The slider on the UI does not move after clicking the context limit switch
F12 debugging found that the value returned by the server has changed, but the front-end display is still not limited to the number of historical bars.

📷 Reproduction steps

  1. First add the claude model to the transit platform. My case is that claude-3-5-sonnet-20241022 was deployed in one API
  2. Then fill in the transfer station address key in the OpenAI Provider and enable the model
  3. Specify the assistant's model as claude-3-5-sonnet-20241022 under the name of this OpenAI provider (actually a personal deployment of transit platform), and try to adjust it in the dialogue interface.
    Image

🚦 Expected results

No response

📝 Supplementary information

  1. The settings interface of the assistant can be modified normally
  2. It should have appeared in the past half month. I remember that there was no such problem two weeks ago

@dosubot dosubot bot added the 💄 Design Design an style | 样式问题 label Mar 25, 2025
Copy link

dosubot bot commented Mar 25, 2025

The issue you're experiencing with the context limit switch not updating the UI slider, despite the server response indicating a change, might be related to how the front-end code handles the server response.

The ReasoningTokenSlider component is responsible for updating the UI slider for the context limit switch when enableReasoning is true [1]. However, if the UI is not reflecting the server's response, it could be due to a synchronization issue between the server and client state.

The state management in the chat interface uses zustand and nuqs for handling synchronization with server responses. zustand is used for state management, and nuqs helps in synchronizing the session state with server responses by updating the session state and reflecting changes in the URL [2][3].

To troubleshoot this issue, you might want to check if the state is being correctly updated in the zustand store when the server response changes. Additionally, ensure that the onChange handler for the context limit switch is correctly triggering the state update [4]. If the problem persists, reviewing recent changes in the codebase related to the UI components might provide further insights [5].

To continue talking to Dosu, mention @dosu.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💄 Design Design an style | 样式问题 unconfirm 未被维护者确认的问题
Projects
None yet
Development

No branches or pull requests

2 participants