Skip to content

Commit 6d6d47a

Browse files
committed
cleanup ai elements
1 parent 5a19a42 commit 6d6d47a

19 files changed

+66
-66
lines changed

apps/dashboard/components/ai-elements/actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import type { ComponentProps } from 'react';
34
import { Button } from '@/components/ui/button';
45
import {
56
Tooltip,
@@ -8,7 +9,6 @@ import {
89
TooltipTrigger,
910
} from '@/components/ui/tooltip';
1011
import { cn } from '@/lib/utils';
11-
import type { ComponentProps } from 'react';
1212

1313
export type ActionsProps = ComponentProps<'div'>;
1414

apps/dashboard/components/ai-elements/artifact.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use client';
22

3+
import { type LucideIcon, XIcon } from 'lucide-react';
4+
import type { ComponentProps, HTMLAttributes } from 'react';
35
import { Button } from '@/components/ui/button';
46
import {
57
Tooltip,
@@ -8,8 +10,6 @@ import {
810
TooltipTrigger,
911
} from '@/components/ui/tooltip';
1012
import { cn } from '@/lib/utils';
11-
import { type LucideIcon, XIcon } from 'lucide-react';
12-
import type { ComponentProps, HTMLAttributes } from 'react';
1313

1414
export type ArtifactProps = HTMLAttributes<HTMLDivElement>;
1515

apps/dashboard/components/ai-elements/branch.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use client';
22

3-
import { Button } from '@/components/ui/button';
4-
import { cn } from '@/lib/utils';
53
import type { UIMessage } from 'ai';
64
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
75
import type { ComponentProps, HTMLAttributes, ReactElement } from 'react';
86
import { createContext, useContext, useEffect, useState } from 'react';
7+
import { Button } from '@/components/ui/button';
8+
import { cn } from '@/lib/utils';
99

1010
type BranchContextType = {
1111
currentBranch: number;

apps/dashboard/components/ai-elements/chain-of-thought.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
'use client';
22

33
import { useControllableState } from '@radix-ui/react-use-controllable-state';
4-
import { Badge } from '@/components/ui/badge';
5-
import {
6-
Collapsible,
7-
CollapsibleContent,
8-
CollapsibleTrigger,
9-
} from '@/components/ui/collapsible';
10-
import { cn } from '@/lib/utils';
114
import {
125
BrainIcon,
136
ChevronDownIcon,
@@ -16,6 +9,13 @@ import {
169
} from 'lucide-react';
1710
import type { ComponentProps } from 'react';
1811
import { createContext, memo, useContext } from 'react';
12+
import { Badge } from '@/components/ui/badge';
13+
import {
14+
Collapsible,
15+
CollapsibleContent,
16+
CollapsibleTrigger,
17+
} from '@/components/ui/collapsible';
18+
import { cn } from '@/lib/utils';
1919

2020
type ChainOfThoughtContextValue = {
2121
isOpen: boolean;

apps/dashboard/components/ai-elements/code-block.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use client';
22

3-
import { Button } from '@/components/ui/button';
4-
import { cn } from '@/lib/utils';
53
import { CheckIcon, CopyIcon } from 'lucide-react';
64
import type { ComponentProps, HTMLAttributes, ReactNode } from 'react';
75
import { createContext, useContext, useState } from 'react';
@@ -10,6 +8,8 @@ import {
108
oneDark,
119
oneLight,
1210
} from 'react-syntax-highlighter/dist/esm/styles/prism';
11+
import { Button } from '@/components/ui/button';
12+
import { cn } from '@/lib/utils';
1313

1414
type CodeBlockContextType = {
1515
code: string;

apps/dashboard/components/ai-elements/context.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
'use client';
22

3+
import type { LanguageModelUsage } from 'ai';
4+
import { type ComponentProps, createContext, useContext } from 'react';
5+
import { estimateCost, type ModelId } from 'tokenlens';
36
import { Button } from '@/components/ui/button';
47
import {
58
HoverCard,
@@ -8,9 +11,6 @@ import {
811
} from '@/components/ui/hover-card';
912
import { Progress } from '@/components/ui/progress';
1013
import { cn } from '@/lib/utils';
11-
import type { LanguageModelUsage } from 'ai';
12-
import { type ComponentProps, createContext, useContext } from 'react';
13-
import { estimateCost, type ModelId } from 'tokenlens';
1414

1515
const PERCENT_MAX = 100;
1616
const ICON_RADIUS = 10;

apps/dashboard/components/ai-elements/conversation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use client';
22

3-
import { Button } from '@/components/ui/button';
4-
import { cn } from '@/lib/utils';
53
import { ArrowDownIcon } from 'lucide-react';
64
import type { ComponentProps } from 'react';
75
import { useCallback } from 'react';
86
import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';
7+
import { Button } from '@/components/ui/button';
8+
import { cn } from '@/lib/utils';
99

1010
export type ConversationProps = ComponentProps<typeof StickToBottom>;
1111

apps/dashboard/components/ai-elements/image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { cn } from '@/lib/utils';
21
import type { Experimental_GeneratedImage } from 'ai';
2+
import { cn } from '@/lib/utils';
33

44
export type ImageProps = Experimental_GeneratedImage & {
55
className?: string;

apps/dashboard/components/ai-elements/inline-citation.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
'use client';
22

3+
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';
4+
import {
5+
type ComponentProps,
6+
createContext,
7+
useCallback,
8+
useContext,
9+
useEffect,
10+
useState,
11+
} from 'react';
312
import { Badge } from '@/components/ui/badge';
413
import {
514
Carousel,
@@ -13,15 +22,6 @@ import {
1322
HoverCardTrigger,
1423
} from '@/components/ui/hover-card';
1524
import { cn } from '@/lib/utils';
16-
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';
17-
import {
18-
type ComponentProps,
19-
createContext,
20-
useCallback,
21-
useContext,
22-
useEffect,
23-
useState,
24-
} from 'react';
2525

2626
export type InlineCitationProps = ComponentProps<'span'>;
2727

apps/dashboard/components/ai-elements/loader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { cn } from '@/lib/utils';
21
import type { HTMLAttributes } from 'react';
2+
import { cn } from '@/lib/utils';
33

44
type LoaderIconProps = {
55
size?: number;

0 commit comments

Comments
 (0)