diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index cba2f1b..eb3da32 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -108,3 +108,11 @@ jobs: generateReleaseNotes: true prerelease: ${{ steps.prerelease.outputs.is_prerelease }} token: ${{ secrets.GITHUB_TOKEN }} + + - name: Sync dev branch with main + run: | + git fetch origin + git checkout dev + git merge origin/main --ff-only + git push origin dev + echo "Synced dev branch with main" diff --git a/README.md b/README.md index 82c0cd7..b1916a5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![SpectreCore](https://avatars.githubusercontent.com/u/129108081?s=48&v=4) -[![version](https://img.shields.io/badge/version-v2.1.8-blue.svg?style=flat-square)](https://github.com/23q3/astrbot_plugin_SpectreCore) +[![version](https://img.shields.io/badge/version-v2.1.9-blue.svg?style=flat-square)](https://github.com/23q3/astrbot_plugin_SpectreCore) [![license](https://img.shields.io/badge/license-AGPL--3.0-green.svg?style=flat-square)](LICENSE) [![author](https://img.shields.io/badge/author-23q3-orange.svg?style=flat-square)](https://github.com/23q3) @@ -70,11 +70,9 @@ SpectreCore (影芯) 是一个为 AstrBot 设计的高级群聊互动插件, ## 📋 最新版本 -### v2.1.8 (2026-01-02) +### v2.1.9 (2026-01-05) -- ⚡ **优化LLM调用的prompt结构** - 将环境信息移至system_prompt,保持prompt干净以支持知识库检索;基于message_id精确排除当前消息避免历史记录重复 [#76](https://github.com/23q3/astrbot_plugin_SpectreCore/pull/76) -- 🐛 **修复QQ官方平台help命令** - 检测到QQ官方平台时不输出GitHub链接,避免消息被拦截 [#78](https://github.com/23q3/astrbot_plugin_SpectreCore/issues/78) -- 🐛 **适配AstrBot新版本API** - 移除对已删除属性的依赖,迁移至新版人格管理接口,增强图片URL提取兼容性 +- 🐛 **修复GIF图片格式识别错误** - 修复图片URL优先级问题,优先使用file字段以保留准确格式信息,避免HTTP URL下载后MIME类型检测错误导致Gemini API返回400 [#81](https://github.com/23q3/astrbot_plugin_SpectreCore/issues/81) ## ⚠️ 注意事项 diff --git a/changelogs/v2.1.9.md b/changelogs/v2.1.9.md new file mode 100644 index 0000000..0de9dd5 --- /dev/null +++ b/changelogs/v2.1.9.md @@ -0,0 +1 @@ +- 🐛 **修复GIF图片格式识别错误** - 修复图片URL优先级问题,优先使用file字段以保留准确格式信息,避免HTTP URL下载后MIME类型检测错误导致Gemini API返回400 [#81](https://github.com/23q3/astrbot_plugin_SpectreCore/issues/81) diff --git a/main.py b/main.py index 2b07871..da5390b 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ "spectrecore", "23q3", "使大模型更好的主动回复群聊中的消息,带来生动和沉浸的群聊对话体验", - "2.1.8", + "2.1.9", "https://github.com/23q3/astrbot_plugin_SpectreCore" ) class SpectreCore(Star): diff --git a/metadata.yaml b/metadata.yaml index ef80905..75383f2 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,7 +1,7 @@ name: spectrecore # 这是你的插件的唯一识别名。 desc: 使大模型更好的主动回复群聊中的消息,带来生动和沉浸的群聊对话体验 # 插件简短描述 help: 自动检测群聊消息并让AI模型进行回复,让群聊更加生动有趣。 # 插件的帮助信息 -version: v2.1.8 # 插件版本号。格式:v1.1.1 或者 v1.1 +version: v2.1.9 # 插件版本号。格式:v1.1.1 或者 v1.1 author: 23q3 # 作者 repo: https://github.com/23q3/astrbot_plugin_SpectreCore # 插件的仓库地址 display_name: 🌟 SpectreCore diff --git a/utils/llm_utils.py b/utils/llm_utils.py index c10e119..62505ae 100644 --- a/utils/llm_utils.py +++ b/utils/llm_utils.py @@ -214,7 +214,7 @@ async def call_llm(event: AstrMessageEvent, config: AstrBotConfig, context: Cont for component in message.message: if isinstance(component, Image): try: - url = component.url or component.file + url = component.file or component.url if url: image_urls.append(url) if len(image_urls) >= image_count: