Skip to content

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

I didn't get a chance to complete the review of #626 before it got merged, so this is a follow-up with some suggestions. Most are stylistic changes, while the only substantial one is a change to the field validation logic to include more information in the error response.

@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 12:05
@nirinchev nirinchev requested a review from a team as a code owner October 16, 2025 12:05
@nirinchev nirinchev requested a review from kmruiz October 16, 2025 12:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This is a follow-up PR addressing review comments from #626, focusing on code style improvements and enhanced error reporting for vector field validation. The main change improves the validation error messages by including actual vs. expected dimensions and quantization details.

Key Changes

  • Enhanced vector field validation to return detailed error objects instead of simple pass/fail
  • Extracted shared enum definitions for similarity and quantization types to reduce duplication
  • Minor code style improvements (removing redundant async/await, unnecessary returns, and improving variable names)

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/common/search/vectorSearchEmbeddingsManager.ts Refactored validation logic to return detailed error objects; extracted shared enum definitions for reuse
src/tools/mongodb/create/insertMany.ts Updated error message formatting to include actual dimensions/quantization details
src/tools/mongodb/create/createIndex.ts Replaced inline enum definitions with shared enums; added blank line for spacing
src/common/config.ts Updated type definition to use shared Similarity type
src/common/session.ts Improved variable naming and removed redundant return statement
src/tools/mongodb/mongodbTool.ts Removed redundant async/await wrapper
tests/integration/tools/mongodb/create/insertMany.test.ts Updated test expectation to match new detailed error message format
tests/unit/common/search/vectorSearchEmbeddingsManager.test.ts Added assertions for detailed error object structure

@nirinchev nirinchev merged commit 1e6ee10 into main Oct 16, 2025
16 of 18 checks passed
@nirinchev nirinchev deleted the ni/embeddings-manager branch October 16, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants