Merged
Conversation
fix(dependencies): 更新版本号至 5.2.11 并添加 httpx 依赖
There was a problem hiding this comment.
Pull request overview
该 PR 主要涉及两块:更新项目依赖/版本号(新增 httpx,版本号调整),以及重构 init 命令生成的默认 config.yaml 以适配新的 adapters 配置结构。
Changes:
init命令默认配置从旧的顶层napcat/plugin结构改为新的adapters列表结构,并补齐部分全局配置项。- 新增依赖
httpx,并调整项目版本号。 - 更新
uv.lock中本地 editable 包的依赖声明以包含httpx。
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
uv.lock |
更新 lock 中的依赖集合(新增 httpx)并调整本地包版本记录(但目前与 pyproject 版本不一致)。 |
pyproject.toml |
项目版本改为 5.2.11.post1,并在 dependencies 中加入 httpx>=0.27。 |
ncatbot/cli/commands/init.py |
抽出 _build_default_config,默认配置改为 adapters 结构并扩展若干全局配置项。 |
Comment on lines
5
to
8
| [project] | ||
| name = "ncatbot5" | ||
| version = "5.2.11" | ||
| version = "5.2.11.post1" | ||
| description = "NcatBot, NapCat Python SDK" |
There was a problem hiding this comment.
PR 描述写的是“更新版本号至 5.2.11”,但这里把项目版本改成了 5.2.11.post1;同时 uv.lock 里目前仍是 5.2.11。请确认最终期望版本号,并同步更新 PR 描述与锁文件,避免发布/排查时出现版本歧义。
Comment on lines
29
to
33
| bot_uin = click.prompt("请输入机器人 QQ 号", type=str) | ||
| root = click.prompt("请输入管理员 QQ 号", type=str) | ||
|
|
||
| config_data = { | ||
| "bot_uin": bot_uin, | ||
| "root": root, | ||
| "debug": False, | ||
| "napcat": { | ||
| "ws_uri": "ws://localhost:3001", | ||
| "ws_token": "napcat_ws", | ||
| "webui_uri": "http://localhost:6099", | ||
| "webui_token": "napcat_webui", | ||
| "enable_webui": True, | ||
| }, | ||
| "plugin": { | ||
| "plugins_dir": "plugins", | ||
| "load_plugin": True, | ||
| "plugin_whitelist": [], | ||
| "plugin_blacklist": [], | ||
| }, | ||
| } | ||
| config_data = _build_default_config(bot_uin=bot_uin, root=root) | ||
|
|
There was a problem hiding this comment.
PR 标题聚焦于“重构 init 命令以使用新的默认配置结构”,但 PR 描述是“fix(dependencies)”且强调版本/依赖更新;两者关注点不一致,后续追溯变更原因会比较困难。建议统一 PR 标题与描述(例如在描述中补充 init 重构内容,或拆分为两个 PR)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(dependencies): 更新版本号至 5.2.11 并添加 httpx 依赖