koishi-plugin-aka-ai-generator 0.3.3 → 0.3.5

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 +8 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1365,6 +1365,14 @@ function apply(ctx, config) {
1365
1365
  if (extraText) {
1366
1366
  finalPrompt += " " + extraText;
1367
1367
  }
1368
+ finalPrompt = finalPrompt.trim();
1369
+ if (!finalPrompt) {
1370
+ const promptInput = await getPromptInput(session, "请发送画面描述");
1371
+ if (!promptInput) {
1372
+ return "未检测到描述,请重新发送";
1373
+ }
1374
+ finalPrompt = promptInput.trim();
1375
+ }
1368
1376
  const providerType = requestContext?.provider || config.provider;
1369
1377
  const providerModelId = requestContext?.modelId || (providerType === "yunwu" ? config.yunwuModelId : config.gptgodModelId);
1370
1378
  logger.info("开始图像处理", {
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.3.3",
4
+ "version": "0.3.5",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [