@aiyiran/myclaw 1.1.85 → 1.1.86

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/index.js +10 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1891,8 +1891,18 @@ async function ensureConfig(customName) {
1891
1891
 
1892
1892
  function runSyncTemplates() {
1893
1893
  const http = require('http');
1894
+ const fs = require('fs');
1894
1895
  const apiPort = process.platform === 'linux' ? '8080' : '18800';
1895
1896
 
1897
+ // --force:删除本地 index,强制重新比对
1898
+ if (args.includes('--force')) {
1899
+ const localIndex = path.join(os.homedir(), '.openclaw', 'skills', 'yiran-playground-template-use', 'template-index.json');
1900
+ if (fs.existsSync(localIndex)) {
1901
+ fs.unlinkSync(localIndex);
1902
+ console.log(colors.yellow + '[muban] 已清除本地 index,强制重新检查' + colors.nc);
1903
+ }
1904
+ }
1905
+
1896
1906
  function apiGet(path, cb) {
1897
1907
  http.get('http://127.0.0.1:' + apiPort + path, (res) => {
1898
1908
  let data = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.85",
3
+ "version": "1.1.86",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {