Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/mobile/src/components/AppSymbol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import IconDotsVertical from "@tabler/icons-react-native/IconDotsVertical";
import IconDotsCircleHorizontal from "@tabler/icons-react-native/IconDotsCircleHorizontal";
import IconEdit from "@tabler/icons-react-native/IconEdit";
import IconExternalLink from "@tabler/icons-react-native/IconExternalLink";
import IconEyeOff from "@tabler/icons-react-native/IconEyeOff";
import IconEye from "@tabler/icons-react-native/IconEye";
import IconFileText from "@tabler/icons-react-native/IconFileText";
import IconFilter from "@tabler/icons-react-native/IconFilter";
Expand Down Expand Up @@ -177,6 +178,7 @@ const ANDROID_ICON_BY_SF_SYMBOL = {
"exclamationmark.triangle": IconAlertTriangle,
"exclamationmark.circle": IconAlertCircle,
eye: IconEye,
"eye.slash": IconEyeOff,
folder: IconFolder,
"folder.badge.plus": IconFolderPlus,
"folder.fill": IconFolder,
Expand Down
2 changes: 2 additions & 0 deletions apps/mobile/src/features/threads/ThreadComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
ownerId: settingsOwnerId,
environmentId: props.environmentId,
providerInstanceId: currentModelSelection.instanceId,
...(lockedProviderInstanceId ? { lockedProviderInstanceId } : {}),
providerGroups: threadProviderGroups,
selectedModel: currentModelSelection,
reportedModelSelection: props.reportedModelSelection,
Expand All @@ -700,6 +701,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
props.onUpdateRuntimeMode,
providerOptionDescriptors,
settingsOwnerId,
lockedProviderInstanceId,
threadProviderGroups,
],
);
Expand Down
26 changes: 24 additions & 2 deletions apps/mobile/src/features/threads/ThreadSettingsRows.shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export type ModelRowProps = {
readonly isFavorite: boolean;
readonly favoritesLoaded: boolean;
readonly onToggleFavorite: () => void;
readonly onToggleHidden?: () => void;
readonly hiddenUpdatePending?: boolean;
readonly isFirst: boolean;
readonly isLast: boolean;
};
Expand Down Expand Up @@ -52,10 +54,10 @@ export function ModelRowContent(
accessibilityRole="radio"
accessibilityState={{
checked: props.selected,
disabled: props.option.isUnavailable === true,
disabled: props.option.isUnavailable === true || props.option.isHidden === true,
}}
className="min-h-11 min-w-0 flex-1 flex-row items-center gap-2 active:opacity-70"
disabled={props.option.isUnavailable}
disabled={props.option.isUnavailable || props.option.isHidden}
onPress={props.onPress}
>
{props.leadingSelection}
Expand All @@ -77,6 +79,9 @@ export function ModelRowContent(
<Text className="text-3xs font-t3-bold text-foreground-muted">Legacy</Text>
</View>
) : null}
{props.option.isHidden ? (
<Text className="text-xs text-foreground-muted">Hidden</Text>
) : null}
{props.option.isUnavailable ? (
<Text className="text-xs text-foreground">Unavailable</Text>
) : null}
Expand All @@ -92,6 +97,23 @@ export function ModelRowContent(
</View>
{props.trailingSelection}
</Pressable>
{props.onToggleHidden ? (
<Pressable
accessibilityLabel={`${props.option.isHidden ? "Show" : "Hide"} model: ${props.option.providerLabel}, ${props.option.label}`}
accessibilityRole="button"
accessibilityState={{ disabled: props.hiddenUpdatePending === true }}
className="min-h-11 min-w-11 items-center justify-center"
disabled={props.hiddenUpdatePending}
onPress={props.onToggleHidden}
>
<SymbolView
name={props.option.isHidden ? "eye.slash" : "eye"}
size={18}
tintColorClassName={props.option.isHidden ? "accent-icon-subtle" : "accent-icon"}
type="monochrome"
/>
</Pressable>
) : null}
<Pressable
accessibilityLabel={`${props.isFavorite ? "Remove from" : "Add to"} favorites: ${
props.option.providerLabel
Expand Down
Loading
Loading