kodingo-cli 1.0.15 → 1.0.17

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inferDecisionSummary = inferDecisionSummary;
4
4
  exports.inferMemoryFromCode = inferMemoryFromCode;
5
- const KODINGO_API_URL = process.env.KODINGO_API_URL ?? "https://kodingo-api.onrender.com";
5
+ const KODINGO_API_URL = process.env.KODINGO_API_URL ?? "https://api.kodingo.xyz";
6
6
  async function inferDecisionSummary(input) {
7
7
  try {
8
8
  const code = input.diff.slice(0, 2000);
@@ -52,7 +52,7 @@ const path = __importStar(require("path"));
52
52
  const os = __importStar(require("os"));
53
53
  const open_1 = __importDefault(require("open"));
54
54
  const persistence_config_1 = require("../utils/persistence-config");
55
- const API_BASE = "https://kodingo-api.onrender.com";
55
+ const API_BASE = "https://api.kodingo.xyz";
56
56
  const APP_URL = "https://kodingo.xyz";
57
57
  const CONFIG_DIR = path.join(os.homedir(), ".kodingo");
58
58
  const AUTH_TOKEN_PATH = path.join(CONFIG_DIR, "auth.json");
@@ -20,7 +20,7 @@ exports.scanRepoCommand = scanRepoCommand;
20
20
  const fs_1 = __importDefault(require("fs"));
21
21
  const path_1 = __importDefault(require("path"));
22
22
  const persistence_config_1 = require("../utils/persistence-config");
23
- const API_BASE = "https://kodingo-api.onrender.com";
23
+ const API_BASE = "https://api.kodingo.xyz";
24
24
  const SUPPORTED_EXTENSIONS = [
25
25
  ".ts", ".tsx", ".js", ".jsx",
26
26
  ".py", ".go", ".rs", ".php",
@@ -102,7 +102,8 @@ async function hasExistingMemory(token, symbol, repo) {
102
102
  if (!res.ok)
103
103
  return false;
104
104
  const data = await res.json();
105
- return (data.total ?? 0) > 0;
105
+ // Must match exact symbol name
106
+ return (data.total ?? 0) > 0 && (data.memories ?? []).some(m => m.symbol === symbol);
106
107
  }
107
108
  catch {
108
109
  return false;
@@ -167,11 +168,19 @@ async function scanRepoCommand(options = {}) {
167
168
  console.log(` Found ${allSymbols.length} functions across ${files.length} files`);
168
169
  console.log(` Checking which ones need memory...\n`);
169
170
  }
171
+ // Shuffle so repeated runs cover different parts of the codebase
172
+ const shuffled = [...allSymbols].sort(() => Math.random() - 0.5);
170
173
  // Filter to symbols without existing memory, cap at MAX_SYMBOLS
171
174
  const toCapture = [];
172
- for (const sym of allSymbols) {
175
+ const seen = new Set();
176
+ for (const sym of shuffled) {
173
177
  if (toCapture.length >= MAX_SYMBOLS)
174
178
  break;
179
+ // Deduplicate by symbol+file to avoid capturing the same function twice
180
+ const key = `${sym.name}::${sym.file}`;
181
+ if (seen.has(key))
182
+ continue;
183
+ seen.add(key);
175
184
  const exists = await hasExistingMemory(config.token, sym.name, repoName);
176
185
  if (!exists)
177
186
  toCapture.push(sym);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodingo-cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Kodingo CLI",
5
5
  "license": "MIT",
6
6
  "private": false,