koishi-plugin-aka-ai-generator 0.8.0 → 0.8.1

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 +10 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1777,6 +1777,12 @@ function parseStyleCommandModifiers(argv, imgParam, modelMappingIndex) {
1777
1777
  flagCandidates.push(token);
1778
1778
  index++;
1779
1779
  }
1780
+ const debugInfo = {
1781
+ flagCandidates,
1782
+ modelMappingKeys: Array.from(modelMappingIndex.keys()),
1783
+ argsList: argsList.slice(0, 10)
1784
+ // 只取前10个避免太长
1785
+ };
1780
1786
  for (const arg of flagCandidates) {
1781
1787
  if (!arg.startsWith("-")) continue;
1782
1788
  const key = normalizeSuffix(arg);
@@ -1784,9 +1790,13 @@ function parseStyleCommandModifiers(argv, imgParam, modelMappingIndex) {
1784
1790
  const mapping = modelMappingIndex.get(key);
1785
1791
  if (mapping) {
1786
1792
  modifiers.modelMapping = mapping;
1793
+ console.log("[parseStyleCommandModifiers] 找到模型映射", { arg, key, mapping, debugInfo });
1787
1794
  break;
1788
1795
  }
1789
1796
  }
1797
+ if (!modifiers.modelMapping && flagCandidates.some((f) => f.startsWith("-"))) {
1798
+ console.log("[parseStyleCommandModifiers] 未找到模型映射", debugInfo);
1799
+ }
1790
1800
  return modifiers;
1791
1801
  }
1792
1802
  __name(parseStyleCommandModifiers, "parseStyleCommandModifiers");
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.0",
4
+ "version": "0.8.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [