mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 05:40:17 +00:00
Add tooltip for file input ref.
This commit is contained in:
@@ -651,15 +651,24 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Button
|
<TooltipProvider>
|
||||||
variant={"ghost"}
|
<Tooltip>
|
||||||
className="!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
|
<TooltipTrigger asChild>
|
||||||
disabled={props.sendDisabled || !props.isLoggedIn}
|
<Button
|
||||||
onClick={handleFileButtonClick}
|
variant={"ghost"}
|
||||||
ref={fileInputButtonRef}
|
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}
|
||||||
<Paperclip className="w-8 h-8" />
|
onClick={handleFileButtonClick}
|
||||||
</Button>
|
ref={fileInputButtonRef}
|
||||||
|
>
|
||||||
|
<Paperclip className="w-8 h-8" />
|
||||||
|
</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
|
||||||
|
|||||||
@@ -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]: [
|
||||||
|
|||||||
Reference in New Issue
Block a user