niansia
niansia
### 问题描述 > 该问题是我阅读源码时发现的,已在 `python main.py` 启动的 AstrBot 上实际重现(未修改源码、未加载插件) [`chat_service.py:639-657`](https://github.com/AstrBotDevs/AstrBot/blob/3d80dd3f6994f1fac7bfdebd0248c6bbab703e0d/astrbot/dashboard/services/chat_service.py#L639-L657) 上传附件时用 `sanitize_upload_filename(file.filename)` 保留原文件名,然后直接保存到 `attachments_dir / filename`,同名文件会被覆盖,所有同名附件记录都指向磁盘上的**同一个文件**,删除会话时 `delete_attachments`(`:1501-1513`)会 `os.remove` 这个共享路径 浏览器里粘贴的截图文件名都是 `image.png`(前端 `useMediaHandling.ts` 把小于 32 MB 的文件原样 `POST /api/v1/files`),所以这个情况非常常见: - 第二次粘贴截图后,第一条消息里的图片变成了第二张;...
### 问题描述 给指令组设置管理员权限后,非管理员发送的普通消息,只要以组名开头,也会收到「权限不足」并停止处理 例如: - 指令组叫 `天气`,私聊发送 `天气真好啊` 会被拦下,消息无法进入 LLM 处理 - 指令组叫 `math`,另一个插件的公开指令 `/mathematics` 也会被拦下,无法执行 在 master `ac4df99` 上启动 AstrBot,使用 aiocqhttp(OneBot v11)实际重现了这两种情况 原因是 [`[CommandGroupFilter.startswith()](https://github.com/AstrBotDevs/AstrBot/blob/ac4df996f6ff217838293628272b573f3c45d4f6/astrbot/core/star/filter/command_group.py#L111-L112)`](https://github.com/AstrBotDevs/AstrBot/blob/ac4df996f6ff217838293628272b573f3c45d4f6/astrbot/core/star/filter/command_group.py#L111-L112) 直接使用 `str.startswith`,没有判断组名后面是否为空白或消息结尾。因此 `mathematics`、`math123` 都会匹配 `math`...
### 问题描述 > 该问题是我阅读源码时发现的,用 `httpx.MockTransport` 把构造好的 SSE 事件交给真实的 anthropic SDK 和 `ProviderAnthropic` 重现(未修改源码、未加载插件) Anthropic 流式响应里,工具参数通过 `input_json_delta` 分段下发。没有参数的工具只会收到一个 `partial_json` 为 `""` 的 delta(有参数时第一个 delta 也经常是 `""`) [`anthropic_source.py:716-717`](https://github.com/AstrBotDevs/AstrBot/blob/8831d9502575f0aa6fbe5a2f77339b3e94954819/astrbot/core/provider/sources/anthropic_source.py#L716-L717) 把 delta 拼成 `input_json`...
### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question,...
### What happened? I found this while checking `find_homography_dlt` against `cv2.findHomography` on random point sets. With the default `solver="lu"` and five or more points, it returns an all-NaN matrix for...