✨ 增强插件商店功能,支持在下载文件时指定稀疏检出路径和目标目录。优化二进制文件处理逻辑,提升文件下载的准确性和效率。

This commit is contained in:
HibiKier
2025-08-26 18:01:32 +08:00
parent a89d87a0b4
commit f3ff5a3404
4 changed files with 191 additions and 23 deletions
@@ -268,6 +268,7 @@ class StoreManager:
elif source == "git":
repo_type = RepoType.GITHUB
replace_module_path = module_path.replace(".", "/")
plugin_name = module_path.split(".")[-1]
if is_dir:
files = await RepoFileManager.list_directory_files(
github_url, replace_module_path, repo_type=repo_type
@@ -278,7 +279,11 @@ class StoreManager:
files = [file for file in files if not file.is_dir]
download_files = [(file.path, local_path / file.path) for file in files]
await RepoFileManager.download_files(
github_url, download_files, repo_type=repo_type
github_url,
download_files,
repo_type=repo_type,
sparse_path=replace_module_path,
target_dir=local_path / plugin_name,
)
requirement_paths = [