@ngao/search 1.0.0-alpha.6 → 1.0.0-alpha.7

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.
@@ -34543,7 +34543,8 @@ async function setupMCP() {
34543
34543
  const homeDir = process.env.HOME || process.env.USERPROFILE || '.';
34544
34544
  const claudeConfigPath = path.join(homeDir, '.claude');
34545
34545
  const claudeDesktopConfig = path.join(claudeConfigPath, 'claude_desktop_config.json');
34546
- const claudeCodeConfig = path.join(homeDir, '.claude-code', 'config.json');
34546
+ // Claude Code extension uses VS Code settings in the workspace
34547
+ const vscodeSettingsPath = path.join(homeDir, '.vscode', 'settings.json');
34547
34548
  // Check if already set up
34548
34549
  let isAlreadySetup = false;
34549
34550
  if (fs.existsSync(claudeDesktopConfig)) {
@@ -34552,12 +34553,6 @@ async function setupMCP() {
34552
34553
  isAlreadySetup = true;
34553
34554
  }
34554
34555
  }
34555
- if (!isAlreadySetup && fs.existsSync(claudeCodeConfig)) {
34556
- const existingConfig = JSON.parse(fs.readFileSync(claudeCodeConfig, 'utf8'));
34557
- if (existingConfig.mcpServers?.['ngao-search']) {
34558
- isAlreadySetup = true;
34559
- }
34560
- }
34561
34556
  if (isAlreadySetup) {
34562
34557
  console.log('✅ NGAO Search is already configured in Claude!');
34563
34558
  const projectDir = process.env.NGAO_SEARCH_PROJECT || process.cwd();
@@ -34593,19 +34588,20 @@ async function setupMCP() {
34593
34588
  claudeDesktopData.mcpServers['ngao-search'] = ngaoServerConfig;
34594
34589
  fs.writeFileSync(claudeDesktopConfig, JSON.stringify(claudeDesktopData, null, 2));
34595
34590
  console.log(`\n✅ Claude Desktop config updated: ${claudeDesktopConfig}`);
34596
- // Setup Claude Code (VSCode extension)
34597
- const claudeCodePath = path.dirname(claudeCodeConfig);
34598
- if (!fs.existsSync(claudeCodePath)) {
34599
- fs.mkdirSync(claudeCodePath, { recursive: true });
34600
- }
34601
- let claudeCodeData = { mcpServers: {} };
34602
- if (fs.existsSync(claudeCodeConfig)) {
34603
- claudeCodeData = JSON.parse(fs.readFileSync(claudeCodeConfig, 'utf8'));
34604
- }
34605
- claudeCodeData.mcpServers = claudeCodeData.mcpServers || {};
34606
- claudeCodeData.mcpServers['ngao-search'] = ngaoServerConfig;
34607
- fs.writeFileSync(claudeCodeConfig, JSON.stringify(claudeCodeData, null, 2));
34608
- console.log(`✅ Claude Code config updated: ${claudeCodeConfig}`);
34591
+ // Setup for Claude Code (VS Code extension) - adds to workspace settings
34592
+ const vscodeSettingsDir = path.dirname(vscodeSettingsPath);
34593
+ if (!fs.existsSync(vscodeSettingsDir)) {
34594
+ fs.mkdirSync(vscodeSettingsDir, { recursive: true });
34595
+ }
34596
+ let vscodeSettings = {};
34597
+ if (fs.existsSync(vscodeSettingsPath)) {
34598
+ vscodeSettings = JSON.parse(fs.readFileSync(vscodeSettingsPath, 'utf8'));
34599
+ }
34600
+ vscodeSettings['claude.mcp'] = vscodeSettings['claude.mcp'] || {};
34601
+ vscodeSettings['claude.mcp'].servers = vscodeSettings['claude.mcp'].servers || {};
34602
+ vscodeSettings['claude.mcp'].servers['ngao-search'] = ngaoServerConfig;
34603
+ fs.writeFileSync(vscodeSettingsPath, JSON.stringify(vscodeSettings, null, 2));
34604
+ console.log(`✅ Claude Code (VSCode) config updated: ${vscodeSettingsPath}`);
34609
34605
  // Create .ngao-search config in project
34610
34606
  const projectConfigPath = path.join(resolvedProjectDir, '.ngao-search.json');
34611
34607
  if (!fs.existsSync(projectConfigPath)) {
@@ -34627,7 +34623,7 @@ async function setupMCP() {
34627
34623
  console.log('📍 Project directory: ' + resolvedProjectDir);
34628
34624
  console.log('🔌 Server port: ' + port);
34629
34625
  console.log('📌 Claude Desktop config: ' + claudeDesktopConfig);
34630
- console.log('📌 Claude Code config: ' + claudeCodeConfig);
34626
+ console.log('📌 Claude Code config: ' + vscodeSettingsPath);
34631
34627
  console.log('📌 Project config: ' + projectConfigPath + '\n');
34632
34628
  console.log('🚀 Next: Restart Claude Desktop and Claude Code to start using NGAO Search!\n');
34633
34629
  rl.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngao/search",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.7",
4
4
  "description": "NGAO Search - Model Context Protocol Server for Local Code/Document Search with LLM-Friendly Output",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/index.d.ts",