- {contentType ? (
- contentType.startsWith('image') ? (
- // NOTE: it is recommended to use next/image for images
- // eslint-disable-next-line @next/next/no-img-element
-

- ) : (
-
- )
- ) : (
-
- )}
+
+ {contentType?.startsWith('image') ? (
+

+ ) : (
+
+ File
+
+ )}
- {isUploading && (
-
-
-
- )}
+ {isUploading && (
+
+
+
+ )}
+
+ {onRemove && !isUploading && (
+
+ )}
+
+
+ {name}
-
{name}
);
};
diff --git a/components/suggested-actions.tsx b/components/suggested-actions.tsx
index 6fd736c..af15774 100644
--- a/components/suggested-actions.tsx
+++ b/components/suggested-actions.tsx
@@ -1,11 +1,11 @@
'use client';
import { motion } from 'framer-motion';
-import { Button } from './ui/button';
import { memo } from 'react';
import type { UseChatHelpers } from '@ai-sdk/react';
import type { VisibilityType } from './visibility-selector';
import type { ChatMessage } from '@/lib/types';
+import { Suggestion } from './elements/suggestion';
interface SuggestedActionsProps {
chatId: string;
@@ -19,61 +19,37 @@ function PureSuggestedActions({
selectedVisibilityType,
}: SuggestedActionsProps) {
const suggestedActions = [
- {
- title: 'What are the advantages',
- label: 'of using Next.js?',
- action: 'What are the advantages of using Next.js?',
- },
- {
- title: 'Write code to',
- label: `demonstrate djikstra's algorithm`,
- action: `Write code to demonstrate djikstra's algorithm`,
- },
- {
- title: 'Help me write an essay',
- label: `about silicon valley`,
- action: `Help me write an essay about silicon valley`,
- },
- {
- title: 'What is the weather',
- label: 'in San Francisco?',
- action: 'What is the weather in San Francisco?',
- },
+ 'What are the advantages of using Next.js?',
+ 'Write code to demonstrate Dijkstra\'s algorithm',
+ 'Help me write an essay about Silicon Valley',
+ 'What is the weather in San Francisco?',
];
return (
-
- {suggestedActions.map((suggestedAction, index) => (
-
1 ? 'hidden sm:block' : 'block'}
- >
-