Skip to content

Commit f559fe0

Browse files
fix(web): show context meter in compact composer (pingdotgg#9430)
1 parent 39abb9d commit f559fe0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,6 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
10571057
hasSendableContent: boolean;
10581058
preserveComposerFocusOnPointerDown?: boolean;
10591059
showSendWhileRunning?: boolean;
1060-
showSecondaryStatus: boolean;
10611060
onPreviousPendingQuestion: () => void;
10621061
onInterrupt: () => void;
10631062
onImplementPlanInNewThread: () => void;
@@ -1067,7 +1066,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
10671066
}) {
10681067
return (
10691068
<>
1070-
{props.showSecondaryStatus && props.activeContextWindow ? (
1069+
{props.activeContextWindow ? (
10711070
<ContextWindowMeter
10721071
usage={props.activeContextWindow}
10731072
modelDisplayName={props.activeThreadModelDisplayName}
@@ -5323,7 +5322,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
53235322
className={cn(
53245323
"relative",
53255324
isComposerResting && "flex min-w-0 items-center gap-1",
5326-
isComposerResting && (showComposerAttachAction ? "pr-20" : "pr-12"),
5325+
isComposerResting &&
5326+
(settings.contextWindowMeterEnabled && activeContextWindow
5327+
? "pr-28"
5328+
: showComposerAttachAction
5329+
? "pr-20"
5330+
: "pr-12"),
53275331
)}
53285332
>
53295333
<ComposerPromptEditor
@@ -5514,7 +5518,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
55145518
hasSendableContent={composerSendState.hasSendableContent}
55155519
preserveComposerFocusOnPointerDown={isMobileViewport || isComposerResting}
55165520
showSendWhileRunning={isMobileViewport}
5517-
showSecondaryStatus={!isComposerResting}
55185521
onPreviousPendingQuestion={onPreviousActivePendingUserInputQuestion}
55195522
onInterrupt={handleInterruptPrimaryAction}
55205523
onImplementPlanInNewThread={handleImplementPlanInNewThreadPrimaryAction}

0 commit comments

Comments
 (0)