Fix keyboard shortcuts and DRY agent status dot

This commit is contained in:
Mohamed Boudra
2026-02-04 11:08:33 +07:00
parent 4887592ebe
commit 49a9fdeabc
6 changed files with 77 additions and 38 deletions
@@ -0,0 +1,34 @@
import { View } from "react-native";
import { StyleSheet, useUnistyles } from "react-native-unistyles";
export function AgentStatusDot({
status,
requiresAttention,
}: {
status: string | null | undefined;
requiresAttention: boolean | null | undefined;
}) {
const { theme } = useUnistyles();
const isRunning = status === "running";
const color = isRunning
? theme.colors.palette.blue[500]
: requiresAttention
? theme.colors.success
: null;
if (!color) {
return null;
}
return <View style={[styles.dot, { backgroundColor: color }]} />;
}
const styles = StyleSheet.create((theme) => ({
dot: {
width: 8,
height: 8,
borderRadius: theme.borderRadius.full,
},
}));