Feature: query the remote SHA-256 before previewing
When the main connection advertises CLIENT_CAP_FILE_HASH, double-click sends COMMAND_FILE_HASH first and continues from the async TOKEN_FILE_HASH response (posted to the UI thread). A matching SHA-256 opens the cached copy without a transfer, including content found under a different remote path; the new path is added to the index. Too-large and error responses are handled, and a 5 second timeout falls back to the P1 size/mtime path. The response parser is based on FileHashResponseHeader and the echoed request path; pending state is cleared on close and the hash timer is killed with the dialog. Verified with the Debug server and client: a 1 MiB file was hashed, transferred and cached under its SHA-256; an identical copy at a second path hit the cache with no new transfer or stream connection. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
ea5d69d1c0
commit
6cb779ef70
7 files changed
+168
-5
No files matched your search
@@ -2381,3 +2381,4 @@ MCP
|
||||
无法获取文件信息,请刷新目录后重试=Cannot get file information; refresh the directory and retry
|
||||
文件较大,不支持预览:%s(%llu MB,上限 %u MB)=File too large to preview: %s (%llu MB, limit %u MB)
|
||||
正在预览 %s ...=Previewing %s ...
|
||||
获取远程文件信息失败(错误码 %u)=Failed to get remote file information (error %u)
|
||||
Reference in new issue
Block a user