Skip to content

Commit a41b0c0

Browse files
committed
refactor: Update AI chat components and refactor class name utility imports across UI components.
1 parent 7a7f68c commit a41b0c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2300
-2251
lines changed

apps/mobile/components/ai-chat/attachment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { type FC, useMemo } from "react";
44
import { Image as NativeImage, ScrollView, View } from "react-native";
55
import { Icon } from "../ui/icon";
66
import { Text } from "../ui/text";
7-
import { cn } from "~/utils/cn";
7+
import { cn } from "~/lib/cn";
88

99
import * as AttachmentPrimitive from "@creatorem/ai-react-native/primitives/attachment";
1010
import { useAttachment } from "@creatorem/ai-react-native/primitives/attachment";

apps/mobile/components/ai-chat/components-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import type { RuntimeComponents } from "@creatorem/ai-chat/component-type-check";
99
import { Text } from "../ui/text";
1010
import { Button } from "../ui/button";
11-
import { cn } from "~/utils/cn";
11+
import { cn } from "~/lib/cn";
1212
import { AutoResizeTextarea } from "../ui/autoresize-textarea";
1313

1414
export const appNativeComponents = {

apps/mobile/components/ai-chat/markdown-text.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Text } from "../ui/text";
1313
import { View } from "react-native";
1414
import { Button } from "../ui/button";
1515
import { Icon } from "../ui/icon";
16-
import { cn } from "~/utils/cn";
16+
import { cn } from "~/lib/cn";
1717
import { useCSSVariable } from "uniwind";
1818
// import { ShimmerText } from "../shimmer-text";
1919

apps/mobile/components/ai-chat/reasoning.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
AccordionTrigger,
2323
} from "../ui/accordion";
2424
import { View } from "react-native";
25-
import { cn } from "~/utils/cn";
25+
import { cn } from "~/lib/cn";
2626
import { Icon } from "../ui/icon";
2727
import { Text } from "../ui/text";
2828

@@ -118,13 +118,8 @@ function ReasoningTrigger({
118118
)}
119119
{...props}
120120
>
121-
<Icon
122-
name="Brain"
123-
className="size-4 shrink-0"
124-
/>
125-
<View
126-
className="relative inline-block leading-none"
127-
>
121+
<Icon name="Brain" className="size-4 shrink-0" />
122+
<View className="relative inline-block leading-none">
128123
<Text>Reasoning{durationText}</Text>
129124
{active ? (
130125
<Text

apps/mobile/components/ai-chat/thread.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { View } from "react-native";
33

44
import { Icon, IconName } from "../ui/icon";
55
import { Text } from "../ui/text";
6-
import { cn } from "~/utils/cn";
6+
import { cn } from "~/lib/cn";
77
import {
88
ActionSheet,
99
ActionSheetContent,

apps/mobile/components/ai-chat/tool-fallback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { View } from "react-native";
22
import { useState } from "react";
33
import { ToolCallMessagePartComponent } from "@creatorem/ai-chat/types/message-part-component-types";
4-
import { cn } from "~/utils/cn";
4+
import { cn } from "~/lib/cn";
55
import { Button } from "../ui/button";
66
import { Text } from "../ui/text";
77
import { Icon } from "../ui/icon";

apps/mobile/components/drawer-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ScrollView } from "react-native";
22
import { useSafeAreaInsets } from "react-native-safe-area-context";
3-
import { cn } from "~/utils/cn";
3+
import { cn } from "~/lib/cn";
44
import { ThreadList } from "./ai-chat/thread-list";
55

66
export function DrawerContent() {

apps/mobile/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useCallback } from "react";
22
import { Text, TouchableOpacity, View } from "react-native";
3-
import { cn } from "~/utils/cn";
3+
import { cn } from "~/lib/cn";
44
import { Icon } from "./ui/icon";
55
import { router } from "expo-router";
66
import { useSafeAreaInsets } from "react-native-safe-area-context";

apps/mobile/components/shimmer-text.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Animated, {
1010
Easing,
1111
} from "react-native-reanimated";
1212
import { useCSSVariable } from "uniwind";
13-
import { cn } from "~/utils/cn";
13+
import { cn } from "~/lib/cn";
1414

1515
type ShimmerTextProps = {
1616
text: string;
@@ -63,4 +63,3 @@ export const ShimmerText = ({
6363
</MaskedView>
6464
);
6565
};
66-

apps/mobile/components/tools/weather-tool-ui.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { View } from "react-native";
33
import { useAssistantToolUI } from "@creatorem/ai-chat";
44
import type { ToolCallMessagePartProps } from "@creatorem/ai-chat/types/message-part-component-types";
55
import { Text } from "../ui/text";
6-
import { cn } from "~/utils/cn";
6+
import { cn } from "~/lib/cn";
77

88
const HOUR_LABELS = ["1PM", "2PM", "3PM", "4PM", "5PM"] as const;
99

0 commit comments

Comments
 (0)