Fix composer safe-area ownership

This commit is contained in:
Mohamed Boudra
2026-04-20 17:35:20 +07:00
parent 93095aa1d2
commit 067125bd4f
7 changed files with 57 additions and 37 deletions
@@ -1,6 +1,7 @@
import { useCallback, useMemo, useRef } from "react";
import { Keyboard, ScrollView, Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import invariant from "tiny-invariant";
import { Composer } from "@/components/composer";
import { FileDropZone } from "@/components/file-drop-zone";
@@ -48,6 +49,7 @@ export function WorkspaceDraftAgentTab({
onCreated,
onOpenWorkspaceFile,
}: WorkspaceDraftAgentTabProps) {
const insets = useSafeAreaInsets();
const client = useHostRuntimeClient(serverId);
const isConnected = useHostRuntimeIsConnected(serverId);
const workspaceAuthority = useWorkspaceExecutionAuthority(serverId, workspaceId);
@@ -282,7 +284,7 @@ export function WorkspaceDraftAgentTab({
)}
</View>
<View style={styles.inputAreaWrapper}>
<View style={[styles.inputAreaWrapper, { paddingBottom: insets.bottom }]}>
<Composer
agentId={tabId}
serverId={serverId}