refactor: rename session_state to agent_list and add subscriptions

This commit is contained in:
Mohamed Boudra
2026-01-30 13:39:40 +07:00
parent 5b32d0a56c
commit 0618dc6b0d
45 changed files with 2163 additions and 257 deletions
@@ -616,7 +616,6 @@ const styles = StyleSheet.create((theme) => ({
flex: 1,
},
listContent: {
paddingHorizontal: theme.spacing[4],
paddingTop: theme.spacing[2],
paddingBottom: theme.spacing[4],
},
@@ -626,7 +625,6 @@ const styles = StyleSheet.create((theme) => ({
justifyContent: "space-between",
paddingVertical: theme.spacing[2],
paddingHorizontal: theme.spacing[3],
marginHorizontal: -theme.spacing[2],
marginTop: theme.spacing[2],
borderRadius: theme.borderRadius.md,
},
@@ -643,6 +641,7 @@ const styles = StyleSheet.create((theme) => ({
backgroundColor: theme.colors.surface2,
},
sectionContainer: {
marginHorizontal: theme.spacing[2],
marginBottom: theme.spacing[2],
},
sectionDragging: {
@@ -701,7 +700,7 @@ const styles = StyleSheet.create((theme) => ({
agentItem: {
paddingVertical: theme.spacing[2],
paddingHorizontal: theme.spacing[3],
marginHorizontal: -theme.spacing[2],
marginLeft: theme.spacing[1],
borderRadius: theme.borderRadius.lg,
marginBottom: theme.spacing[1],
},
+12 -1
View File
@@ -78,11 +78,23 @@ function SearchInput({
autoFocus = false,
}: SearchInputProps): ReactElement {
const { theme } = useUnistyles();
const inputRef = useRef<TextInput>(null);
const InputComponent = Platform.OS === "web" ? TextInput : BottomSheetTextInput;
useEffect(() => {
if (autoFocus && IS_WEB && inputRef.current) {
const timer = setTimeout(() => {
inputRef.current?.focus();
}, 50);
return () => clearTimeout(timer);
}
}, [autoFocus]);
return (
<View style={styles.searchInputContainer}>
<Search size={16} color={theme.colors.foregroundMuted} />
<InputComponent
ref={inputRef as any}
// @ts-expect-error - outlineStyle is web-only
style={[styles.searchInput, IS_WEB && { outlineStyle: "none" }]}
placeholder={placeholder}
@@ -91,7 +103,6 @@ function SearchInput({
onChangeText={onChangeText}
autoCapitalize="none"
autoCorrect={false}
autoFocus={autoFocus}
onSubmitEditing={onSubmitEditing}
/>
</View>