koishi-plugin-aka-ai-generator 0.2.13 → 0.2.14

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.
Files changed (2) hide show
  1. package/lib/index.js +18 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -599,7 +599,8 @@ var COMMANDS = {
599
599
  QUERY_QUOTA: "图像额度",
600
600
  RECHARGE: "图像充值",
601
601
  RECHARGE_HISTORY: "图像充值记录",
602
- FUNCTION_LIST: "图像功能"
602
+ FUNCTION_LIST: "图像功能",
603
+ IMAGE_COMMANDS: "图像指令"
603
604
  };
604
605
  var StyleItemSchema = import_koishi.Schema.object({
605
606
  commandName: import_koishi.Schema.string().required().description("命令名称(不含前缀斜杠)"),
@@ -1739,6 +1740,22 @@ Prompt: ${prompt}`);
1739
1740
  return "获取功能列表失败,请稍后重试";
1740
1741
  }
1741
1742
  });
1743
+ ctx.command(COMMANDS.IMAGE_COMMANDS, "查看图像生成指令列表").action(async ({ session }) => {
1744
+ if (!session?.userId) return "会话无效";
1745
+ const globalConfig = ctx.root.config;
1746
+ const prefixConfig = globalConfig.prefix;
1747
+ let prefix = "";
1748
+ if (Array.isArray(prefixConfig) && prefixConfig.length > 0) {
1749
+ prefix = prefixConfig[0];
1750
+ } else if (typeof prefixConfig === "string") {
1751
+ prefix = prefixConfig;
1752
+ }
1753
+ const lines = ["🎨 图像生成指令列表:\n"];
1754
+ commandRegistry.userCommands.forEach((cmd) => {
1755
+ lines.push(`${prefix}${cmd.name} - ${cmd.description}`);
1756
+ });
1757
+ return lines.join("\n");
1758
+ });
1742
1759
  const providerLabel = config.provider === "gptgod" ? "GPTGod" : "云雾 Gemini 2.5 Flash Image";
1743
1760
  logger.info(`aka-ai-generator 插件已启动 (${providerLabel})`);
1744
1761
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-aka-ai-generator",
3
3
  "description": "自用AI生成插件(GPTGod & Yunwu)",
4
- "version": "0.2.13",
4
+ "version": "0.2.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [