-
Notifications
You must be signed in to change notification settings - Fork 60.2k
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
style: Fixed an issue where the sample of the reply content was displayed out of order #5174
Conversation
@ahzmr is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe recent modifications enhance HTTP request handling and the rendering of chat messages within the application. A conditional Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/components/chat.tsx (1 hunks)
Additional comments not posted (2)
app/components/chat.tsx (2)
1473-1473
: Ensure Correctness of Conditionalkey
Prop.The conditional
key
prop for theMarkdown
component is correctly implemented to optimize rendering based on themessage.streaming
state.
1473-1473
: Assess Impact on Performance and Rendering Logic.The addition of the
key
prop helps React manage the component's identity during updates, improving performance and preventing unnecessary re-renders. This is a good practice for optimizing rendering logic.
Your build has completed! |
…status and failed during the first backup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/api/webdav/[...path]/route.ts (7 hunks)
- app/utils/cloud/webdav.ts (4 hunks)
Additional comments not posted (7)
app/utils/cloud/webdav.ts (3)
17-18
: Verify the change in HTTP method from "MKCOL" to "GET".The change in HTTP method from "MKCOL" to "GET" suggests a shift in the intended operation of the request. Ensure that this change aligns with the intended functionality.
45-47
: Improved error handling for 404 status code.The addition of a specific condition for a 404 status code improves error handling by providing a clearer response when a resource is not found.
Line range hint
69-91
:
Enhanced configurability withproxyMethod
parameter.The addition of the
proxyMethod
parameter allows for more flexible URL construction by enabling the inclusion of a proxy method in the query parameters. This increases the configurability of thecreateWebDavClient
function.However, ensure that all calls to the
path
method are updated to include the newproxyMethod
parameter where necessary.app/api/webdav/[...path]/route.ts (4)
32-32
: Enhanced flexibility withproxy_method
variable.The introduction of the
proxy_method
variable enhances the flexibility of the request handling by allowing for proxying of methods while maintaining security checks against SSRF vulnerabilities.
69-73
: Consistent method validation withproxy_method
.The validation checks for the HTTP methods MKCOL, GET, and PUT are updated to use
proxy_method
, ensuring that the method validation is consistent with the potentially overridden method specified in the query parameters.
86-86
: Consistent condition for MKCOL requests withproxy_method
.The condition for MKCOL requests is updated to use
proxy_method
, ensuring that the condition is consistent with the potentially overridden method specified in the query parameters.
99-99
: Consistent condition for GET requests withproxy_method
.The condition for GET requests is updated to use
proxy_method
, ensuring that the condition is consistent with the potentially overridden method specified in the query parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/components/chat.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/components/chat.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
下载了,打包了镜像,启动起来以后,抛起来,代理那里如何设置呢,检查可用性还是。。。对了,webdav需要如何创建文件么~ |
After downloading and packaging the image, after starting it, throw it up and ask how to set up the proxy and check the availability. . . By the way, does webdav need to create files? |
这个版本不需要创建文件。但如果不是白名单里的webdav服务,需要配置一下白名单环境变量就可以了。其他的就是配置好云同步配置,之后检查,再同步一次。如果打开了了自动同步,后面系统回复完消息,以及自己删除了会话时,会自动同步的。 |
This version requires no file creation. But if it is not a webdav service in the whitelist, you need to configure the whitelist environment variables. The other thing is to configure the cloud synchronization configuration, check it later, and synchronize it again. If automatic synchronization is turned on, the system will automatically synchronize after replying to the message or deleting the conversation. |
果然可以了,那webdav的服务器和用户名信息可以用变量保存下来吗,免得每次换电脑又不行 |
Sure enough, it works. Can the server and username information of webdav be saved using variables, so as not to have to worry about changing computers every time? |
Make sure to turn on auto-sync and sync normally. This will automatically synchronize. |
那应该是没开自动同步,找了半天没找到自动同步的开关,首次同步成功了,自动同步开关在哪呢~ |
It should be that automatic synchronization is not turned on. I searched for a long time and couldn't find the automatic synchronization switch. The first synchronization was successful. Where is the automatic synchronization switch? |
我这个PR还没合并,要编译我的版本才行 |
My PR has not been merged yet, so I need to compile my version. |
是的,我就是在 https://github.com/ahzmr/ChatGPT-Next-Web/releases/tag/v2.14.0.1 这里下载你的版本,然后编译镜像,再运行的。 |
Yes, I am at https://github.com/ahzmr/ChatGPT-Next-Web/releases/tag/v2.14.0.1 Download your version here, then compile the image, and then run it. |
大佬,我是编译你的版本,就是没找到开关~~ |
Boss, I compiled your version, but I couldn’t find the switch~~ |
这个标签也没带,你用website分支,里面有我说的功能。 |
This tag is not included. You use the website branch, which has the functions I mentioned. |
我换成了: |
I changed it to: |
好吧。我抽空直接编译镜像到dockerhub上,这样更省事~ |
All right. I took the time to compile the image directly to dockerhub, which is easier~ |
辛苦大佬,编译上传了了回复一下镜像名称,期待ing |
Thank you for your hard work, I compiled and uploaded it and replied with the image name. Looking forward to it. |
另外问一下,同步服务器信息可以做在docker创建参数吗,编译的时候可以改文件实现,编译以后就不知道改哪了... |
Also, I would like to ask, can synchronizing server information be done in docker creation parameters? The file can be changed during compilation, but I don’t know where to change it after compilation... |
用这个镜像:ahzmr/chatgpt-next-web |
这个可以做到,但不建议这么做。这个服务要讲,不是为一个人服务的;而webdav的地址也不是统一的。你添加一个默认值,这个不通用。我不会这么做,原作者估计也不会这么做的。 |
This can be done, but it is not recommended. It should be noted that this service is not for one person; and the address of webdav is not unified. You add a default value, which is not universal. I wouldn't do it, and the original author probably wouldn't do it either. |
我不太懂开发,可以告诉我进容器可以该哪个文件实现吗,我自己改,只知道编译前,修改:sync.ts可以实现,,, |
I don’t know much about development. Can you tell me which file can be used to implement it in the container? I will change it myself. I only know that before compilation, it can be implemented by modifying: sync.ts. |
大佬,现在同步是没问题了,但是只有提交,没有读取,能否让网页每次加载的时候,也进行一下同步呢,主要同步一下别的终端发生的记录或者新增的面具。 |
Sir, there is no problem with synchronization now, but there is only submission and no reading. Can you synchronize the web page every time it is loaded? Mainly synchronize the records generated by other terminals or the newly added masks. |
可以这样做,只是这样会有很多无效同步。对于我来讲,当我知道其他端有新内容时,而我又需要时,我会主动同步一下。对于其他端不重要更新时,我直播问答,那些记录也会过来。所以,我自己不是很想加这样的功能。现在同步基本是数据全量同步,数据量会越来越大,能减少些无效同步就减少一些。 现在的实现,的确会有一个bug,就是当前会话其他端有更新,我问过之后,会导致页面滚动位置不对,需要手调。由于我对这个项目不熟,这个bug现在还没解决。这个回头我有空时,也解决这个问题,并支持一下会话按最新更新时间倒序排序,这样多端更统一一些。 |
You can do this, but there will be a lot of invalid synchronization. For me, when I know there is new content on the other end and I need it, I will take the initiative to synchronize it. When there are no important updates to other terminals, I will live stream Q&A, and those records will also come over. Therefore, I don't really want to add such a function. Now the synchronization is basically the synchronization of the entire data. The amount of data will become larger and larger, and the amount of invalid synchronization can be reduced as much as possible. There is indeed a bug in the current implementation, that is, there is an update on the other end of the current session. After I asked, the scroll position of the page will be wrong and it needs to be manually adjusted. Since I am not familiar with this project, this bug has not been resolved yet. When I have time, I will also solve this problem and support sorting sessions in reverse order of latest update time, so that the multiple terminals are more unified. |
请问下你这个版本在哪下载,怎么部署 |
May I ask where you downloaded this version and how to deploy it? |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Fixed an issue where the sample of the reply content was displayed out of order
📝 补充信息 | Additional Information
Summary by CodeRabbit