koishi-plugin-aka-ai-generator 0.8.5 → 0.8.6

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 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2205,8 +2205,26 @@ function apply(ctx, config) {
2205
2205
  while (true) {
2206
2206
  const msg = await session.prompt(mode === "multiple" ? 6e4 : 3e4);
2207
2207
  if (!msg) return { error: "等待超时" };
2208
+ logger.info("getInputData 收到消息", {
2209
+ platform: session.platform,
2210
+ msgType: typeof msg,
2211
+ msgLength: msg?.length,
2212
+ msgPreview: typeof msg === "string" ? msg.substring(0, 200) : "non-string",
2213
+ rawMsg: msg
2214
+ });
2208
2215
  const elements = import_koishi2.h.parse(msg);
2216
+ logger.info("getInputData 解析元素", {
2217
+ platform: session.platform,
2218
+ elementsCount: elements?.length,
2219
+ elementTypes: elements?.map((e) => e.type),
2220
+ elementsDetail: JSON.stringify(elements?.slice(0, 5))
2221
+ });
2209
2222
  const images = import_koishi2.h.select(elements, "img");
2223
+ logger.info("getInputData 图片元素", {
2224
+ platform: session.platform,
2225
+ imagesCount: images?.length,
2226
+ imagesAttrs: images?.map((img) => ({ src: img.attrs?.src?.substring(0, 100), allAttrs: Object.keys(img.attrs || {}) }))
2227
+ });
2210
2228
  const textElements = import_koishi2.h.select(elements, "text");
2211
2229
  const text = textElements.map((el) => el.attrs.content).join(" ").trim();
2212
2230
  if (images.length > 0) {
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.8.5",
4
+ "version": "0.8.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [