Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
import type { SimpleSubscription } from './types'
import type { PluginDetail } from '@/app/components/plugins/types'
import { withErrorBoundary } from '@/app/components/base/error-boundary'
import { LoadingPlaceholder } from '@/app/components/base/loading-placeholder'
import { SubscriptionListView } from './list-view'
import { SubscriptionSelectorView } from './selector-view'
import { SubscriptionListMode } from './types'
import { useSubscriptionList } from './use-subscription-list'
type SubscriptionListProps = {
mode?: SubscriptionListMode
selectedId?: string
onSelect?: (v: SimpleSubscription, callback?: () => void) => void
pluginDetail?: PluginDetail
}
export type { SimpleSubscription } from './types'
export const SubscriptionList = withErrorBoundary(
({
mode = SubscriptionListMode.PANEL,
selectedId,
onSelect,
pluginDetail,
}: SubscriptionListProps) => {
const { isLoading, refetch } = useSubscriptionList()
if (isLoading) {
return (
<div className="flex items-center justify-center py-4">
<LoadingPlaceholder />
</div>
)
}
if (mode === SubscriptionListMode.SELECTOR) {
return (
<SubscriptionSelectorView
selectedId={selectedId}
onSelect={(v) => {
onSelect?.(v, refetch)
}}
/>
)
}
return <SubscriptionListView pluginDetail={pluginDetail} />
},
)