kodingo-cli 1.0.22 → 1.0.23
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.
|
@@ -150,9 +150,13 @@ async function inferAndCapture(token, symbol, repo) {
|
|
|
150
150
|
}
|
|
151
151
|
async function scanRepoCommand(options = {}) {
|
|
152
152
|
const config = (0, persistence_config_1.readConfig)();
|
|
153
|
-
|
|
153
|
+
const repoRoot2 = options.repo ? path_1.default.resolve(options.repo) : findRepoRoot(process.cwd());
|
|
154
|
+
const wsConfig = (0, persistence_config_1.readWorkspaceConfig)(repoRoot2);
|
|
155
|
+
const token = wsConfig?.token ?? config.token ?? "";
|
|
156
|
+
const apiUrl = wsConfig?.apiUrl ?? config.apiUrl ?? "https://kodingo-api.onrender.com";
|
|
157
|
+
if (!token) {
|
|
154
158
|
if (!options.silent)
|
|
155
|
-
console.error("✖
|
|
159
|
+
console.error("✖ No project token found. Run `kodingo init` first.");
|
|
156
160
|
return 0;
|
|
157
161
|
}
|
|
158
162
|
const repoRoot = options.repo
|
|
@@ -178,7 +182,7 @@ async function scanRepoCommand(options = {}) {
|
|
|
178
182
|
console.log(` Checking which ones need memory...\n`);
|
|
179
183
|
}
|
|
180
184
|
// Fetch all existing memory symbols in one bulk call
|
|
181
|
-
const existingSymbols = await fetchExistingSymbols(
|
|
185
|
+
const existingSymbols = await fetchExistingSymbols(token, repoName);
|
|
182
186
|
// Shuffle so repeated runs cover different parts of the codebase
|
|
183
187
|
const shuffled = [...allSymbols].sort(() => Math.random() - 0.5);
|
|
184
188
|
// Filter locally — no per-symbol API calls needed
|
|
@@ -206,7 +210,7 @@ async function scanRepoCommand(options = {}) {
|
|
|
206
210
|
let captured = 0;
|
|
207
211
|
for (let i = 0; i < toCapture.length; i += BATCH_SIZE) {
|
|
208
212
|
const batch = toCapture.slice(i, i + BATCH_SIZE);
|
|
209
|
-
const results = await Promise.all(batch.map(sym => inferAndCapture(
|
|
213
|
+
const results = await Promise.all(batch.map(sym => inferAndCapture(token, sym, repoName)));
|
|
210
214
|
const batchCaptured = results.filter(Boolean).length;
|
|
211
215
|
captured += batchCaptured;
|
|
212
216
|
if (!options.silent) {
|