mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-05 08:06:19 +00:00
Fix Nova chat composer spacing
This commit is contained in:
parent
ba8eb52b94
commit
a9881f88ad
5 changed files with 23 additions and 10 deletions
|
|
@ -1,2 +0,0 @@
|
|||
# PostHog Configuration
|
||||
WXT_POSTHOG_API_KEY=your_posthog_project_api_key_here
|
||||
1
apps/browser-extension/.env.example
Symbolic link
1
apps/browser-extension/.env.example
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/Users/dhravya/code/supermemory/apps/browser-extension/.env.example
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
NEXT_PUBLIC_BACKEND_URL=https://api.supermemory.ai
|
||||
NEXT_PUBLIC_POSTHOG_KEY=
|
||||
EXA_API_KEY=
|
||||
XAI_API_KEY=
|
||||
1
apps/web/.env.example
Symbolic link
1
apps/web/.env.example
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/Users/dhravya/code/supermemory/apps/web/.env.example
|
||||
|
|
@ -38,7 +38,7 @@ export function HomeChatComposer({
|
|||
|
||||
return (
|
||||
<div className={cn(className)}>
|
||||
<div className="mx-auto w-full max-w-[720px] px-4 pt-1 pb-3 md:pb-4">
|
||||
<div className="mx-auto w-full max-w-[720px] px-4 pt-1 pb-[max(1.25rem,calc(env(safe-area-inset-bottom)+1rem))] md:pb-6">
|
||||
<ChatInput
|
||||
value={input}
|
||||
onChange={(e) => setInput(e.target.value)}
|
||||
|
|
|
|||
|
|
@ -776,6 +776,9 @@ export function ChatSidebar({
|
|||
|
||||
const isStackedInput = layout === "page"
|
||||
const showHeaderRow = !isPageDesktop || isMobile || !isStackedInput
|
||||
const isResponding = status === "submitted" || status === "streaming"
|
||||
const showInputStatusStrip =
|
||||
!isStackedInput || isResponding || messages.length > 0
|
||||
|
||||
const chatHistorySheet = (
|
||||
<Sheet
|
||||
|
|
@ -1127,14 +1130,20 @@ export function ChatSidebar({
|
|||
</div>
|
||||
)}
|
||||
|
||||
<div className="shrink-0">
|
||||
<div
|
||||
className={cn(
|
||||
"shrink-0",
|
||||
isStackedInput &&
|
||||
"px-4 pb-[max(1.25rem,calc(env(safe-area-inset-bottom)+1rem))] md:pb-6",
|
||||
)}
|
||||
>
|
||||
<ChatInput
|
||||
value={input}
|
||||
onChange={(e) => setInput(e.target.value)}
|
||||
onSend={handleSend}
|
||||
onStop={stop}
|
||||
onKeyDown={handleKeyDown}
|
||||
isResponding={status === "submitted" || status === "streaming"}
|
||||
isResponding={isResponding}
|
||||
activeStatus={
|
||||
status === "submitted"
|
||||
? "Thinking…"
|
||||
|
|
@ -1142,6 +1151,7 @@ export function ChatSidebar({
|
|||
? "Structuring response…"
|
||||
: "Waiting for input…"
|
||||
}
|
||||
showStatusStrip={showInputStatusStrip}
|
||||
onExpandedChange={setIsInputExpanded}
|
||||
chainOfThoughtComponent={
|
||||
messages.length > 0 ? <ChainOfThought messages={messages} /> : null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ChevronUpIcon } from "lucide-react"
|
|||
import NovaOrb from "@/components/nova/nova-orb"
|
||||
import { cn } from "@lib/utils"
|
||||
import { dmSansClassName } from "@/lib/fonts"
|
||||
import { type ReactNode, useRef, useState } from "react"
|
||||
import { type ReactNode, useEffect, useRef, useState } from "react"
|
||||
import { motion } from "motion/react"
|
||||
import { SendButton, StopButton } from "./actions"
|
||||
|
||||
|
|
@ -41,6 +41,13 @@ export default function ChatInput({
|
|||
const [isExpanded, setIsExpanded] = useState(false)
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!showStatusStrip && isExpanded) {
|
||||
setIsExpanded(false)
|
||||
onExpandedChange?.(false)
|
||||
}
|
||||
}, [isExpanded, onExpandedChange, showStatusStrip])
|
||||
|
||||
const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||||
onChange(e)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue