Skip to content

refactor: 优化文件与目录选择逻辑 - #7315

Open
fishdry1000 wants to merge 26 commits into
HMCL-dev:mainfrom
fishdry1000:work/path-selector-neo
Open

fishdry1000 wants to merge 26 commits into
HMCL-dev:mainfrom
fishdry1000:work/path-selector-neo

Conversation

@fishdry1000

@fishdry1000 fishdry1000 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

fix: #7321


将打开文件夹的情形分成五种情况:

  • 导入文件(模组、资源包…)
  • 导入图片(皮肤、世界图标…)
  • 导出文件(导出世界、导出主题包…)
  • 游戏目录相关(游戏设置页面的选项)
  • 其他情况(默认)

导入文件 导入图片 导出文件 其他情况 这四种情况使用持久化保存的逻辑(记忆相同情况下,上次选择的文件夹)。

游戏目录相关 这种情况使用当前游戏实例目录作为初始文件夹。

在 没有持久化记忆/位置无效 的情况下,回退到使用当前选择的游戏目录作为初始文件夹。

特别地,对于下载页面,在有关联游戏实例时适用 游戏目录相关 的情况,在没有关联的时候适用 导出文件 的情况。

@github-actions github-actions Bot added the 500+ label Nov 17, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Static analysis found the following issues (max count 10):

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Static analysis found the following issues (max count 10):

@fishdry1000 fishdry1000 changed the title refactor: 统一文件与目录选择逻辑 refactor: 优化文件与目录选择逻辑 Nov 18, 2026
@github-actions github-actions Bot added 1000+ and removed 500+ labels Nov 18, 2026
@zkitefly

Copy link
Copy Markdown
Member

推荐加一个🤔

在另存资源时,可以设定文件管理器初始显示目录为该实例的对应目录,例如我另存模组时文件选择窗口就显示该实例的模组文件夹

@fishdry1000

fishdry1000 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

推荐加一个🤔

在另存资源时,可以设定文件管理器初始显示目录为该实例的对应目录,例如我另存模组时文件选择窗口就显示该实例的模组文件夹

正有此意😋

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Static analysis found the following issues (max count 10):

@fishdry1000
fishdry1000 marked this pull request as ready for review November 19, 2026 09:15
@fishdry1000

fishdry1000 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

也许具体的上下文分类/记忆逻辑还可以再讨论一下🤔

目前只是按照我自己的想法随便分类了一下

@Glavo Glavo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本审查建议由 GPT-6 Astra 生成

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

3 participants