| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
Please address the comments from this code review:
## Overall Comments
- The new permission check for `/new` duplicates logic that likely already exists for `/reset`; consider extracting a shared helper or reusing the existing mechanism so the two commands stay consistent and easier to maintain.
- Role and permission values ("admin"/"member") are currently hard-coded string literals; it would be more robust to use centralized constants or an enum and validate against known roles to avoid subtle bugs from typos or future changes.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
/new 命令缺少权限控制,在群聊且会话隔离关闭的场景下(共享会话),任意成员都可以创建新会话并切换,影响其他用户的对话上下文。而 /reset 已有对应的权限检查,/new 与之不一致。
Modifications / 改动点
astrbot/builtin_stars/builtin_commands/commands/conversation.py:为 new_conv 方法新增场景化权限检查,逻辑与 reset 一致——群聊+会话隔离关闭时默认要求 admin,其余场景 member 即可。权限可通过 Dashboard 的指令管理覆盖。
This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
/ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txt 和 pyproject.toml 文件相应位置。
😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
(超小声)feat(provider): add enabled/disabled thinking type for Anthropic provider #8560 fix: validate bool config values and add reasoning field schema #9689 没动静了。
Summary by Sourcery
Enforce context-aware permissions for creating new conversations.
Bug Fixes:
Enhancements: