mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-25 10:26:59 +08:00
Close #14018 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ### Problem In Agent applications, even with the cite option enabled, only inline [ID: x] citation markers are visible (showing chunk content on hover). The Agent does not display the referenced file cards below the response, unlike Chat applications. ### Root Cause The Agent's Retrieval tool (agent/tools/retrieval.py) calls retriever.retrieval() with aggs=False, which means the retrieval results do not include doc_aggs (document aggregation) data. Without doc_aggs, the frontend ReferenceDocumentList component has no data to render the file cards. In contrast, the Chat application (api/db/services/dialog_service.py) calls the same retriever.retrieval() method with aggs=True. ### Fix Changed aggs=False to aggs=True in agent/tools/retrieval.py so that document aggregation data is returned along with the retrieved chunks.