Skip to content

Commit 60ffe07

Browse files
authored
fix: the input and history display issue for mac (#79)
1 parent 9e2f0ee commit 60ffe07

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

react-native/src/chat/ChatScreen.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@ function ChatScreen(): React.JSX.Element {
869869
});
870870
if (isNewChatRef.current) {
871871
saveCurrentMessages();
872+
sendEventRef.current('updateHistory');
872873
}
873874
}
874875

@@ -1380,6 +1381,7 @@ function ChatScreen(): React.JSX.Element {
13801381
systemPrompt={systemPrompt}
13811382
/>
13821383
)}
1384+
disabled={isMac && chatStatus === ChatStatus.Running}
13831385
maxComposerHeight={isMac ? 360 : 200}
13841386
inputToolbarContainerStyle={styles.inputToolbarContainer}
13851387
inputToolbarPrimaryStyle={styles.inputToolbarPrimary}

react-native/src/chat/component/InputArea.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ export const InputArea = forwardRef<InputAreaRef, InputAreaProps>(
126126
multiline
127127
value={text}
128128
onChangeText={handleTextChange}
129-
submitBehavior={blurOnSubmit ? 'submit' : 'newline'}
129+
submitBehavior={blurOnSubmit && !disabled ? 'submit' : 'newline'}
130130
onSubmitEditing={handleSubmitEditing}
131-
editable={!disabled}
132131
spellCheck={false}
133132
autoComplete="off"
134133
autoCorrect={false}

0 commit comments

Comments
 (0)