UNPKG

@fusedashlabs/ui9000-workspace

Version:

UI9000 workspace MCP. One tool, show_workspace, draws a chart from your table. Set TYPESAFE_API_KEY to let Jev choose the chart.

45 lines (44 loc) • 1.7 kB
const CHART_TYPE_BY_COMPONENT = { 'band-utilization-chart': 'bandUtilizationChart', 'bar-chart': 'barChart', 'histogram-chart': 'histogramChart', 'map-chart': 'mapChart', 'kpi-widget': 'KPI', 'status-gauge-widget': 'statusGaugeWidget', 'loss-indicator': 'lossIndicator', 'power-path-card': 'powerPathCard', 'component-asset-card': 'componentAssetCard', 'incidents-review-card': 'incidentsReviewCard', 'asset-health-overview': 'assetHealthOverview', 'goal-burst': 'goalBurst', 'network-graph': 'networkGraphChart', 'goals-perimeter': 'goalsPerimeter', 'goals-dependency-graph': 'goalsDependencyGraph', 'bipartite-graph': 'bipartiteGraph', 'goals-insights': 'goalsInsights', 'reasoning-orchestration-graph': 'reasoningOrchestrationGraph', table: 'customWidget', text: 'customWidget', image: 'customWidget', 'event-timeline': 'customWidget', 'evidence-panel': 'customWidget', 'entity-detail': 'customWidget', 'text-input': 'customWidget', 'number-input': 'customWidget', select: 'customWidget', 'multi-select': 'customWidget', checkbox: 'customWidget', 'date-input': 'customWidget', button: 'customWidget', form: 'customWidget', 'approval-bar': 'customWidget', }; export function catalogChartTypeKey(chartTypeKeys) { return chartTypeKeys?.find((key) => key.trim().length > 0 && key !== '*'); } /** Always a FuseDash chartType so the MCP App View never receives a blank type. */ export function chartTypeForComponent(component, chartTypeKeys) { return (catalogChartTypeKey(chartTypeKeys) ?? CHART_TYPE_BY_COMPONENT[component] ?? 'customWidget'); }