mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
discover_resources initialised its selection to the entire tenant inventory and only replaced it when the model returned a non-empty pick, so three paths -- no model, a model that picked nothing, a failed call -- recommended everything. On a workspace with 57 resources that is not merely noisy: the client pre-checks every recommendation and submits them all by default, and bind_resources then appends all 57 labels to the last plan item, which is the text fed to the graph generator. Recommending nothing is the honest answer when there is no signal. The card is still emitted so the confirm gate keeps its active interaction and a later pass cannot inherit a stale one, and a notice says why rather than leaving a blank card. The conflict-policy control no longer renders over an empty list. The test that should have caught this used a one-resource catalog, where "all" and "none" are indistinguishable; it now uses 57. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>