NextChat
NextChat copied to clipboard
[Bug] webdev同步合并覆盖问题
Describe the bug 使用webdav同步功能,即使本地修改配置,点击同步,都会被远端配置覆盖,看上去像是 mergeWithUpdate 代码的问题,我尝试修改并解决了覆盖问题 https://github.com/EvilMouth/ChatGPT-Next-Web/commit/fdcc19a24aab23c5d6ee464d9986d9ae155d7e41
To Reproduce Steps to reproduce the behavior:
- 前往设置页
- 配置好webdav,假设远端已经有一份备份
- 修改本地某一项配置,比如发送键从 Meta+Enter 改为 Enter
- 点击同步
- 出现错误case:远端的配置覆盖本地配置,发送键被覆盖回 Meta+Enter
Expected behavior 本地配置的修改时间比远端新,应该覆盖远端的配置
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug] webdev synchronization merge coverage problem
现在点击同步只会把云端数据覆盖本地数据,如果想上传到云端只能去 webdav 里把云端文件删了。
Bot detected the issue body's language is not English, translate it automatically.
Clicking sync now will only overwrite the local data with the cloud data. If you want to upload it to the cloud, you can only delete the cloud files in webdav.
现在点击同步只会把云端数据覆盖本地数据,如果想上传到云端只能去 webdav 里把云端文件删了。
@altair441n 故意这样设计的?
Bot detected the issue body's language is not English, translate it automatically.
Clicking sync now will only overwrite the local data with the cloud data. If you want to upload it to the cloud, you can only delete the cloud files in webdav.
@altair441n Is this intentional?
现在点击同步只会把云端数据覆盖本地数据,如果想上传到云端只能去 webdav 里把云端文件删了。
@altair441n 故意这样设计的?
应该是bug,这个问题好多人反馈了,之前的issue里有人提到过这个方法。
Bot detected the issue body's language is not English, translate it automatically.
Clicking sync now will only overwrite the local data with the cloud data. If you want to upload it to the cloud, you can only delete the cloud files in webdav.
@altair441n Designed this way on purpose?
It should be a bug. Many people have reported this problem. Someone mentioned this method in the previous issue.
同步能不能提供成两个选项:1. 同步云端,将本地的数据覆盖掉云端的 2. 同步本地,将云端的数据覆盖掉本地的
Bot detected the issue body's language is not English, translate it automatically.
Can synchronization be provided with two options: 1. Synchronize with the cloud, overwriting the local data with the cloud; 2. Synchronize with the local, overwrite the local data with the cloud.
同样遇到这个问题,本地修改的配置不会上传。而且本地的删除操作也不会同步到云端,只有增加或者修改内容才能同步
Bot detected the issue body's language is not English, translate it automatically.
I also encountered this problem, the locally modified configuration will not be uploaded. Moreover, local deletion operations will not be synchronized to the cloud. Only adding or modifying content can be synchronized.
同步能不能提供成两个选项:1. 同步云端,将本地的数据覆盖掉云端的 2. 同步本地,将云端的数据覆盖掉本地的
我赞同,+1。
Bot detected the issue body's language is not English, translate it automatically.
Can synchronization be provided with two options: 1. Synchronize with the cloud, overwriting the local data with the cloud; 2. Synchronize with the local, overwrite the local data with the cloud
I agree, +1.
我也发现了这个问题,看代码的逻辑是,完全合并本地与远端的会话与消息。这样很不友好,导致只要同步到服务端了,就没办法删除了(一同步又回来了)。如果直接删除服务器上文件,不创建也报错。 我这边改造了一版,我还在自测,我现在用都正常。你们可以试试我的版本。支持删除的云同步版本
Bot detected the issue body's language is not English, translate it automatically.
I also discovered this problem. The logic of the code is to completely merge local and remote sessions and messages. This is very unfriendly. As long as it is synchronized to the server, it cannot be deleted (it will come back as soon as it is synchronized). If you delete the file on the server directly, an error will be reported without creating it. I have modified a version here, and I am still testing it myself. Now I can use it normally. You can try my version. Cloud synchronization version that supports deletion