mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-23 17:05:28 +08:00
fix(ci): align SDK dependency and validate acceptance migrations
This commit is contained in:
@@ -68,7 +68,11 @@ export default function LoadErrorState({
|
||||
>
|
||||
<RefreshCw
|
||||
aria-hidden="true"
|
||||
className={cn('size-3.5', (retrying || busy) && 'animate-spin motion-reduce:animate-none')}
|
||||
className={cn(
|
||||
'size-3.5',
|
||||
(retrying || busy) &&
|
||||
'animate-spin motion-reduce:animate-none',
|
||||
)}
|
||||
/>
|
||||
{retrying || busy ? t('common.loading') : t('common.retry')}
|
||||
</Button>
|
||||
|
||||
@@ -38,20 +38,38 @@ function Badge({
|
||||
return (
|
||||
<Comp
|
||||
data-slot="badge"
|
||||
className={cn(badgeVariants({ variant: status ? 'outline' : variant }), status && statusBadgeClass(status), className)}
|
||||
className={cn(
|
||||
badgeVariants({ variant: status ? 'outline' : variant }),
|
||||
status && statusBadgeClass(status),
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function statusBadgeClass(status: string): string {
|
||||
if (['completed', 'success', 'succeeded', 'delivered', 'ready', 'enabled', 'connected'].includes(status))
|
||||
if (
|
||||
[
|
||||
'completed',
|
||||
'success',
|
||||
'succeeded',
|
||||
'delivered',
|
||||
'ready',
|
||||
'enabled',
|
||||
'connected',
|
||||
].includes(status)
|
||||
)
|
||||
return 'border-emerald-500/25 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300';
|
||||
if (['failed', 'error', 'timeout', 'disconnected'].includes(status))
|
||||
return 'border-red-500/25 bg-red-500/10 text-red-700 dark:text-red-300';
|
||||
if (['running', 'active', 'connecting'].includes(status))
|
||||
return 'border-blue-500/25 bg-blue-500/10 text-blue-700 dark:text-blue-300';
|
||||
if (['queued', 'pending', 'created', 'claimed', 'waiting', 'warning'].includes(status))
|
||||
if (
|
||||
['queued', 'pending', 'created', 'claimed', 'waiting', 'warning'].includes(
|
||||
status,
|
||||
)
|
||||
)
|
||||
return 'border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-300';
|
||||
if (['mock', 'simulated', 'debug'].includes(status))
|
||||
return 'border-violet-500/25 bg-violet-500/10 text-violet-700 dark:text-violet-300';
|
||||
|
||||
Reference in New Issue
Block a user