Conversation
…nd search in home
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a global, bin‑independent chat feature with SSE streaming and RAG search; implements thumbnail generation for images/PDFs and surfaces thumbnails in APIs and UI; expands trash cleanup with permanent deletion and failure tracking; and introduces multiple frontend UI components, hooks, and stores to support search, document preview, and chat. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router as GlobalChatRouter
participant Controller as GlobalChatController
participant Service as GlobalChatService
participant Vector as VectorStoreService
participant Docs as DocumentsRepository
participant Repo as GlobalChatRepository
participant LLM as LLM
Client->>Router: POST /api/global-chat/conversations/:id/messages (stream=true, message, documentIds?)
Router->>Controller: forward request (requireAuth)
Controller->>Service: sendMessageWithStreaming(conversationId, userId, message, res, documentIds)
Service->>Repo: addMessage(user message)
Service->>Docs: fetch user documents (for vector scope)
Service->>Vector: searchSimilarForUser(query, userId, limit, filterDocumentIds)
Vector->>Docs: enrich results with filename/fileType
Vector-->>Service: returns search hits (sources)
Service->>LLM: construct prompt + context, request streaming generation
LLM-->>Service: stream tokens (delta events)
Service->>Client: SSE events (status -> delta* -> done with messageId + sources)
Service->>Repo: persist assistant message with metadata (sources, modelUsed)
Service-->>Controller: finalize response
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.