Skip to content

重构配置系统#142

Draft
MoeSnowyFox wants to merge 30 commits into
feat/PluginSystemfrom
refactor/config
Draft

重构配置系统#142
MoeSnowyFox wants to merge 30 commits into
feat/PluginSystemfrom
refactor/config

Conversation

@MoeSnowyFox
Copy link
Copy Markdown
Member

重构配置系统 使用pydantic进行类型检查和验证

@HarcoChen HarcoChen changed the base branch from main to dev April 1, 2026 00:13
@MoeSnowyFox
Copy link
Copy Markdown
Member Author

现在被重构的不只是config了

@MoeSnowyFox
Copy link
Copy Markdown
Member Author

可以考虑提前与插件合并减少后续冲突

@MoeSnowyFox MoeSnowyFox changed the base branch from dev to feat/PluginSystem April 6, 2026 15:54
@Alirea10 Alirea10 force-pushed the feat/PluginSystem branch from 88fa476 to a7ab3ce Compare April 16, 2026 17:00
return data


class PydanticConfigBase(BaseModel):
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.

为什么把这玩意丢在core里啊?基类不应该老老实实待在 module 文件夹里吗?

Comment thread app/core/config/base.py
return _load_json_config(legacy_json_file), legacy_json_file


def _backup_legacy_config_if_needed(
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.

迁移相关逻辑丢到manager(原core/config)里去,走配置文件版本升级逻辑,不需要做这种兼容

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants