Skip to content

Commit d13137d

Browse files
committed
fix(mobile): preserve model names in one-row composers
1 parent 21ed17a commit d13137d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎apps/mobile/src/components/ComposerModelControl.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export function ComposerModelControl(props: {
1818
readonly surfaceColor: string;
1919
readonly disabled?: boolean;
2020
readonly iconOnly?: boolean;
21+
readonly showSummary?: boolean;
2122
readonly onPress: () => void;
2223
}) {
2324
const descriptors = resolveProviderOptionDescriptors({
@@ -71,7 +72,7 @@ export function ComposerModelControl(props: {
7172
label={label}
7273
iconOnly={props.iconOnly}
7374
suffix={
74-
summary ? (
75+
props.showSummary !== false && summary ? (
7576
<Text className="text-xs text-foreground-muted" numberOfLines={1}>
7677
{summary}
7778
</Text>

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
758758
) : null;
759759

760760
// The row and the card's toolbar share this picker. It shrinks to the provider
761-
// icon once the draft has text, so the draft keeps the width.
761+
// icon in the row once the draft has text, so the draft keeps the width.
762762
const modelControl = (
763763
<View className="min-w-0 shrink">
764764
<ComposerModelControl
@@ -768,7 +768,8 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
768768
reportedSelection={props.reportedModelSelection}
769769
prompt={draftMessage}
770770
surfaceColor={composerPanel}
771-
iconOnly={draftMessage.length > 0}
771+
iconOnly={!usesCard && draftMessage.length > 0}
772+
showSummary={usesCard}
772773
onPress={openSettings}
773774
/>
774775
</View>

0 commit comments

Comments
 (0)