()
| 7 | import { FontAwesome5 as FontAwesome } from '@expo/vector-icons' |
| 8 | import { Theme } from '../../types' |
| 9 | |
| 10 | export function Header() { |
| 11 | const { theme } = useContext(ThemeContext) |
| 12 | const { |
| 13 | handlePresentModalPress, |
| 14 | chatType |
| 15 | } = useContext(AppContext) |
| 16 | const styles = getStyles(theme) |
| 17 | const ModelIcon = chatType.icon |
| 18 | |
| 19 | return ( |
| 20 | <View style={styles.container}> |
| 21 | <Icon size={34} fill={theme.textColor} /> |
| 22 | <TouchableOpacity |
| 23 | style={styles.modelPill} |
| 24 | onPress={handlePresentModalPress} |
| 25 | accessibilityRole="button" |
| 26 | accessibilityLabel={`Current model: ${chatType.name}. Tap to change model.`} |
| 27 | > |
| 28 | <ModelIcon size={14} theme={theme} /> |
| 29 | <Text style={styles.modelPillText} numberOfLines={1}> |
| 30 | {chatType.name} |
| 31 | </Text> |
| 32 | </TouchableOpacity> |
| 33 | <TouchableHighlight |
| 34 | style={styles.buttonContainer} |
| 35 | underlayColor={'transparent'} |
| 36 | activeOpacity={0.6} |
nothing calls this directly
no test coverage detected