coding-friend-cli 1.25.0 → 1.26.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/{chunk-5UEY7HQX.js → chunk-2TFHVNBI.js} +1 -1
- package/dist/{chunk-TRIALFOQ.js → chunk-3HTLOI34.js} +1 -1
- package/dist/{chunk-LTHJTWJ6.js → chunk-K2PSF7SF.js} +3 -3
- package/dist/{chunk-SIQJPT47.js → chunk-KFNKH5Z7.js} +1 -1
- package/dist/{chunk-WCSNAEOF.js → chunk-LGQBVN2C.js} +69 -55
- package/dist/{chunk-O4CNZB5H.js → chunk-N2Q224HO.js} +1 -1
- package/dist/{chunk-2ETE7NEL.js → chunk-OARRVZL4.js} +3 -3
- package/dist/{chunk-DO6FV6BL.js → chunk-TWKNGPBO.js} +4 -0
- package/dist/{config-6Z4XX5HW.js → config-MSVSD3HA.js} +13 -13
- package/dist/{dev-S7S3SFKI.js → dev-KTEINOFU.js} +7 -7
- package/dist/{disable-V7OLXEUH.js → disable-7BVJGSIP.js} +3 -3
- package/dist/{enable-OLHRKZCV.js → enable-RO2FBKS6.js} +3 -3
- package/dist/{host-RR6FT7AX.js → host-USZC44PR.js} +2 -2
- package/dist/index.js +31 -31
- package/dist/{init-UOKYZJ53.js → init-EJXHIZCQ.js} +46 -61
- package/dist/{install-BURZ5QEM.js → install-65JCZGCB.js} +15 -12
- package/dist/{mcp-CB4PUUES.js → mcp-4FRVCJBX.js} +5 -5
- package/dist/{memory-TJZNGTOA.js → memory-ER5F37WW.js} +9 -5
- package/dist/{permission-QIJLEMJ6.js → permission-36BMHDYX.js} +1 -1
- package/dist/{session-IECOM63R.js → session-CZ4ZJP7Q.js} +2 -2
- package/dist/{status-FRIGREUV.js → status-IJH4EZBG.js} +12 -12
- package/dist/{statusline-YL44XYGF.js → statusline-PUPTHPBR.js} +2 -2
- package/dist/{uninstall-OXWRPWYF.js → uninstall-5MINSH35.js} +35 -8
- package/dist/{update-6N7EASFT.js → update-IO27DSZW.js} +5 -5
- package/dist/{update-check-XSETLRVR.js → update-check-BPCQ25AR.js} +1 -1
- package/lib/learn-mcp/package-lock.json +1385 -166
- package/lib/learn-mcp/package.json +5 -2
- package/lib/learn-mcp/src/__tests__/docs.test.ts +117 -0
- package/lib/learn-mcp/src/lib/docs.ts +23 -6
- package/lib/learn-mcp/src/tools/create-doc.ts +21 -9
- package/lib/learn-mcp/vitest.config.ts +8 -0
- package/package.json +1 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getMemoryMcpStatus,
|
|
3
|
-
writeMemoryMcpEntry
|
|
4
|
-
} from "./chunk-LTHJTWJ6.js";
|
|
5
1
|
import {
|
|
6
2
|
applyPermissions,
|
|
7
3
|
buildLearnDirRules,
|
|
@@ -11,24 +7,32 @@ import {
|
|
|
11
7
|
getMissingRules,
|
|
12
8
|
logPluginScriptWarning
|
|
13
9
|
} from "./chunk-HEBLANJO.js";
|
|
14
|
-
import {
|
|
15
|
-
getLibPath
|
|
16
|
-
} from "./chunk-RZRT7NGT.js";
|
|
17
|
-
import "./chunk-SIQJPT47.js";
|
|
18
10
|
import {
|
|
19
11
|
findStatuslineHookPath,
|
|
20
12
|
isStatuslineConfigured,
|
|
21
13
|
saveStatuslineConfig,
|
|
22
14
|
selectStatuslineComponents,
|
|
23
15
|
writeStatuslineSettings
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
DEFAULT_CONFIG
|
|
27
|
-
} from "./chunk-PRIH34UB.js";
|
|
16
|
+
} from "./chunk-3HTLOI34.js";
|
|
28
17
|
import {
|
|
29
18
|
ensureShellCompletion,
|
|
30
19
|
hasShellCompletion
|
|
31
20
|
} from "./chunk-DMJCO6LJ.js";
|
|
21
|
+
import {
|
|
22
|
+
ensureMemoryBuilt,
|
|
23
|
+
isMemoryInitialized,
|
|
24
|
+
memoryInitWizard
|
|
25
|
+
} from "./chunk-LGQBVN2C.js";
|
|
26
|
+
import {
|
|
27
|
+
memoryConfigMenu
|
|
28
|
+
} from "./chunk-K2PSF7SF.js";
|
|
29
|
+
import {
|
|
30
|
+
getLibPath
|
|
31
|
+
} from "./chunk-RZRT7NGT.js";
|
|
32
|
+
import "./chunk-KFNKH5Z7.js";
|
|
33
|
+
import {
|
|
34
|
+
DEFAULT_CONFIG
|
|
35
|
+
} from "./chunk-PRIH34UB.js";
|
|
32
36
|
import {
|
|
33
37
|
BACK,
|
|
34
38
|
applyDocsDirChange,
|
|
@@ -39,7 +43,7 @@ import {
|
|
|
39
43
|
getScopeLabel,
|
|
40
44
|
injectBackChoice,
|
|
41
45
|
showConfigHint
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-N2Q224HO.js";
|
|
43
47
|
import {
|
|
44
48
|
commandExists,
|
|
45
49
|
run
|
|
@@ -55,7 +59,7 @@ import {
|
|
|
55
59
|
globalConfigPath,
|
|
56
60
|
localConfigPath,
|
|
57
61
|
resolvePath
|
|
58
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-TWKNGPBO.js";
|
|
59
63
|
import {
|
|
60
64
|
log,
|
|
61
65
|
printBanner
|
|
@@ -163,8 +167,8 @@ function printSetupStatus(globalCfg, localCfg, gitAvailable) {
|
|
|
163
167
|
{ label: "Shell completion", done: hasShellCompletion(), skipped: false },
|
|
164
168
|
{ label: "Statusline", done: isStatuslineConfigured(), skipped: false },
|
|
165
169
|
{
|
|
166
|
-
label: "CF Memory
|
|
167
|
-
done:
|
|
170
|
+
label: "CF Memory",
|
|
171
|
+
done: isMemoryInitialized(),
|
|
168
172
|
skipped: false
|
|
169
173
|
},
|
|
170
174
|
{
|
|
@@ -586,27 +590,33 @@ async function stepStatusline() {
|
|
|
586
590
|
writeStatuslineSettings(hookResult.hookPath);
|
|
587
591
|
log.success("Statusline configured!");
|
|
588
592
|
}
|
|
589
|
-
async function stepMemory(docsDir) {
|
|
590
|
-
const
|
|
591
|
-
if (
|
|
593
|
+
async function stepMemory(docsDir, opts) {
|
|
594
|
+
const initialized = isMemoryInitialized();
|
|
595
|
+
if (initialized) {
|
|
592
596
|
printStepHeader(
|
|
593
|
-
`CF Memory
|
|
594
|
-
"
|
|
597
|
+
`CF Memory ${chalk.green("[done]")}`,
|
|
598
|
+
"Persistent project knowledge across sessions \u2014 search tier, embeddings, MCP."
|
|
595
599
|
);
|
|
596
|
-
|
|
600
|
+
if (opts?.menuMode) {
|
|
601
|
+
await memoryConfigMenu({ exitLabel: "Back" });
|
|
602
|
+
} else {
|
|
603
|
+
log.dim(
|
|
604
|
+
'Memory already initialized. Run "cf memory config" to adjust settings.'
|
|
605
|
+
);
|
|
606
|
+
}
|
|
597
607
|
return;
|
|
598
608
|
}
|
|
599
609
|
printStepHeader(
|
|
600
|
-
"CF Memory
|
|
601
|
-
"
|
|
610
|
+
"CF Memory",
|
|
611
|
+
"Persistent project knowledge across sessions \u2014 search tier, embeddings, MCP."
|
|
602
612
|
);
|
|
603
613
|
const choice = await select({
|
|
604
|
-
message: "
|
|
614
|
+
message: "Set up CF Memory?",
|
|
605
615
|
choices: injectBackChoice(
|
|
606
616
|
[
|
|
607
|
-
{ name: "Yes,
|
|
617
|
+
{ name: "Yes, run memory setup wizard", value: "yes" },
|
|
608
618
|
{
|
|
609
|
-
name: "No, I'll
|
|
619
|
+
name: "No, I'll set it up later (cf memory init)",
|
|
610
620
|
value: "no"
|
|
611
621
|
}
|
|
612
622
|
],
|
|
@@ -615,46 +625,21 @@ async function stepMemory(docsDir) {
|
|
|
615
625
|
});
|
|
616
626
|
handleBack(choice);
|
|
617
627
|
if (choice === "no") {
|
|
618
|
-
log.dim(
|
|
628
|
+
log.dim('Skipped. Run "cf memory init" anytime to set up.');
|
|
619
629
|
return;
|
|
620
630
|
}
|
|
621
|
-
let
|
|
631
|
+
let mcpDir;
|
|
622
632
|
try {
|
|
623
|
-
|
|
624
|
-
serverPath = join(mcpDir, "dist", "index.js");
|
|
625
|
-
if (!existsSync(serverPath)) {
|
|
626
|
-
log.warn(
|
|
627
|
-
"cf-memory not built yet. Run `cd cli/lib/cf-memory && npm install && npm run build` first."
|
|
628
|
-
);
|
|
629
|
-
return;
|
|
630
|
-
}
|
|
633
|
+
mcpDir = getLibPath("cf-memory");
|
|
631
634
|
} catch {
|
|
632
635
|
log.warn(
|
|
633
636
|
"cf-memory package not found. Install the CLI first: npm i -g coding-friend-cli"
|
|
634
637
|
);
|
|
635
638
|
return;
|
|
636
639
|
}
|
|
640
|
+
ensureMemoryBuilt(mcpDir);
|
|
637
641
|
const memoryDir = join(process.cwd(), docsDir, "memory");
|
|
638
|
-
|
|
639
|
-
const autoCapture = await confirm({
|
|
640
|
-
message: "Enable auto-capture? (saves session summaries to memory before context compaction)",
|
|
641
|
-
default: false
|
|
642
|
-
});
|
|
643
|
-
if (autoCapture) {
|
|
644
|
-
const scope = await askScope();
|
|
645
|
-
if (scope !== "back") {
|
|
646
|
-
const targetPath = scope === "global" ? globalConfigPath() : localConfigPath();
|
|
647
|
-
const existingConfig = readJson(targetPath);
|
|
648
|
-
const existingMemory = existingConfig?.memory ?? {};
|
|
649
|
-
mergeJson(targetPath, {
|
|
650
|
-
memory: { ...existingMemory, autoCapture: true }
|
|
651
|
-
});
|
|
652
|
-
log.success(`Saved to ${targetPath}`);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
log.info(
|
|
656
|
-
`Tip: Run ${chalk.cyan("/cf-scan")} in Claude Code to populate memory with project knowledge.`
|
|
657
|
-
);
|
|
642
|
+
await memoryInitWizard(memoryDir, mcpDir);
|
|
658
643
|
}
|
|
659
644
|
async function stepClaudePermissions(externalLearnDir, autoCommit) {
|
|
660
645
|
const scope = await select({
|
|
@@ -734,7 +719,7 @@ async function initMenu(gitAvailable) {
|
|
|
734
719
|
const gitignoreStatus = !gitAvailable ? chalk.dim("skipped") : hasGitignoreBlock() ? chalk.green("configured") : chalk.yellow("not configured");
|
|
735
720
|
const completionStatus = hasShellCompletion() ? chalk.green("installed") : chalk.yellow("not installed");
|
|
736
721
|
const statuslineStatus = isStatuslineConfigured() ? chalk.green("configured") : chalk.yellow("not configured");
|
|
737
|
-
const memoryStatus =
|
|
722
|
+
const memoryStatus = isMemoryInitialized() ? chalk.green("initialized") : chalk.yellow("not configured");
|
|
738
723
|
const autoApproveScope = getScopeLabel("autoApprove", globalCfg, localCfg);
|
|
739
724
|
const autoApproveVal = getMergedValue(
|
|
740
725
|
"autoApprove",
|
|
@@ -783,9 +768,9 @@ async function initMenu(gitAvailable) {
|
|
|
783
768
|
description: " Token count, model, and session info in your terminal prompt"
|
|
784
769
|
},
|
|
785
770
|
{
|
|
786
|
-
name: `CF Memory
|
|
771
|
+
name: `CF Memory (${memoryStatus})`,
|
|
787
772
|
value: "memory",
|
|
788
|
-
description: "
|
|
773
|
+
description: " Persistent project knowledge \u2014 search tier, embeddings, MCP"
|
|
789
774
|
},
|
|
790
775
|
{
|
|
791
776
|
name: `Auto-approve ${formatScopeLabel(autoApproveScope)}${autoApproveVal !== void 0 ? ` (${autoApproveVal})` : ""}`,
|
|
@@ -827,7 +812,7 @@ async function initMenu(gitAvailable) {
|
|
|
827
812
|
await stepStatusline();
|
|
828
813
|
break;
|
|
829
814
|
case "memory":
|
|
830
|
-
await stepMemory(docsDir);
|
|
815
|
+
await stepMemory(docsDir, { menuMode: true });
|
|
831
816
|
break;
|
|
832
817
|
case "autoApprove": {
|
|
833
818
|
const autoApproveChoice = await confirm({
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLatestVersion,
|
|
3
3
|
semverCompare
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
enableMarketplaceAutoUpdate,
|
|
7
|
-
isMarketplaceRegistered,
|
|
8
|
-
isPluginDisabled
|
|
9
|
-
} from "./chunk-5UEY7HQX.js";
|
|
4
|
+
} from "./chunk-OARRVZL4.js";
|
|
10
5
|
import {
|
|
11
6
|
getInstalledVersion
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-PRIH34UB.js";
|
|
7
|
+
} from "./chunk-3HTLOI34.js";
|
|
14
8
|
import {
|
|
15
9
|
ensureShellCompletion
|
|
16
10
|
} from "./chunk-DMJCO6LJ.js";
|
|
11
|
+
import {
|
|
12
|
+
enableMarketplaceAutoUpdate,
|
|
13
|
+
isMarketplaceRegistered,
|
|
14
|
+
isPluginDisabled
|
|
15
|
+
} from "./chunk-2TFHVNBI.js";
|
|
16
|
+
import "./chunk-PRIH34UB.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveScope
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-N2Q224HO.js";
|
|
20
20
|
import {
|
|
21
21
|
commandExists,
|
|
22
22
|
run
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import "./chunk-5UVDWG5L.js";
|
|
25
25
|
import {
|
|
26
26
|
devStatePath
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TWKNGPBO.js";
|
|
28
28
|
import {
|
|
29
29
|
log,
|
|
30
30
|
printBanner
|
|
@@ -119,10 +119,13 @@ async function installCommand(opts = {}) {
|
|
|
119
119
|
console.log();
|
|
120
120
|
log.info("Next steps:");
|
|
121
121
|
console.log(
|
|
122
|
-
` ${chalk.cyan("cf init")}
|
|
122
|
+
` ${chalk.cyan("cf init")} Initialize workspace (docs folders, config)`
|
|
123
|
+
);
|
|
124
|
+
console.log(
|
|
125
|
+
` ${chalk.cyan("cf memory init")} Setup AI memory for the project (also available in ${chalk.cyan("cf init")})`
|
|
123
126
|
);
|
|
124
127
|
console.log(
|
|
125
|
-
` ${chalk.cyan("cf statusline")}
|
|
128
|
+
` ${chalk.cyan("cf statusline")} Setup statusline in Claude Code to show more real-time info`
|
|
126
129
|
);
|
|
127
130
|
console.log();
|
|
128
131
|
log.dim("Restart Claude Code (or start a new session) to use the plugin.");
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryBuilt,
|
|
3
3
|
printMemoryMcpConfig
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LGQBVN2C.js";
|
|
5
|
+
import "./chunk-K2PSF7SF.js";
|
|
6
6
|
import {
|
|
7
7
|
getLibPath
|
|
8
8
|
} from "./chunk-RZRT7NGT.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveDocsDir,
|
|
11
11
|
resolveMemoryDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KFNKH5Z7.js";
|
|
13
13
|
import "./chunk-PRIH34UB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-N2Q224HO.js";
|
|
15
15
|
import {
|
|
16
16
|
run
|
|
17
17
|
} from "./chunk-EVGXUDX4.js";
|
|
18
18
|
import "./chunk-5UVDWG5L.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-TWKNGPBO.js";
|
|
20
20
|
import {
|
|
21
21
|
log,
|
|
22
22
|
printBanner
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryBuilt,
|
|
3
|
+
isMemoryInitialized,
|
|
3
4
|
memoryConfigCommand,
|
|
4
5
|
memoryInitCommand,
|
|
6
|
+
memoryInitWizard,
|
|
5
7
|
memoryListCommand,
|
|
6
8
|
memoryMcpCommand,
|
|
7
9
|
memoryRebuildCommand,
|
|
@@ -11,20 +13,22 @@ import {
|
|
|
11
13
|
memoryStatusCommand,
|
|
12
14
|
memoryStopDaemonCommand,
|
|
13
15
|
printMemoryMcpConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-LGQBVN2C.js";
|
|
17
|
+
import "./chunk-K2PSF7SF.js";
|
|
16
18
|
import "./chunk-RZRT7NGT.js";
|
|
17
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-KFNKH5Z7.js";
|
|
18
20
|
import "./chunk-PRIH34UB.js";
|
|
19
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-N2Q224HO.js";
|
|
20
22
|
import "./chunk-EVGXUDX4.js";
|
|
21
23
|
import "./chunk-5UVDWG5L.js";
|
|
22
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TWKNGPBO.js";
|
|
23
25
|
import "./chunk-NREZK463.js";
|
|
24
26
|
export {
|
|
25
27
|
ensureMemoryBuilt,
|
|
28
|
+
isMemoryInitialized,
|
|
26
29
|
memoryConfigCommand,
|
|
27
30
|
memoryInitCommand,
|
|
31
|
+
memoryInitWizard,
|
|
28
32
|
memoryListCommand,
|
|
29
33
|
memoryMcpCommand,
|
|
30
34
|
memoryRebuildCommand,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KFNKH5Z7.js";
|
|
4
4
|
import "./chunk-PRIH34UB.js";
|
|
5
5
|
import {
|
|
6
6
|
readJson,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
claudeSessionDir,
|
|
11
11
|
encodeProjectPath,
|
|
12
12
|
resolvePath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TWKNGPBO.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
16
|
} from "./chunk-NREZK463.js";
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getExistingRules
|
|
3
|
+
} from "./chunk-HEBLANJO.js";
|
|
1
4
|
import {
|
|
2
5
|
getCliVersion,
|
|
3
6
|
getLatestCliVersion,
|
|
4
7
|
getLatestVersion,
|
|
5
8
|
semverCompare
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OARRVZL4.js";
|
|
10
|
+
import {
|
|
11
|
+
getInstalledVersion
|
|
12
|
+
} from "./chunk-3HTLOI34.js";
|
|
13
|
+
import "./chunk-DMJCO6LJ.js";
|
|
7
14
|
import {
|
|
8
15
|
detectPluginScope,
|
|
9
16
|
isPluginDisabled
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
getExistingRules
|
|
13
|
-
} from "./chunk-HEBLANJO.js";
|
|
17
|
+
} from "./chunk-2TFHVNBI.js";
|
|
14
18
|
import {
|
|
15
19
|
getLibPath
|
|
16
20
|
} from "./chunk-RZRT7NGT.js";
|
|
17
21
|
import {
|
|
18
22
|
resolveMemoryDir
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
getInstalledVersion
|
|
22
|
-
} from "./chunk-TRIALFOQ.js";
|
|
23
|
+
} from "./chunk-KFNKH5Z7.js";
|
|
23
24
|
import "./chunk-PRIH34UB.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-O4CNZB5H.js";
|
|
25
|
+
import "./chunk-N2Q224HO.js";
|
|
26
26
|
import "./chunk-EVGXUDX4.js";
|
|
27
27
|
import {
|
|
28
28
|
readJson
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
devStatePath,
|
|
33
33
|
globalConfigPath,
|
|
34
34
|
localConfigPath
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TWKNGPBO.js";
|
|
36
36
|
import "./chunk-NREZK463.js";
|
|
37
37
|
|
|
38
38
|
// src/commands/status.ts
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
saveStatuslineConfig,
|
|
5
5
|
selectStatuslineComponents,
|
|
6
6
|
writeStatuslineSettings
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3HTLOI34.js";
|
|
8
8
|
import {
|
|
9
9
|
ALL_COMPONENT_IDS
|
|
10
10
|
} from "./chunk-PRIH34UB.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
commandExists
|
|
13
13
|
} from "./chunk-EVGXUDX4.js";
|
|
14
14
|
import "./chunk-5UVDWG5L.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-TWKNGPBO.js";
|
|
16
16
|
import {
|
|
17
17
|
log,
|
|
18
18
|
printBanner
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isMarketplaceRegistered,
|
|
3
|
-
isPluginInstalled
|
|
4
|
-
} from "./chunk-5UEY7HQX.js";
|
|
5
1
|
import {
|
|
6
2
|
hasShellCompletion,
|
|
7
3
|
removeShellCompletion
|
|
8
4
|
} from "./chunk-DMJCO6LJ.js";
|
|
5
|
+
import {
|
|
6
|
+
isMarketplaceRegistered,
|
|
7
|
+
isPluginInstalled
|
|
8
|
+
} from "./chunk-2TFHVNBI.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveScope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-N2Q224HO.js";
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
14
|
run
|
|
@@ -22,8 +22,9 @@ import {
|
|
|
22
22
|
devStatePath,
|
|
23
23
|
globalConfigDir,
|
|
24
24
|
marketplaceCachePath,
|
|
25
|
-
marketplaceClonePath
|
|
26
|
-
|
|
25
|
+
marketplaceClonePath,
|
|
26
|
+
memoryDepsDir
|
|
27
|
+
} from "./chunk-TWKNGPBO.js";
|
|
27
28
|
import {
|
|
28
29
|
log,
|
|
29
30
|
printBanner
|
|
@@ -61,6 +62,7 @@ function detect() {
|
|
|
61
62
|
statuslineConfigured: hasStatuslineReference(),
|
|
62
63
|
shellCompletionExists: hasShellCompletion(),
|
|
63
64
|
globalConfigExists: existsSync(globalConfigDir()),
|
|
65
|
+
memoryDepsExists: existsSync(memoryDepsDir()),
|
|
64
66
|
devModeActive: existsSync(devStatePath())
|
|
65
67
|
};
|
|
66
68
|
}
|
|
@@ -77,10 +79,13 @@ function displayDetection(d) {
|
|
|
77
79
|
console.log(
|
|
78
80
|
` ${check(d.globalConfigExists)} Global config (~/.coding-friend/)`
|
|
79
81
|
);
|
|
82
|
+
console.log(
|
|
83
|
+
` ${check(d.memoryDepsExists)} Memory dependencies (~/.coding-friend/memory/)`
|
|
84
|
+
);
|
|
80
85
|
console.log();
|
|
81
86
|
}
|
|
82
87
|
function nothingToRemove(d) {
|
|
83
|
-
return !d.pluginInstalled && !d.marketplaceRegistered && !d.cacheExists && !d.cloneExists && !d.statuslineConfigured && !d.shellCompletionExists && !d.globalConfigExists;
|
|
88
|
+
return !d.pluginInstalled && !d.marketplaceRegistered && !d.cacheExists && !d.cloneExists && !d.statuslineConfigured && !d.shellCompletionExists && !d.globalConfigExists && !d.memoryDepsExists;
|
|
84
89
|
}
|
|
85
90
|
async function uninstallScoped(scope) {
|
|
86
91
|
const proceed = await confirm({
|
|
@@ -171,6 +176,13 @@ async function uninstallCommand(opts = {}) {
|
|
|
171
176
|
default: false
|
|
172
177
|
});
|
|
173
178
|
}
|
|
179
|
+
let removeMemory = false;
|
|
180
|
+
if (detection.memoryDepsExists && !removeConfig) {
|
|
181
|
+
removeMemory = await confirm({
|
|
182
|
+
message: "Also remove memory dependencies? (better-sqlite3, sqlite-vec, @huggingface/transformers)",
|
|
183
|
+
default: false
|
|
184
|
+
});
|
|
185
|
+
}
|
|
174
186
|
console.log();
|
|
175
187
|
let errors = 0;
|
|
176
188
|
if (detection.pluginInstalled) {
|
|
@@ -242,6 +254,15 @@ async function uninstallCommand(opts = {}) {
|
|
|
242
254
|
errors++;
|
|
243
255
|
}
|
|
244
256
|
}
|
|
257
|
+
if (removeMemory && !removeConfig) {
|
|
258
|
+
log.step("Removing memory dependencies...");
|
|
259
|
+
try {
|
|
260
|
+
rmSync(memoryDepsDir(), { recursive: true, force: true });
|
|
261
|
+
} catch {
|
|
262
|
+
log.warn("Could not remove ~/.coding-friend/memory/ directory.");
|
|
263
|
+
errors++;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
245
266
|
console.log();
|
|
246
267
|
if (errors === 0) {
|
|
247
268
|
log.success("Coding Friend has been completely uninstalled.");
|
|
@@ -251,8 +272,14 @@ async function uninstallCommand(opts = {}) {
|
|
|
251
272
|
if (!removeConfig && detection.globalConfigExists) {
|
|
252
273
|
log.dim("Global config kept at ~/.coding-friend/");
|
|
253
274
|
}
|
|
275
|
+
if (!removeMemory && !removeConfig && detection.memoryDepsExists) {
|
|
276
|
+
log.dim("Memory dependencies kept at ~/.coding-friend/memory/");
|
|
277
|
+
}
|
|
254
278
|
console.log();
|
|
255
279
|
log.dim("Restart Claude Code to complete the uninstall.");
|
|
280
|
+
console.log();
|
|
281
|
+
log.dim("To also remove the CLI tool globally, run:");
|
|
282
|
+
console.log(` ${chalk.bold("npm uninstall -g coding-friend-cli")}`);
|
|
256
283
|
}
|
|
257
284
|
export {
|
|
258
285
|
uninstallCommand
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
getLatestVersion,
|
|
5
5
|
semverCompare,
|
|
6
6
|
updateCommand
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-PRIH34UB.js";
|
|
7
|
+
} from "./chunk-OARRVZL4.js";
|
|
8
|
+
import "./chunk-3HTLOI34.js";
|
|
10
9
|
import "./chunk-DMJCO6LJ.js";
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-PRIH34UB.js";
|
|
11
|
+
import "./chunk-N2Q224HO.js";
|
|
12
12
|
import "./chunk-EVGXUDX4.js";
|
|
13
13
|
import "./chunk-5UVDWG5L.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-TWKNGPBO.js";
|
|
15
15
|
import "./chunk-NREZK463.js";
|
|
16
16
|
export {
|
|
17
17
|
getCliVersion,
|