diff --git a/CHANGELOG.md b/CHANGELOG.md index 72623bb..3b2fda2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). - **Startup greeting**: Distinguish first install vs. restart with different greeting messages. - **Log download**: `/qqbot-logs` packages the last 2000 lines of logs and sends as a file. +### Changed + +- **Unified rich media tag**: Replaced ``, ``, ``, `` with a single `` tag — the system auto-detects media type by file extension. + ### Improved - **Greeting debounce**: Suppress duplicate greetings within 60s during rapid restarts (e.g. upgrades). diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 9907526..41184af 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -13,6 +13,10 @@ - **启动问候语**:区分首次安装与普通重启,发送不同问候语。 - **日志下载**:`/qqbot-logs` 打包最近 2000 行日志发送文件给用户。 +### 变更 + +- **统一富媒体标签**:将 ``、``、``、`` 统一为 `` 标签,系统根据文件扩展名自动识别媒体类型。 + ### 改进 - **问候语防抖**:60s 内重复重启不再重复发送问候语(解决升级过程中刷屏问题)。 diff --git a/README.md b/README.md index de86432..96915e4 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ If your main model supports vision (e.g. Tencent Hunyuan `hunyuan-vision`), AI c > > **QQBot**: Here you go! 🐱 -AI sends images via `path`. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp. +AI can send images directly. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp. Image Generation Demo @@ -109,7 +109,7 @@ AI sends images via `path`. Supports local paths and URLs. Format > > **QQBot**: *(sends a voice message)* -AI sends voice via `path`. Formats: mp3/wav/silk/ogg. No ffmpeg required. +AI can send voice messages directly. Formats: mp3/wav/silk/ogg. No ffmpeg required. TTS Voice Demo @@ -129,7 +129,7 @@ This capability depends on OpenClaw cron scheduling and proactive messaging. If > > **QQBot**: *(sends a .txt file)* -AI sends files via `path`. Any format, up to 20MB. +AI can send files directly. Any format, up to 20MB. File Sending Demo @@ -139,21 +139,61 @@ AI sends files via `path`. Any format, up to 20MB. > > **QQBot**: *(sends a video)* -AI sends videos via `path`. Supports local files and URLs. Large files (>5MB) auto-show upload progress. +AI can send videos directly. Supports local files and URLs. Video Sending Demo -### Rich Media Tag Reference +> **Under the hood:** Upload dedup caching, ordered queue delivery, and multi-layer audio format fallback. -| Tag | Direction | Notes | -|-----|-----------|-------| -| `path` | Send | jpg/png/gif/webp/bmp, local path or URL | -| `path` | Send | mp3/wav/silk/ogg, no ffmpeg required | -| `path` | Send | Any format, up to 20MB | -| `path` | Send | Local path or URL | -| Voice / File / Image | Receive | Auto-transcribe (STT), auto-download, or vision analysis | +### 🛠️ Slash Commands -> **Under the hood:** 30+ tag variant auto-correction, upload dedup caching, ordered queue delivery, and multi-layer audio format fallback. +The plugin provides built-in slash commands that are intercepted before reaching the AI queue, giving instant responses for diagnostics and management. + +#### `/qqbot-ping` — Latency Test + +> **You**: `/qqbot-ping` +> +> **QQBot**: 🏓 pong!⏱ Latency: 495ms (network: 494ms, plugin: 1ms) + +Measures end-to-end latency from QQ server push to plugin response, broken down into network transport and plugin processing time. + +Ping Demo + +#### `/qqbot-version` — Version Info + +> **You**: `/qqbot-version` +> +> **QQBot**: 🦞 Framework: OpenClaw 2026.3.13 / 🤖 Plugin: v1.6.0 / ✅ Up to date + +Shows framework version, plugin version, and update status at a glance. + + + +#### `/qqbot-help` — Command List + +> **You**: `/qqbot-help` +> +> **QQBot**: Lists all available slash commands with descriptions. + +Help Demo + +#### `/qqbot-upgrade` — Upgrade Guide + +> **You**: `/qqbot-upgrade` +> +> **QQBot**: Shows current version, latest version (if available), and a link to the upgrade guide. + + Upgrade Demo + +#### `/qqbot-logs` — Log Export + +> **You**: `/qqbot-logs` +> +> **QQBot**: 📋 Logs packaged (~2000 lines), sending file... *(sends a .txt file)* + +Exports the last ~2000 lines of gateway logs as a file for quick troubleshooting. + +Logs Demo --- @@ -379,7 +419,7 @@ STT supports two-level configuration with priority fallback: - `provider` — references a key in `models.providers` to inherit `baseUrl` and `apiKey` - `voice` — voice variant - Set `enabled: false` to disable (default: `true`) -- When configured, AI can use `` tags to generate and send voice messages +- When configured, AI can generate and send voice messages --- diff --git a/README.zh.md b/README.zh.md index 37b3c9b..120bd4d 100644 --- a/README.zh.md +++ b/README.zh.md @@ -94,7 +94,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返 > > **QQBot**:画好啦!一只可爱的简笔小猫咪🐱🎨 -AI 通过 `路径` 发送图片,支持本地文件路径和网络 URL。格式:jpg/png/gif/webp/bmp。 +AI 可直接发送图片,支持本地文件路径和网络 URL。格式:jpg/png/gif/webp/bmp。 发图片演示 @@ -104,7 +104,7 @@ AI 通过 `路径` 发送图片,支持本地文件路径和网 > > **QQBot**:*(发送一条语音消息)* -AI 通过 `路径` 发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg。 +AI 可直接发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg。 发语音演示 @@ -124,7 +124,7 @@ AI 通过 `路径` 发送语音消息。格式:mp3/wav/silk > > **QQBot**:*(发送 .txt 文件)* -AI 通过 `路径` 发送文件。任意格式,最大 20MB。 +AI 可直接发送文件。任意格式,最大 20MB。 发文件演示 @@ -134,21 +134,61 @@ AI 通过 `路径` 发送文件。任意格式,最大 20MB。 > > **QQBot**:*(发送视频)* -AI 通过 `路径` 发送视频,支持本地文件和公网 URL。大文件(>5MB)自动提示上传进度。 +AI 可直接发送视频,支持本地文件和公网 URL。 发视频演示 -### 富媒体标签参考 +> **底层细节:** 上传去重缓存、有序队列发送、音频格式多层降级。 -| 标签 | 方向 | 说明 | -|------|------|------| -| `路径` | 发送 | jpg/png/gif/webp/bmp,本地路径或 URL | -| `路径` | 发送 | mp3/wav/silk/ogg,无需 ffmpeg | -| `路径` | 发送 | 任意格式,最大 20MB | -| `路径` | 发送 | 本地路径或 URL | -| 语音 / 文件 / 图片 | 接收 | 自动转录(STT)、自动下载、或视觉分析 | +### 🛠️ 斜杠指令 -> **底层细节:** 30+ 种标签变体自动纠正、上传去重缓存、有序队列发送、音频格式多层降级。 +插件内置一组斜杠指令,在消息进入 AI 队列前拦截处理,即时响应,用于诊断和管理。 + +#### `/qqbot-ping` — 延迟测试 + +> **你**:`/qqbot-ping` +> +> **QQBot**:🏓 pong!⏱ 延迟: 495ms(网络传输: 494ms,插件处理: 1ms) + +测量从 QQ 服务器推送到插件响应的端到端延迟,细分网络传输和插件处理两段耗时。 + +Ping 演示 + +#### `/qqbot-version` — 版本信息 + +> **你**:`/qqbot-version` +> +> **QQBot**:🦞 框架: OpenClaw 2026.3.13 / 🤖 插件: v1.6.0 / ✅ 已是最新 + +一目了然查看框架版本、插件版本和更新状态。 + + + +#### `/qqbot-help` — 指令列表 + +> **你**:`/qqbot-help` +> +> **QQBot**:列出所有可用的斜杠指令及说明。 + +Help 演示 + +#### `/qqbot-upgrade` — 升级指引 + +> **你**:`/qqbot-upgrade` +> +> **QQBot**:显示当前版本、最新版本(如有更新)及升级文档链接。 + + Upgrade Demo + +#### `/qqbot-logs` — 日志导出 + +> **你**:`/qqbot-logs` +> +> **QQBot**:📋 日志已打包(约 2000 行),正在发送文件… *(发送 .txt 文件)* + +导出最近约 2000 行网关日志为文件,方便快速排查问题。 + +Logs 演示 --- @@ -374,7 +414,7 @@ STT 支持两级配置,按优先级查找: - `provider` — 引用 `models.providers` 中的 key,自动继承 `baseUrl` 和 `apiKey` - `voice` — 语音音色 - 设置 `enabled: false` 可禁用(默认:`true`) -- 配置后,AI 可使用 `` 标签生成并发送语音消息 +- 配置后,AI 可生成并发送语音消息 --- diff --git a/docs/images/slash-help.jpg b/docs/images/slash-help.jpg new file mode 100644 index 0000000..019d751 Binary files /dev/null and b/docs/images/slash-help.jpg differ diff --git a/docs/images/slash-logs.jpg b/docs/images/slash-logs.jpg new file mode 100644 index 0000000..2b9c3ce Binary files /dev/null and b/docs/images/slash-logs.jpg differ diff --git a/docs/images/slash-ping.jpg b/docs/images/slash-ping.jpg new file mode 100644 index 0000000..9460039 Binary files /dev/null and b/docs/images/slash-ping.jpg differ diff --git a/docs/images/slash-upgrade.jpg b/docs/images/slash-upgrade.jpg new file mode 100644 index 0000000..1edd4f5 Binary files /dev/null and b/docs/images/slash-upgrade.jpg differ diff --git a/docs/images/slash-version.jpg b/docs/images/slash-version.jpg new file mode 100644 index 0000000..9297109 Binary files /dev/null and b/docs/images/slash-version.jpg differ