dify/web/app/components/workflow/utils/plugin.ts

5 lines
164 B
TypeScript

export function extractPluginId(provider: string): string {
const parts = provider.split('/')
return parts.length >= 2 ? `${parts[0]}/${parts[1]}` : provider
}