mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Focus chat input on toggle research mode. v-align it with send button
This commit is contained in:
parent
2924909692
commit
94074b7007
1 changed files with 8 additions and 9 deletions
|
@ -556,20 +556,19 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="float-right justify-center flex items-center p-0"
|
className="float-right justify-center gap-1 flex items-center p-0 mr-2"
|
||||||
onClick={() => setUseResearchMode(!useResearchMode)}
|
onClick={() => {
|
||||||
|
setUseResearchMode(!useResearchMode);
|
||||||
|
chatInputRef?.current?.focus();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="text-muted-foreground text-sm mr-1">
|
<span className="text-muted-foreground text-sm">Research Mode</span>
|
||||||
Research Mode
|
|
||||||
</span>
|
|
||||||
{useResearchMode ? (
|
{useResearchMode ? (
|
||||||
<ToggleRight
|
<ToggleRight
|
||||||
className={`w-6 h-6 inline-block mr-1 ${props.agentColor ? convertColorToTextClass(props.agentColor) : convertColorToTextClass("orange")} rounded-full`}
|
className={`w-6 h-6 inline-block ${props.agentColor ? convertColorToTextClass(props.agentColor) : convertColorToTextClass("orange")} rounded-full`}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ToggleLeft
|
<ToggleLeft className={`w-6 h-6 inline-block rounded-full`} />
|
||||||
className={`w-6 h-6 inline-block mr-1 rounded-full`}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
|
|
Loading…
Add table
Reference in a new issue