Skip to content
TypeScript

fix(web): show context meter in compact composer (#9430)

Guilherme Vieiraf559fe0ba6fb
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index e2d4bda1b1d..8993fbcab89 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -1057,7 +1057,6 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
hasSendableContent: boolean;
preserveComposerFocusOnPointerDown?: boolean;
showSendWhileRunning?: boolean;
- showSecondaryStatus: boolean;
onPreviousPendingQuestion: () => void;
onInterrupt: () => void;
onImplementPlanInNewThread: () => void;
@@ -1067,7 +1066,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
}) {
return (
<>
- {props.showSecondaryStatus && props.activeContextWindow ? (
+ {props.activeContextWindow ? (
<ContextWindowMeter
usage={props.activeContextWindow}
modelDisplayName={props.activeThreadModelDisplayName}
@@ -5323,7 +5322,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
className={cn(
"relative",
isComposerResting && "flex min-w-0 items-center gap-1",
- isComposerResting && (showComposerAttachAction ? "pr-20" : "pr-12"),
+ isComposerResting &&
+ (settings.contextWindowMeterEnabled && activeContextWindow
+ ? "pr-28"
+ : showComposerAttachAction
+ ? "pr-20"
+ : "pr-12"),
)}
>
<ComposerPromptEditor
@@ -5514,7 +5518,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
hasSendableContent={composerSendState.hasSendableContent}
preserveComposerFocusOnPointerDown={isMobileViewport || isComposerResting}
showSendWhileRunning={isMobileViewport}
- showSecondaryStatus={!isComposerResting}
onPreviousPendingQuestion={onPreviousActivePendingUserInputQuestion}
onInterrupt={handleInterruptPrimaryAction}
onImplementPlanInNewThread={handleImplementPlanInNewThreadPrimaryAction}