File tree Expand file tree Collapse file tree
apps/web/src/components/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { usesChatGptSharing } from "@t3tools/shared/usageLimits" ;
22import type { ServerProvider } from "@t3tools/contracts" ;
3+ import { useId } from "react" ;
34import { OpenAI } from "../Icons" ;
45import { ChatGptUsageButton } from "../settings/ChatGptUsageButton" ;
56import { Tooltip , TooltipPopup , TooltipTrigger } from "../ui/tooltip" ;
67
8+ const speedNotice =
9+ "Fast and Ultrafast are unavailable with this ChatGPT connection. Use an existing Codex CLI login for speed options your account supports." ;
10+
711export function ChatGptSharingControl ( { provider } : { provider : ServerProvider | null } ) {
12+ const speedNoticeId = useId ( ) ;
813 if ( ! usesChatGptSharing ( provider ) ) return null ;
914 return (
1015 < div className = "flex items-center justify-between gap-4 border-t px-3 py-2" >
1116 < Tooltip >
1217 < TooltipTrigger
1318 render = {
1419 < span
20+ aria-describedby = { speedNoticeId }
1521 tabIndex = { 0 }
1622 className = "flex items-center gap-2 rounded-sm text-xs text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
1723 />
@@ -20,10 +26,10 @@ export function ChatGptSharingControl({ provider }: { provider: ServerProvider |
2026 < OpenAI className = "size-3.5" aria-hidden = "true" />
2127 Using ChatGPT plan
2228 </ TooltipTrigger >
23- < TooltipPopup side = "top ">
24- Fast and Ultrafast are unavailable with this ChatGPT connection. Use an existing Codex CLI
25- login for speed options your account supports.
26- </ TooltipPopup >
29+ < span id = { speedNoticeId } className = "sr-only ">
30+ { speedNotice }
31+ </ span >
32+ < TooltipPopup side = "top" > { speedNotice } < /TooltipPopup >
2733 </ Tooltip >
2834 < ChatGptUsageButton size = "xs" />
2935 </ div >
You can’t perform that action at this time.
0 commit comments