feat: add all can bundle to provider

This commit is contained in:
Joel
2026-01-23 17:16:53 +08:00
parent 88887ea58e
commit 6551814396
10 changed files with 371 additions and 15 deletions

View File

@ -54,6 +54,7 @@ type AllToolsProps = {
showFeatured?: boolean
onFeaturedInstallSuccess?: () => Promise<void> | void
hideFeaturedTool?: boolean
hideSelectedInfo?: boolean
}
const DEFAULT_TAGS: AllToolsProps['tags'] = []
@ -78,6 +79,7 @@ const AllTools = ({
showFeatured = false,
onFeaturedInstallSuccess,
hideFeaturedTool = false,
hideSelectedInfo = false,
}: AllToolsProps) => {
const { t } = useTranslation()
const language = useGetLanguage()
@ -277,7 +279,7 @@ const AllTools = ({
viewType={isSupportGroupView ? activeView : ViewType.flat}
hasSearchText={hasSearchText}
selectedTools={selectedTools}
hideSelectedInfo={hideFeaturedTool}
hideSelectedInfo={hideSelectedInfo}
/>
</>
)}

View File

@ -53,6 +53,7 @@ type Props = {
selectedTools?: ToolValue[]
preventFocusLoss?: boolean
hideFeaturedTool?: boolean
hideSelectedInfo?: boolean
}
const ToolPicker: FC<Props> = ({
@ -71,6 +72,7 @@ const ToolPicker: FC<Props> = ({
panelClassName,
preventFocusLoss = false,
hideFeaturedTool = false,
hideSelectedInfo = false,
}) => {
const { t } = useTranslation()
const [searchText, setSearchText] = useState('')
@ -220,6 +222,7 @@ const ToolPicker: FC<Props> = ({
featuredLoading={isFeaturedLoading}
showFeatured={scope === 'all' && enable_marketplace}
hideFeaturedTool={hideFeaturedTool}
hideSelectedInfo={hideSelectedInfo}
onFeaturedInstallSuccess={async () => {
invalidateBuiltInTools()
invalidateCustomTools()