memory-bank-skill 7.2.0 → 7.2.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.
- package/dist/cli.js +29 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27,7 +27,7 @@ import { fileURLToPath } from "url";
|
|
|
27
27
|
// package.json
|
|
28
28
|
var package_default = {
|
|
29
29
|
name: "memory-bank-skill",
|
|
30
|
-
version: "7.2.
|
|
30
|
+
version: "7.2.1",
|
|
31
31
|
description: "Memory Bank - \u9879\u76EE\u8BB0\u5FC6\u7CFB\u7EDF\uFF0C\u8BA9 AI \u52A9\u624B\u5728\u6BCF\u6B21\u5BF9\u8BDD\u4E2D\u90FD\u80FD\u5FEB\u901F\u7406\u89E3\u9879\u76EE\u4E0A\u4E0B\u6587",
|
|
32
32
|
type: "module",
|
|
33
33
|
main: "dist/plugin.js",
|
|
@@ -628,6 +628,28 @@ async function checkAndCleanOpenCodeCache() {
|
|
|
628
628
|
}
|
|
629
629
|
return { cleaned: false };
|
|
630
630
|
}
|
|
631
|
+
async function cleanupLegacySkillDir() {
|
|
632
|
+
const legacyDir = join(homedir(), ".config", "opencode", "skill", "memory-bank");
|
|
633
|
+
if (!await exists(legacyDir)) {
|
|
634
|
+
return { cleaned: false };
|
|
635
|
+
}
|
|
636
|
+
try {
|
|
637
|
+
await fs.rm(legacyDir, { recursive: true, force: true });
|
|
638
|
+
const parentDir = join(homedir(), ".config", "opencode", "skill");
|
|
639
|
+
try {
|
|
640
|
+
const remaining = await fs.readdir(parentDir);
|
|
641
|
+
if (remaining.length === 0) {
|
|
642
|
+
await fs.rmdir(parentDir);
|
|
643
|
+
}
|
|
644
|
+
} catch {}
|
|
645
|
+
return {
|
|
646
|
+
cleaned: true,
|
|
647
|
+
message: `Removed legacy skill/ directory (was: ${legacyDir})`
|
|
648
|
+
};
|
|
649
|
+
} catch {
|
|
650
|
+
return { cleaned: false };
|
|
651
|
+
}
|
|
652
|
+
}
|
|
631
653
|
async function install(customModel) {
|
|
632
654
|
log(`
|
|
633
655
|
${colors.bold}Memory Bank Skill Installer v${VERSION}${colors.reset}
|
|
@@ -640,6 +662,12 @@ ${colors.bold}Memory Bank Skill Installer v${VERSION}${colors.reset}
|
|
|
640
662
|
const cacheResult = await checkAndCleanOpenCodeCache();
|
|
641
663
|
if (cacheResult.cleaned) {
|
|
642
664
|
logSuccess(cacheResult.message || "Cleaned OpenCode cache");
|
|
665
|
+
}
|
|
666
|
+
const legacyResult = await cleanupLegacySkillDir();
|
|
667
|
+
if (legacyResult.cleaned) {
|
|
668
|
+
logSuccess(legacyResult.message || "Cleaned legacy skill/ directory");
|
|
669
|
+
}
|
|
670
|
+
if (cacheResult.cleaned || legacyResult.cleaned) {
|
|
643
671
|
log("");
|
|
644
672
|
}
|
|
645
673
|
logStep(1, 4, "Installing skill files...");
|