code-graph-context 2.5.4 → 2.6.1

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.
@@ -195,7 +195,7 @@ Provide ONLY the JSON response with no additional text, markdown formatting, or
195
195
  this.schemaPath = schemaPath;
196
196
  if (process.env.OPENAI_ASSISTANT_ID) {
197
197
  this.assistantId = process.env.OPENAI_ASSISTANT_ID;
198
- console.log(`Using existing assistant with ID: ${this.assistantId} `);
198
+ console.error(`Using existing assistant with ID: ${this.assistantId}`);
199
199
  return this.assistantId;
200
200
  }
201
201
  const schemaFile = await this.openai.files.create({
@@ -418,7 +418,7 @@ The query will be scoped to project: ${projectId}
418
418
  Remember to include WHERE n.projectId = $projectId for all node patterns.
419
419
  `;
420
420
  // SECURITY: Only log prompt length, not full content which may contain sensitive data
421
- console.log(`NL-to-Cypher: Processing prompt (${prompt.length} chars) for project ${projectId}`);
421
+ console.error(`NL-to-Cypher: Processing prompt (${prompt.length} chars) for project ${projectId}`);
422
422
  const run = await this.openai.beta.threads.createAndRunPoll({
423
423
  assistant_id: this.assistantId,
424
424
  thread: {
@@ -432,7 +432,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
432
432
  });
433
433
  const threadId = run.thread_id;
434
434
  // SECURITY: Log minimal info, avoid exposing full objects that may contain sensitive data
435
- console.log(`NL-to-Cypher: Thread ${threadId}, status: ${run.status}`);
435
+ console.error(`NL-to-Cypher: Thread ${threadId}, status: ${run.status}`);
436
436
  // Validate run completed successfully
437
437
  if (run.status !== 'completed') {
438
438
  // SECURITY: Only log status and error, not full run object which may contain sensitive data
@@ -448,7 +448,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
448
448
  `This may occur if the assistant is still initializing. Try setting OPENAI_ASSISTANT_ID in .env.`);
449
449
  }
450
450
  // SECURITY: Don't log full message content which may contain user data
451
- console.log(`NL-to-Cypher: Received message with ${latestMessage.content?.length ?? 0} content blocks`);
451
+ console.error(`NL-to-Cypher: Received message with ${latestMessage.content?.length ?? 0} content blocks`);
452
452
  if (!latestMessage.content || latestMessage.content.length === 0) {
453
453
  throw new Error(`Message has no content. Run status: ${run.status}. Thread: ${threadId}. ` +
454
454
  `Message role: ${latestMessage.role}`);
@@ -464,7 +464,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
464
464
  `Text content: ${JSON.stringify(textContent)}`);
465
465
  }
466
466
  // SECURITY: Don't log the full text value which may contain sensitive queries
467
- console.log(`NL-to-Cypher: Parsing response (${textValue.length} chars)`);
467
+ console.error(`NL-to-Cypher: Parsing response (${textValue.length} chars)`);
468
468
  // Parse the response with proper error handling
469
469
  let result;
470
470
  try {
@@ -23,8 +23,8 @@ export class ParserFactory {
23
23
  customFrameworkSchemas = [], excludePatterns = EXCLUDE_PATTERNS_REGEX, excludedNodeTypes = [CoreNodeType.PARAMETER_DECLARATION], projectId, lazyLoad = false, } = options;
24
24
  // Select framework schemas based on project type
25
25
  const frameworkSchemas = this.selectFrameworkSchemas(projectType, customFrameworkSchemas);
26
- console.log(`📦 Creating parser for ${projectType} project`);
27
- console.log(`📚 Framework schemas: ${frameworkSchemas.map((s) => s.name).join(', ')}`);
26
+ console.error(`📦 Creating parser for ${projectType} project`);
27
+ console.error(`📚 Framework schemas: ${frameworkSchemas.map((s) => s.name).join(', ')}`);
28
28
  return new TypeScriptParser(workspacePath, tsConfigPath, CORE_TYPESCRIPT_SCHEMA, frameworkSchemas, {
29
29
  excludePatterns,
30
30
  excludedNodeTypes,
@@ -93,7 +93,7 @@ export class ParserFactory {
93
93
  */
94
94
  static async createParserWithAutoDetection(workspacePath, tsConfigPath, projectId, lazyLoad = false) {
95
95
  const projectType = await this.detectProjectType(workspacePath);
96
- console.log(`🔍 Auto-detected project type: ${projectType}`);
96
+ console.error(`🔍 Auto-detected project type: ${projectType}`);
97
97
  return this.createParser({
98
98
  workspacePath,
99
99
  tsConfigPath,