LearnNewsExamplesServices
Frontmatter
id7552
titleConvert documentService to DocumentService Neo.mjs Class
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 19, 2025, 11:48 PM
updatedAtOct 19, 2025, 11:53 PM
githubUrlhttps://github.com/neomjs/neo/issues/7552
authortobiu
commentsCount0
parentIssue7536
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 19, 2025, 11:53 PM

Convert documentService to DocumentService Neo.mjs Class

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 19, 2025, 11:48 PM

This ticket covers refactoring ai/mcp/server/knowledge-base/services/documentService.mjs into a singleton class that extends Neo.core.Base. The file will be renamed to DocumentService.mjs to follow project conventions. This service is responsible for listing and retrieving individual documents from the knowledge base.

Acceptance Criteria

  1. The file ai/mcp/server/knowledge-base/services/documentService.mjs is renamed to DocumentService.mjs.
  2. The content is replaced with a DocumentService class that extends Neo.core.Base and is configured as a singleton.
  3. Existing functions (listDocuments, getDocumentById) are converted into class methods.
  4. The new class uses the ChromaManager service to interact with the database.
  5. The ai/mcp/server/knowledge-base/services/toolService.mjs is updated to import the DocumentService class and map its methods.
  6. All related tools (list_documents, get_document_by_id) continue to function correctly after the refactoring.
tobiu assigned to @tobiu on Oct 19, 2025, 11:48 PM
tobiu added the enhancement label on Oct 19, 2025, 11:48 PM
tobiu added the ai label on Oct 19, 2025, 11:48 PM
tobiu added parent issue #7536 on Oct 19, 2025, 11:48 PM
tobiu referenced in commit c67da5b - "Convert documentService to DocumentService Neo.mjs Class #7552" on Oct 19, 2025, 11:51 PM
tobiu closed this issue on Oct 19, 2025, 11:53 PM