Open History to see the last commit
1import { Pressable, View } from "react-native";
2
3import { AppText as Text } from "../../components/AppText";
4
5/**
6 * Shown in place of the composer when the server rejected a new task. The
7 * prompt and attachments are already back in the project draft, so the only
8 * action is reopening it.
9 */
10export function ThreadCreationFailedCard(props: {
11 readonly reason: string;
12 readonly onEditTask: () => void;
13}) {
14 return (
15 <View className="gap-2.5 rounded-[20px] border border-adaptive-neutral-200-white-a6 bg-adaptive-neutral-100-900 p-4">
16 <Text className="font-t3-bold text-2xs uppercase tracking-[1.1px] text-adaptive-rose-700-300">
17 Could not start task
18 </Text>
19 <Text className="font-sans text-sm leading-normal text-adaptive-neutral-600-400">
20 {props.reason}
21 </Text>
22 <Text className="font-sans text-xs leading-normal text-adaptive-neutral-600-400">
23 Your prompt was kept in the project draft.
24 </Text>
25 <View className="flex-row">
26 <Pressable
27 accessibilityRole="button"
28 className="items-center justify-center rounded-[14px] bg-blue-500 px-3.5 py-3"
29 onPress={props.onEditTask}
30 >
31 <Text className="text-sm font-t3-extrabold text-white">Edit task</Text>
32 </Pressable>
33 </View>
34 </View>
35 );
36}