LearnNewsExamplesServices
Frontmatter
id7554
titleConvert queryService to QueryService Neo.mjs Class
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 20, 2025, 12:08 AM
updatedAtOct 20, 2025, 12:13 AM
githubUrlhttps://github.com/neomjs/neo/issues/7554
authortobiu
commentsCount0
parentIssue7536
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 20, 2025, 12:13 AM

Convert queryService to QueryService Neo.mjs Class

tobiu
tobiu commented on Oct 20, 2025, 12:08 AM

This ticket covers refactoring the final service for the knowledge-base server, ai/mcp/server/knowledge-base/services/queryService.mjs, into a singleton QueryService class. This service is responsible for performing semantic search against the knowledge base and includes complex logic for scoring and ranking results.

Acceptance Criteria

  1. The file ai/mcp/server/knowledge-base/services/queryService.mjs is renamed to QueryService.mjs.
  2. The content is replaced with a QueryService class that extends Neo.core.Base and is configured as a singleton.
  3. The existing queryDocuments function is converted into a class method.
  4. The new class uses the ChromaManager service to interact with the database.
  5. The complex scoring and ranking logic is fully preserved and functions identically to the original.
  6. The ai/mcp/server/knowledge-base/services/toolService.mjs is updated to use the new QueryService class and its method.
  7. The query_documents tool continues to function correctly.