@polarityinc/paragon 0.0.13 ā 0.1.0
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/package.json +1 -1
- package/scripts/npm-install.js +37 -1
package/package.json
CHANGED
package/scripts/npm-install.js
CHANGED
|
@@ -282,6 +282,37 @@ function showRipgrepInstructions() {
|
|
|
282
282
|
return false;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
// Install osgrep for semantic code search
|
|
286
|
+
function installOsgrep() {
|
|
287
|
+
console.log('\nš Installing osgrep for semantic code search...\n');
|
|
288
|
+
|
|
289
|
+
// Check if osgrep is already installed
|
|
290
|
+
if (commandExists('osgrep')) {
|
|
291
|
+
console.log(' ā osgrep already installed');
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Install via npm
|
|
296
|
+
try {
|
|
297
|
+
console.log(' Installing osgrep via npm...');
|
|
298
|
+
execSync('npm install -g osgrep', { stdio: 'inherit' });
|
|
299
|
+
console.log(' ā osgrep installed via npm');
|
|
300
|
+
|
|
301
|
+
// Run osgrep setup to download embedding models
|
|
302
|
+
console.log(' Setting up osgrep (downloading embedding models)...');
|
|
303
|
+
execSync('osgrep setup', { stdio: 'inherit' });
|
|
304
|
+
console.log(' ā osgrep setup complete');
|
|
305
|
+
|
|
306
|
+
return true;
|
|
307
|
+
} catch (e) {
|
|
308
|
+
console.log(' ā Failed to install osgrep');
|
|
309
|
+
console.log('\n To enable semantic code search, install manually:');
|
|
310
|
+
console.log(' npm install -g osgrep');
|
|
311
|
+
console.log(' osgrep setup\n');
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
285
316
|
// Check for brew version conflict
|
|
286
317
|
function checkBrewPolarity() {
|
|
287
318
|
if (platform !== 'darwin') {
|
|
@@ -335,13 +366,18 @@ downloadFile(GITHUB_RELEASE_URL, binPath)
|
|
|
335
366
|
// Install security scanning tools (trivy, semgrep, gitleaks)
|
|
336
367
|
installSecurityTools();
|
|
337
368
|
|
|
369
|
+
// Install osgrep for semantic code search
|
|
370
|
+
installOsgrep();
|
|
371
|
+
|
|
338
372
|
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā');
|
|
339
373
|
console.log('\nš Next Steps:\n');
|
|
340
374
|
console.log(' 1. Authenticate with Polarity:');
|
|
341
375
|
console.log(' $ paragon auth login\n');
|
|
342
376
|
console.log(' 2. Get your API key from:');
|
|
343
377
|
console.log(' https://home.polarity.cc/app/settings\n');
|
|
344
|
-
console.log(' 3.
|
|
378
|
+
console.log(' 3. Index your repository for semantic search:');
|
|
379
|
+
console.log(' $ paragon (then run /index from command palette)\n');
|
|
380
|
+
console.log(' 4. Start using Paragon:');
|
|
345
381
|
console.log(' $ paragon\n');
|
|
346
382
|
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā');
|
|
347
383
|
console.log('\nš Documentation: https://polarity.cc/docs');
|