Skip to content

The agent that grows with you

desktop: sort gateway-health-pill import for perfectionist lint

Cursor Agentaa43debbe03e
diff --git a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
index b31ae0c9686..e4502370123 100644
--- a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
+++ b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
@@ -17,6 +17,7 @@ import { Codicon } from '@/components/ui/codicon'
import { GlyphSpinner } from '@/components/ui/glyph-spinner'
import { useI18n } from '@/i18n'
import { displayPath, pathLeaf } from '@/lib/display-path'
+import { statusBarGatewayHealth } from '@/lib/gateway-health-pill'
import {
Activity,
AlertCircle,
@@ -366,6 +367,7 @@ export function useStatusbarItems({
const gatewayOpen = gatewayState === 'open'
const gatewayConnecting = gatewayState === 'connecting'
+
const gatewayHealth = statusBarGatewayHealth({
connectionState: gatewayState,
copy: {
@@ -386,6 +388,7 @@ export function useStatusbarItems({
platforms: statusSnapshot?.gateway_platforms,
restarting: gatewayRestarting
})
+
const inferenceReady = gatewayOpen && inferenceStatus?.ready === true && !gatewayHealth.degraded
const gatewayDegraded = gatewayOpen || gatewayConnecting || gatewayHealth.degraded
diff --git a/apps/desktop/src/lib/gateway-health-pill.ts b/apps/desktop/src/lib/gateway-health-pill.ts
index c753fce1fe5..fa21c77a847 100644
--- a/apps/desktop/src/lib/gateway-health-pill.ts
+++ b/apps/desktop/src/lib/gateway-health-pill.ts
@@ -97,6 +97,7 @@ export function statusBarGatewayHealth({
const connectionOpen = connectionState === 'open'
const connectionConnecting = connectionState === 'connecting'
const downNames = unhealthyPlatformNames(platforms)
+
const messagingDown =
messagingWasConfigured(messagingState, platforms) && (messagingRunning === false || downNames.length > 0)