From 5724e7ab76ce707774b76c927800545f9dd49e4e Mon Sep 17 00:00:00 2001 From: Sergei Date: Sat, 24 Jan 2026 20:44:49 -0800 Subject: [PATCH] feat: Add erase button to clear chat messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add trash icon button in chat header that clears all messages after confirmation. Resets chat to initial welcome message. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/(tabs)/chat.tsx | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/app/(tabs)/chat.tsx b/app/(tabs)/chat.tsx index 1bccbea..cca8acb 100644 --- a/app/(tabs)/chat.tsx +++ b/app/(tabs)/chat.tsx @@ -732,7 +732,7 @@ export default function ChatScreen() { {isVoice && ( - + 🎤 )} @@ -764,7 +764,34 @@ export default function ChatScreen() { - + { + Alert.alert( + 'Clear Chat', + 'Are you sure you want to clear all messages?', + [ + { text: 'Cancel', style: 'cancel' }, + { + text: 'Clear', + style: 'destructive', + onPress: () => { + setMessages([ + { + id: '1', + role: 'assistant', + content: 'Hello! I\'m Julia, your AI wellness assistant. You can type a message or tap the phone button to start a voice call.', + timestamp: new Date(), + }, + ]); + }, + }, + ] + ); + }} + > + + {/* Beneficiary Picker Modal */} @@ -972,12 +999,7 @@ const styles = StyleSheet.create({ fontSize: FontSizes.sm, color: AppColors.success, }, - headerButtons: { - flexDirection: 'row', - alignItems: 'center', - gap: Spacing.sm, - }, - headerButton: { + eraseButton: { padding: Spacing.xs, }, chatContainer: { @@ -1175,6 +1197,9 @@ const styles = StyleSheet.create({ top: 6, right: 6, }, + voiceIndicatorEmoji: { + fontSize: 10, + }, // System message styles systemMessageContainer: { flexDirection: 'row',