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,15 +651,24 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
/>
<div className="flex items-center">
<Button
variant={"ghost"}
className="!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
disabled={props.sendDisabled || !props.isLoggedIn}
onClick={handleFileButtonClick}
ref={fileInputButtonRef}
>
<Paperclip className="w-8 h-8" />
</Button>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant={"ghost"}
className="!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
disabled={props.sendDisabled || !props.isLoggedIn}
onClick={handleFileButtonClick}
ref={fileInputButtonRef}
>
<Paperclip className="w-8 h-8" />
</Button>
</TooltipTrigger>
<TooltipContent>
Attach a PDF, plain text file, or image
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
<div className="flex-grow flex flex-col w-full gap-1.5 relative">
<Textarea

View File

@@ -136,13 +136,13 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
// focus: ChatInputFocus.MESSAGE,
// intent: "Find a recipe for",
// },
{
type: SuggestionType.Interviewing,
actionTagline: "Career advice",
color: suggestionToColorMap[SuggestionType.Interviewing] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE,
intent: "Help me prepare for an interview",
},
// {
// type: SuggestionType.Interviewing,
// actionTagline: "Career advice",
// color: suggestionToColorMap[SuggestionType.Interviewing] || DEFAULT_COLOR,
// focus: ChatInputFocus.MESSAGE,
// intent: "Help me prepare for an interview",
// },
// {
// type: SuggestionType.Fun,
// actionTagline: "Get creative",
@@ -168,7 +168,7 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
type: SuggestionType.Image,
actionTagline: "Analyze image",
color: suggestionToColorMap[SuggestionType.Image] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE,
focus: ChatInputFocus.FILE,
intent: "Explain the significance of this image",
},
{
@@ -178,13 +178,13 @@ export const stepOneSuggestions: StepOneSuggestion[] = [
focus: ChatInputFocus.MESSAGE,
intent: "Help me improve my health",
},
{
type: SuggestionType.Home,
actionTagline: "Improve home",
color: suggestionToColorMap[SuggestionType.Home] || DEFAULT_COLOR,
focus: ChatInputFocus.MESSAGE,
intent: "Help me improve my home",
},
// {
// type: SuggestionType.Home,
// actionTagline: "Improve home",
// color: suggestionToColorMap[SuggestionType.Home] || DEFAULT_COLOR,
// focus: ChatInputFocus.MESSAGE,
// intent: "Help me improve my home",
// },
];
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: "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]: [