@aiyiran/myclaw 1.1.87 → 1.1.88

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.
@@ -632,32 +632,23 @@
632
632
 
633
633
  var fullPath = asset.path || asset.name || '未命名';
634
634
  var parts = fullPath.split('/').filter(function (p) { return p !== ''; });
635
- // 上行:倒数第二层以上的路径(若只有一层目录则无上行)
636
- // 下行:直接父文件夹/文件名
637
- var topPart = '';
638
- var bottomPart = fullPath;
639
- if (parts.length >= 3) {
640
- // 有多层:上行 = 除最后两段外的路径,下行 = 最后两段
641
- topPart = parts.slice(0, parts.length - 2).join('/') + '/';
642
- bottomPart = parts.slice(parts.length - 2).join('/');
643
- } else if (parts.length === 2) {
644
- // 只有一层目录:只显示下行(dir/file)
645
- topPart = '';
646
- bottomPart = parts.join('/');
647
- }
635
+ // 上行:相对路径(除文件名外的所有目录)
636
+ // 下行:文件名
637
+ var fileName = parts[parts.length - 1] || fullPath;
638
+ var dirPath = parts.length >= 2 ? parts.slice(0, parts.length - 1).join('/') + '/' : '';
648
639
 
649
- // 上行:更上层路径(灰色极小字)
650
- if (topPart) {
640
+ // 上行:相对路径(灰色极小字)
641
+ if (dirPath) {
651
642
  var dirSpan = document.createElement('span');
652
- dirSpan.textContent = topPart;
643
+ dirSpan.textContent = dirPath;
653
644
  dirSpan.title = fullPath;
654
- dirSpan.style.cssText = 'color:#666;font-size:9px;line-height:1.3;white-space:nowrap;';
645
+ dirSpan.style.cssText = 'color:#666;font-size:9px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;';
655
646
  fname.appendChild(dirSpan);
656
647
  }
657
648
 
658
- // 下行:直接父文件夹/文件名(大字体)
649
+ // 下行:文件名(大字体)
659
650
  var nameSpan = document.createElement('span');
660
- nameSpan.textContent = bottomPart;
651
+ nameSpan.textContent = fileName;
661
652
  nameSpan.title = fullPath;
662
653
  nameSpan.style.cssText = 'font-size:13px;font-weight:500;line-height:1.5;white-space:nowrap;';
663
654
  fname.appendChild(nameSpan);
@@ -1230,8 +1221,6 @@
1230
1221
  row.appendChild(row3);
1231
1222
  leftPane.appendChild(row);
1232
1223
 
1233
- // 默认选中第一条并预览
1234
- if (idx === 0) setActive();
1235
1224
  });
1236
1225
  }
1237
1226
 
@@ -2594,7 +2583,7 @@
2594
2583
  // ── 并行:加载本地 index + 检查 CDN 更新 ──────────────────────────────
2595
2584
  var _pollTimer = null; // 提到外层,doSync 守卫用
2596
2585
 
2597
- function doSync() {
2586
+ function doSync(force) {
2598
2587
  // 轮询进行中时点击无效,避免重复起 timer
2599
2588
  if (_pollTimer) return;
2600
2589
  headSyncBtn.disabled = true;
@@ -2646,7 +2635,7 @@
2646
2635
  }, 3000);
2647
2636
  }
2648
2637
 
2649
- fetch(MYCLAW_API_BASE + '/api/sync-templates?force=1')
2638
+ fetch(MYCLAW_API_BASE + '/api/sync-templates' + (force ? '?force=1' : ''))
2650
2639
  .then(function (r) { return r.json(); })
2651
2640
  .then(function (sync) {
2652
2641
  headSyncBtn.disabled = false;
@@ -2680,7 +2669,7 @@
2680
2669
  });
2681
2670
  }
2682
2671
 
2683
- headSyncBtn.onclick = doSync;
2672
+ headSyncBtn.onclick = function () { doSync(true); };
2684
2673
  doSync();
2685
2674
 
2686
2675
  fetch(MYCLAW_API_BASE + '/api/file?path=' + encodeURIComponent(TEMPLATE_ROOT + '/template-index.json'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.87",
3
+ "version": "1.1.88",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "index_updated_at": "2026-05-07T09:28:31Z",
2
+ "index_updated_at": "2026-05-08T02:45:34Z",
3
3
  "templates": {
4
4
  "696de592": {
5
5
  "id": "696de592",
@@ -329,9 +329,9 @@
329
329
  "编号": "101",
330
330
  "名称": "万物图签:我的AI卡牌宇宙",
331
331
  "文件夹名": "c101_万物图签:我的AI卡牌宇宙",
332
- "version": "v5",
333
- "路径": "templates/c101_万物图签:我的AI卡牌宇宙/v5",
334
- "入口文件": "templates/c101_万物图签:我的AI卡牌宇宙/v5/index.html",
332
+ "version": "v6",
333
+ "路径": "templates/c101_万物图签:我的AI卡牌宇宙/v6",
334
+ "入口文件": "templates/c101_万物图签:我的AI卡牌宇宙/v6/index.html",
335
335
  "一句话说明": "分四个阶段逐步做出你的精灵卡牌:先让角色诞生,再加属性和特效,最后扩展成一个系列。",
336
336
  "主能力标签": "第四能力:迭代推进",
337
337
  "任务类型标签": "视听表达",
@@ -348,7 +348,7 @@
348
348
  "第四能力:迭代推进",
349
349
  "视听表达"
350
350
  ],
351
- "updated_at": "2026-05-07T09:02:35Z"
351
+ "updated_at": "2026-05-08T02:45:29Z"
352
352
  },
353
353
  "cf03758c": {
354
354
  "id": "cf03758c",
@@ -112,9 +112,9 @@
112
112
 
113
113
  ## C101 万物图签:我的AI卡牌宇宙
114
114
  - ID:a2f9502c
115
- - 版本:v5
116
- - 路径:templates/c101_万物图签:我的AI卡牌宇宙/v5
117
- - 入口文件:templates/c101_万物图签:我的AI卡牌宇宙/v5/index.html
115
+ - 版本:v6
116
+ - 路径:templates/c101_万物图签:我的AI卡牌宇宙/v6
117
+ - 入口文件:templates/c101_万物图签:我的AI卡牌宇宙/v6/index.html
118
118
  - 主能力标签:第四能力:迭代推进
119
119
  - 任务类型标签:视听表达
120
120
  - 关键词:c101_万物图签:我的AI卡牌宇宙, 分四个阶段逐步做出你的精灵卡牌:先让角色诞生,再加属性和特效,最后扩展成一个系列。, 已经做过基础卡牌任务的学生, 对卡牌游戏有兴趣、想做出有系统感作品的学生, 会做但容易停在第一版不改的学生, 在复杂框架上读懂结构,再做定向修改, 规划主题和阵营分组逻辑, 明确识别问题并做一次有意识的迭代升级, 万物图签:我的AI卡牌宇宙, 第四能力:迭代推进, 视听表达