mioku-plugin-help 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mioku-plugin-help",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "帮助插件,使用截图服务生成美观的帮助图片,并提供 #状态 指令",
5
5
  "main": "index.ts",
6
6
  "type": "module",
@@ -1,5 +1,6 @@
1
1
  import { escapeHtml } from "../utils";
2
2
  import { getHelpTheme, HELP_BACKGROUND_IMAGE_URL } from "../theme";
3
+ import { displayAdapterId } from "mioku";
3
4
  import type {
4
5
  AIUsageStatsLite,
5
6
  BotAccountStatus,
@@ -139,9 +140,10 @@ function renderHero(
139
140
  .map((bot) => {
140
141
  const statusText = bot.online ? "在线" : "离线";
141
142
  const statusColor = bot.online ? "#10b981" : "#ef4444";
143
+ const adapterLabel = displayAdapterId(bot.adapter);
142
144
  const implText =
143
145
  bot.adapter === "stdin"
144
- ? `${bot.adapter}@${bot.appVersion}`
146
+ ? `${adapterLabel}@${bot.appVersion}`
145
147
  : bot.appVersion
146
148
  ? `${bot.framework} ${bot.appVersion}${bot.protocolVersion ? ` · 协议 ${bot.protocolVersion}` : ""}`
147
149
  : bot.framework;
@@ -151,7 +153,7 @@ function renderHero(
151
153
  // Nickname is rendered as a bold large heading above the avatar
152
154
  // row (not as a chip). Chips below only carry the metadata.
153
155
  const tags = [
154
- { text: String(bot.uin || "—"), kind: "data" },
156
+ { text: displayAdapterId(bot.uin) || "—", kind: "data" },
155
157
  { text: statusText, kind: bot.online ? "ok" : "danger" },
156
158
  { text: `好友 ${fmtNumber(bot.friendCount)}`, kind: "data" },
157
159
  { text: `群聊 ${fmtNumber(bot.groupCount)}`, kind: "data" },