Skip to content

Support Multiple Documentation URLs per Chat (Vector + Vectorless) #2

@avishek0769

Description

@avishek0769

Summary

Allow users to add and remove multiple documentation sources in a single chat for both vector and vectorless modes.

Problem

Current chat creation is centered around one docsUrl. While chat-to-source relation exists, the creation and querying flow effectively assumes a single primary source. There is no full user flow to add/remove sources after chat creation.

Expected Solution

Implement multi-source management in chat creation pop-up in dashboard and inside chat page. A chat should be able to attach many ChatSource rows. Reuse existing ChatSource for matching URL + mode when already ingested. Removing a source from a chat must detach it from the chat only, not delete shared source/index data. For one chat source use one qdrant collection (vector) or tree id (vectorless) and reuse across chats/users.

Scope

  • Backend:
    • backend/controllers/chat.controller.js
    • backend/controllers/chatMessage.controller.js
    • backend/routers/chat.route.js
    • backend/prisma/schema.prisma + migration(s)
    • backend/chatWorker.js
  • Frontend:
    • src/pages/Dashboard.tsx (create modal input model)
    • src/pages/ChatPage.tsx (add/remove sources UI)
    • src/lib/api.ts

Acceptance Criteria

  • User can create one chat with multiple docs URLs in one action.
  • User can add/remove docs URLs from an existing chat.
  • Removing a source from chat only detaches relation; shared source data/index is preserved for reuse.
  • Reuse logic works across users for same URL + same approach (vector/vectorless).
  • Collection ownership is normalized so each ChatSource maps to exactly one index identity (Qdrant collection for vector, tree id for vectorless).

Notes

Treat source identity as (normalizedUrl, isVectorLess) to avoid duplicate ingestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfullstackIssues related to both frontend and backendhardThis is issue is hard to solve

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions