From ec27da822936c13e71f63dba77ae6fda3f520bc2 Mon Sep 17 00:00:00 2001 From: Mohammad Kermani Date: Thu, 27 Mar 2025 09:50:44 +0000 Subject: [PATCH 1/2] chore: update to Pattern-ish suggested actions --- components/suggested-actions.tsx | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/components/suggested-actions.tsx b/components/suggested-actions.tsx index b2d14d6..2862980 100644 --- a/components/suggested-actions.tsx +++ b/components/suggested-actions.tsx @@ -1,10 +1,11 @@ 'use client'; +import type { ChatRequestOptions, CreateMessage, Message } from 'ai'; import { motion } from 'framer-motion'; -import { Button } from './ui/button'; -import { ChatRequestOptions, CreateMessage, Message } from 'ai'; import { memo } from 'react'; +import { Button } from './ui/button'; + interface SuggestedActionsProps { chatId: string; append: ( @@ -16,24 +17,15 @@ interface SuggestedActionsProps { function PureSuggestedActions({ chatId, append }: 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: 'Which functions should I call to', + label: 'transfer USDC with the following contract?', + action: + 'Which functions should I call to transfer USDC with the following contract? [0x43506849d7c04f9138d1a2050bbf3a0c054402dd]', }, { - title: 'What is the weather', - label: 'in San Francisco?', - action: 'What is the weather in San Francisco?', + title: 'According to details of this transaction', + label: 'what do you think is this about in one paragraph?', + action: `According to details of this transaction what do you think is this about in one paragraph? [0x479635fa05bf2fecd6fdbb2ced34dcd53b0be323ee4086972617ed7711bbc5f2]`, }, ]; From e49e42889943be1c6a1270a412ad7f66009c925c Mon Sep 17 00:00:00 2001 From: Mohammad Kermani Date: Mon, 31 Mar 2025 17:07:33 +0000 Subject: [PATCH 2/2] chore: improve suggested action texts --- components/suggested-actions.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/suggested-actions.tsx b/components/suggested-actions.tsx index 2862980..abdf178 100644 --- a/components/suggested-actions.tsx +++ b/components/suggested-actions.tsx @@ -17,15 +17,15 @@ interface SuggestedActionsProps { function PureSuggestedActions({ chatId, append }: SuggestedActionsProps) { const suggestedActions = [ { - title: 'Which functions should I call to', + title: 'In Ethereum, which functions should I call to', label: 'transfer USDC with the following contract?', action: - 'Which functions should I call to transfer USDC with the following contract? [0x43506849d7c04f9138d1a2050bbf3a0c054402dd]', + 'In Ethereum, which functions should I call to transfer USDC with the following contract? [0x43506849d7c04f9138d1a2050bbf3a0c054402dd]', }, { - title: 'According to details of this transaction', + title: 'According to details of this Ethereum transaction', label: 'what do you think is this about in one paragraph?', - action: `According to details of this transaction what do you think is this about in one paragraph? [0x479635fa05bf2fecd6fdbb2ced34dcd53b0be323ee4086972617ed7711bbc5f2]`, + action: `According to details of this Ethereum transaction what do you think is this about in one paragraph? [0x479635fa05bf2fecd6fdbb2ced34dcd53b0be323ee4086972617ed7711bbc5f2]`, }, ];