fix(web): show composer status for Cursor (#1250)

This commit is contained in:
SSU-WEI HUANG
2026-07-31 18:16:52 +01:00
committed by GitHub
parent 0d2d029c81
commit 259d69cd8f
3 changed files with 19 additions and 38 deletions
@@ -33,7 +33,7 @@ import { useComposerDraft } from '@/hooks/useComposerDraft'
import { useComposerEnterBehavior } from '@/hooks/useComposerEnterBehavior'
import { FloatingOverlay } from '@/components/ChatInput/FloatingOverlay'
import { Autocomplete } from '@/components/ChatInput/Autocomplete'
import { shouldShowComposerStatusBar, StatusBar } from '@/components/AssistantChat/StatusBar'
import { StatusBar } from '@/components/AssistantChat/StatusBar'
import { ComposerButtons } from '@/components/AssistantChat/ComposerButtons'
import type { PendingSchedule } from '@/components/AssistantChat/ScheduleTimePicker'
import { AttachmentItem } from '@/components/AssistantChat/AttachmentItem'
@@ -1322,7 +1322,6 @@ export function HappyComposer(props: {
<ComposerPrimitive.Root className="relative" onSubmit={handleSubmit}>
{overlays}
{shouldShowComposerStatusBar(agentFlavor) ? (
<StatusBar
active={active}
thinking={thinking}
@@ -1340,7 +1339,6 @@ export function HappyComposer(props: {
agentFlavor={agentFlavor}
voiceStatus={voiceStatus}
/>
) : null}
{sendError ? (
<div
@@ -1,17 +1,5 @@
import { describe, expect, it } from 'vitest'
import { shouldShowCodexFastBadge, shouldShowComposerStatusBar } from './StatusBar'
describe('shouldShowComposerStatusBar', () => {
it('hides the composer status bar for Cursor sessions', () => {
expect(shouldShowComposerStatusBar('cursor')).toBe(false)
})
it('shows the composer status bar for other agents', () => {
expect(shouldShowComposerStatusBar('claude')).toBe(true)
expect(shouldShowComposerStatusBar('codex')).toBe(true)
expect(shouldShowComposerStatusBar(null)).toBe(true)
})
})
import { shouldShowCodexFastBadge } from './StatusBar'
describe('shouldShowCodexFastBadge', () => {
it('uses only the effective service tier', () => {
@@ -132,11 +132,6 @@ export function shouldShowCodexFastBadge(
return agentFlavor === 'codex' && isFastServiceTier(serviceTier)
}
/** Cursor native ACP does not emit usage_update; hide the bar to avoid empty/misleading UI. */
export function shouldShowComposerStatusBar(agentFlavor: string | null | undefined): boolean {
return agentFlavor !== 'cursor'
}
export function StatusBar(props: {
active: boolean
thinking: boolean