Files
gsfdc/demo-dify/dify/web/app/components/plugins/plugin-detail-panel/tool-selector
wuzilongandCursor 6519682885 chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 13:59:25 +08:00
..

Tool Selector

index.tsx is the public single-tool selector. It owns the configured or unconfigured trigger, Popover lifecycle, tool form, authorization, settings, and deletion action wiring.

The built-in trigger branch accepts triggerRef, which always resolves to its final native button. Callers that provide a custom trigger own that element and its ref directly. The two trigger modes are mutually exclusive in the component type contract.

Deletion only reports intent through onDelete. This module does not infer sibling order or choose a post-delete focus target; a list composition owner must coordinate that behavior.

The Popover owns the selector surface. Nested reasoning and schema configuration use feature-owned forms and Dify UI Dialog rather than introducing another overlay wrapper. Plugin authorization, provider data, and MCP availability remain owned by their source features and queries.