fix(instance-saves-datapack): 修复数据包下载路径错误#3348
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's Guide此 PR 修复了数据包下载管理的行为,确保下载组件在导航到数据包下载页面之前,会使用当前世界存档的 datapacks 文件夹作为其缓存目标。 数据包下载管理点击处理的时序图sequenceDiagram
actor User
participant PageInstanceSavesDatapack
participant PageDownloadCompDetail
participant frmMain
participant PageComp
User->>PageInstanceSavesDatapack: BtnManageDownload_Click
PageInstanceSavesDatapack->>PageDownloadCompDetail: cachedFolder[DataPack] = Path.Combine(currentSave, "datapacks")
PageInstanceSavesDatapack->>frmMain: PageChange(Download, DownloadDataPack)
PageInstanceSavesDatapack->>PageComp: targetVersion = McInstance
File-Level Changes
Tips and commands与 Sourcery 交互
自定义你的体验访问你的 控制面板 来:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes the datapack download management behavior by ensuring the download component uses the current world save’s datapacks folder as its cache target before navigating to the datapack download page. Sequence diagram for datapack download management click handlingsequenceDiagram
actor User
participant PageInstanceSavesDatapack
participant PageDownloadCompDetail
participant frmMain
participant PageComp
User->>PageInstanceSavesDatapack: BtnManageDownload_Click
PageInstanceSavesDatapack->>PageDownloadCompDetail: cachedFolder[DataPack] = Path.Combine(currentSave, "datapacks")
PageInstanceSavesDatapack->>frmMain: PageChange(Download, DownloadDataPack)
PageInstanceSavesDatapack->>PageComp: targetVersion = McInstance
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里留下了一些整体反馈:
- 建议将“datapacks”子文件夹名称提取到一个共享常量或辅助函数中,以避免使用硬编码字符串,并在整个代码库中保持 datapack 路径逻辑的一致性。
面向 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- Consider extracting the "datapacks" subfolder name into a shared constant or helper to avoid hardcoded strings and keep the datapack path logic consistent across the codebase.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据这些反馈改进后续的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- Consider extracting the "datapacks" subfolder name into a shared constant or helper to avoid hardcoded strings and keep the datapack path logic consistent across the codebase.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the "datapacks" subfolder name into a shared constant or helper to avoid hardcoded strings and keep the datapack path logic consistent across the codebase.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01202cbb1d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary by Sourcery
Bug Fixes:
datapacks目录。Original summary in English
Summary by Sourcery
Bug Fixes: