Feature/multi document selection#545
Open
hrshjswniii wants to merge 7 commits into
Open
Conversation
…resolve schemas conflict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issue
Closes #540
📝 What does this PR do?
This PR implements multi-document selection chat, enabling users to scope their RAG chat sessions to exactly a selected subset of files in their active workspace.
Key Enhancements:
retrieve(),PDFSearchTool,_candidate_graphs,get_entity_context, and agent execution helpers to accept a list ofdocument_idsand verify read authorization checks for each document.retrievefunction tracing decorator signature to accept**kwargsso that capturing parameters likedocument_idsandworkspacedoesn't cause TypeErrors.chat_ws) and SSE (ask_question,ask_question_stream) route handlers to parse, validate readiness/ownership, and save multi-document messages withdocument_id = None.DocumentSidebar.tsxto toggle documents in the selection list.page.tsxto manage and clearselectedDocIdswhen changing workspaces or switching active documents.ChatPanel.tsxto reflect the multi-file scope (e.g. "Chatting with 3 selected files").document_idsinstead ofdocument_idwhen checkboxes are active, and hid the clear/export buttons for multi-document chats to prevent invalid operations.🗂️ Type of Change
🧪 How was this tested?
test_retrieve_with_document_ids_list_and_rbac_checksin [test_retriever.py]test_chat_ask_success_with_document_idsin [test_chat.py]backend\.venv\Scripts\python -m pytest backend/tests)npx tsc --noEmitcompleted with no compilation errors)