TypeScript
fix(web): show the platform modifier in the send tooltip (#22436)
Utkarsh Patil9b052a2d5bac
diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsxindex 09d8a7b6c5c..965c95d481e 100644--- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx+++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx@@ -4,7 +4,7 @@ import { CornerUpRight, ListPlus } from "lucide";import { MorphIcon } from "~/components/MorphIcon";import { useEnvironmentIdentificationMode } from "~/hooks/useSettings";import { formatContextWindowTokens } from "~/lib/contextWindow";-import { cn } from "~/lib/utils";+import { cn, isMacPlatform } from "~/lib/utils";import { useShortcutModifierState } from "../../shortcutModifierState";import { StageBackdropButtonArt, useSidebarStageBackdropVariant } from "../SidebarStageBackdrop";import { Button } from "../ui/button";@@ -297,7 +297,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({(compactsBeforeSend? `Summarize ${compactTokens} tokens of history, then send`: isRunning && !isEditingQueuedMessage && canSteer- ? `Click to ${followUpBehavior}, Ctrl/⌘-click${alternateShortcutLabel ? ` or ${alternateShortcutLabel}` : ""} to ${alternateAction}`+ ? `Click to ${followUpBehavior}, ${isMacPlatform(navigator.platform) ? "⌘" : "Ctrl"}-click${alternateShortcutLabel ? ` or ${alternateShortcutLabel}` : ""} to ${alternateAction}`: submitLabel);const sendButton = (