@devness/useai 0.4.11 → 0.4.12

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/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ var VERSION;
112
112
  var init_version = __esm({
113
113
  "../shared/dist/constants/version.js"() {
114
114
  "use strict";
115
- VERSION = "0.4.11";
115
+ VERSION = "0.4.12";
116
116
  }
117
117
  });
118
118
 
@@ -1493,11 +1493,17 @@ function injectInstructions(config) {
1493
1493
  writeFileSync4(config.path, USEAI_INSTRUCTIONS + "\n");
1494
1494
  return;
1495
1495
  }
1496
- if (hasInstructionsBlock(config.path)) return;
1497
1496
  let existing = "";
1498
1497
  if (existsSync8(config.path)) {
1499
1498
  existing = readFileSync4(config.path, "utf-8");
1500
1499
  }
1500
+ if (hasInstructionsBlock(config.path)) {
1501
+ const pattern = new RegExp(
1502
+ `${INSTRUCTIONS_START}[\\s\\S]*?${INSTRUCTIONS_END}`
1503
+ );
1504
+ writeFileSync4(config.path, existing.replace(pattern, USEAI_INSTRUCTIONS_BLOCK));
1505
+ return;
1506
+ }
1501
1507
  const separator = existing && !existing.endsWith("\n") ? "\n\n" : existing ? "\n" : "";
1502
1508
  writeFileSync4(config.path, existing + separator + USEAI_INSTRUCTIONS_BLOCK + "\n");
1503
1509
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",