coding-friend-cli 1.32.0 → 1.32.2

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.
@@ -1,15 +1,15 @@
1
- import {
2
- getLibPath
3
- } from "./chunk-RZRT7NGT.js";
4
1
  import {
5
2
  resolveMemoryDir
6
3
  } from "./chunk-GTX6I57V.js";
4
+ import {
5
+ getLibPath
6
+ } from "./chunk-RZRT7NGT.js";
7
7
  import {
8
8
  BACK,
9
9
  askScope,
10
10
  formatScopeLabel,
11
11
  injectBackChoice
12
- } from "./chunk-HPNRQYLM.js";
12
+ } from "./chunk-Z5Q533UG.js";
13
13
  import {
14
14
  globalConfigPath,
15
15
  localConfigPath
@@ -24,7 +24,6 @@ import {
24
24
  } from "./chunk-5UVDWG5L.js";
25
25
 
26
26
  // src/lib/memory-prompts.ts
27
- import { existsSync } from "fs";
28
27
  import { homedir } from "os";
29
28
  import { confirm, input, select } from "@inquirer/prompts";
30
29
  import chalk from "chalk";
@@ -219,7 +218,7 @@ async function editMemoryEmbedding(globalCfg, localCfg) {
219
218
  if (ollamaUrl) embedding.ollamaUrl = ollamaUrl;
220
219
  writeMemoryField(scope, "embedding", embedding);
221
220
  }
222
- function writeMemoryMcpEntry(serverPath, memoryDir) {
221
+ function writeMemoryMcpEntry(memoryDir) {
223
222
  const mcpPath = join(process.cwd(), ".mcp.json");
224
223
  const existing = readJson(mcpPath) ?? {};
225
224
  const servers = existing.mcpServers ?? {};
@@ -228,8 +227,8 @@ function writeMemoryMcpEntry(serverPath, memoryDir) {
228
227
  mcpServers: {
229
228
  ...servers,
230
229
  "coding-friend-memory": {
231
- command: "node",
232
- args: [serverPath, memoryDir]
230
+ command: "npx",
231
+ args: ["-y", "coding-friend-cli", "mcp-serve", memoryDir]
233
232
  }
234
233
  }
235
234
  });
@@ -261,24 +260,8 @@ async function editMemoryMcp() {
261
260
  });
262
261
  if (!reconfigure) return;
263
262
  }
264
- let mcpDir;
265
- try {
266
- mcpDir = getLibPath("cf-memory");
267
- } catch {
268
- log.warn(
269
- "cf-memory package not found. Install the CLI first: npm i -g coding-friend-cli"
270
- );
271
- return;
272
- }
273
- const serverPath = join(mcpDir, "dist", "index.js");
274
- if (!existsSync(serverPath)) {
275
- log.warn(
276
- 'cf-memory not built yet. Run "cf memory mcp" after building to get the config.'
277
- );
278
- return;
279
- }
280
263
  const memoryDir = resolveMemoryDir();
281
- writeMemoryMcpEntry(serverPath, memoryDir);
264
+ writeMemoryMcpEntry(memoryDir);
282
265
  }
283
266
  async function memoryConfigMenu(opts) {
284
267
  while (true) {