Add MySQL/MongoDB consoles, fit topology without scroll, longer flow lines.
Compact workbench panel, collapsible infra bar, narrower topology nodes with wider inter-stage gaps for visible connection lines.
This commit is contained in:
@@ -36,14 +36,18 @@ function resolveProbeId(nodeId: string) {
|
||||
}
|
||||
|
||||
|
||||
const SQL_NODE_ENGINES: Record<string, 'postgres' | 'trino'> = {
|
||||
const SQL_NODE_ENGINES: Record<string, 'postgres' | 'mysql' | 'mongodb' | 'trino'> = {
|
||||
postgresql: 'postgres',
|
||||
'src-postgres': 'postgres',
|
||||
mysql: 'mysql',
|
||||
'src-mysql': 'mysql',
|
||||
mongodb: 'mongodb',
|
||||
'src-mongo': 'mongodb',
|
||||
trino: 'trino',
|
||||
'query-trino': 'trino',
|
||||
}
|
||||
|
||||
function resolveSqlEngine(nodeId: string): 'postgres' | 'trino' | null {
|
||||
function resolveSqlEngine(nodeId: string): 'postgres' | 'mysql' | 'mongodb' | 'trino' | null {
|
||||
return SQL_NODE_ENGINES[nodeId] || SQL_NODE_ENGINES[resolveProbeId(nodeId)] || null
|
||||
}
|
||||
|
||||
@@ -66,7 +70,7 @@ export function useCommandCenter() {
|
||||
const [nodeBusy, setNodeBusy] = useState(false)
|
||||
const [mainView, setMainView] = useState<'platform' | 'approvals' | 'presentation' | 'dataquality' | 'knowledge' | 'storage' | 'search'>('platform')
|
||||
const [approvalHighlight, setApprovalHighlight] = useState(false)
|
||||
const [workbenchMode, setWorkbenchMode] = useState<'agent' | 'sql-postgres' | 'sql-trino' | null>(null)
|
||||
const [workbenchMode, setWorkbenchMode] = useState<'agent' | 'sql-postgres' | 'sql-mysql' | 'sql-mongodb' | 'sql-trino' | null>(null)
|
||||
const [chatExpanded, setChatExpanded] = useState(false)
|
||||
const promptTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
||||
const [terminalExpanded, setTerminalExpanded] = useState(true)
|
||||
@@ -225,7 +229,7 @@ export function useCommandCenter() {
|
||||
const probeId = resolveProbeId(nodeId)
|
||||
const sqlEng = resolveSqlEngine(nodeId)
|
||||
if (sqlEng) {
|
||||
setWorkbenchMode(sqlEng === 'postgres' ? 'sql-postgres' : 'sql-trino')
|
||||
setWorkbenchMode(`sql-${sqlEng}` as 'sql-postgres' | 'sql-mysql' | 'sql-mongodb' | 'sql-trino')
|
||||
setSelectedAgentId(null)
|
||||
} else if (options?.keepWorkbench) {
|
||||
setWorkbenchMode(options.keepWorkbench)
|
||||
|
||||
Reference in New Issue
Block a user