Add tooltip for file input ref.

This commit is contained in:
sabaimran
2024-12-24 11:20:39 -08:00
parent a58b3b4a37
commit 012e0ef882
2 changed files with 35 additions and 26 deletions

View File

@@ -651,6 +651,9 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
/> />
<div className="flex items-center"> <div className="flex items-center">
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button <Button
variant={"ghost"} variant={"ghost"}
className="!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500" className="!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
@@ -660,6 +663,12 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
> >
<Paperclip className="w-8 h-8" /> <Paperclip className="w-8 h-8" />
</Button> </Button>
</TooltipTrigger>
<TooltipContent>
Attach a PDF, plain text file, or image
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div> </div>
<div className="flex-grow flex flex-col w-full gap-1.5 relative"> <div className="flex-grow flex flex-col w-full gap-1.5 relative">
<Textarea <Textarea

View File

@@ -136,13 +136,13 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
// focus: ChatInputFocus.MESSAGE, // focus: ChatInputFocus.MESSAGE,
// intent: "Find a recipe for", // intent: "Find a recipe for",
// }, // },
{ // {
type: SuggestionType.Interviewing, // type: SuggestionType.Interviewing,
actionTagline: "Career advice", // actionTagline: "Career advice",
color: suggestionToColorMap[SuggestionType.Interviewing] || DEFAULT_COLOR, // color: suggestionToColorMap[SuggestionType.Interviewing] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE, // focus: ChatInputFocus.MESSAGE,
intent: "Help me prepare for an interview", // intent: "Help me prepare for an interview",
}, // },
// { // {
// type: SuggestionType.Fun, // type: SuggestionType.Fun,
// actionTagline: "Get creative", // actionTagline: "Get creative",
@@ -168,7 +168,7 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
type: SuggestionType.Image, type: SuggestionType.Image,
actionTagline: "Analyze image", actionTagline: "Analyze image",
color: suggestionToColorMap[SuggestionType.Image] || DEFAULT_COLOR, color: suggestionToColorMap[SuggestionType.Image] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE, focus: ChatInputFocus.FILE,
intent: "Explain the significance of this image", intent: "Explain the significance of this image",
}, },
{ {
@@ -178,13 +178,13 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
focus: ChatInputFocus.MESSAGE, focus: ChatInputFocus.MESSAGE,
intent: "Help me improve my health", intent: "Help me improve my health",
}, },
{ // {
type: SuggestionType.Home, // type: SuggestionType.Home,
actionTagline: "Improve home", // actionTagline: "Improve home",
color: suggestionToColorMap[SuggestionType.Home] || DEFAULT_COLOR, // color: suggestionToColorMap[SuggestionType.Home] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE, // focus: ChatInputFocus.MESSAGE,
intent: "Help me improve my home", // intent: "Help me improve my home",
}, // },
]; ];
export const stepTwoSuggestion: { [key: string]: StepTwoSuggestion[] } = { export const stepTwoSuggestion: { [key: string]: StepTwoSuggestion[] } = {
@@ -420,10 +420,10 @@ export const stepTwoSuggestion: { [key: string]: StepTwoSuggestion[] } = {
prompt: "Explain the significance of this historical painting", prompt: "Explain the significance of this historical painting",
}, },
{ {
prompt: "What emotions does this artwork evoke?", prompt: "Can you explain this physics diagram to me?",
}, },
{ {
prompt: "What is the story behind this sculpture?", prompt: "Explain this meme to me",
}, },
], ],
[SuggestionType.Document]: [ [SuggestionType.Document]: [