aboutsummaryrefslogtreecommitdiff
path: root/apps/web/components/new/chat
diff options
context:
space:
mode:
authorMaheshtheDev <[email protected]>2026-01-15 21:53:53 +0000
committerMaheshtheDev <[email protected]>2026-01-15 21:53:53 +0000
commit59c294b29998a861a870629d513f6da74b3d76ac (patch)
tree265c9fe27984c6d322ba2e51b0fc91bc2302698d /apps/web/components/new/chat
parentchore: quick bugs squash across the elements and added few more changes (#671) (diff)
downloadsupermemory-59c294b29998a861a870629d513f6da74b3d76ac.tar.xz
supermemory-59c294b29998a861a870629d513f6da74b3d76ac.zip
feat: deep-research on user profile and tiptap integration (#672)01-14-feat_deep-research_on_user_profile
deep-research on user profile add novel integration tiptap 3.x integration
Diffstat (limited to 'apps/web/components/new/chat')
-rw-r--r--apps/web/components/new/chat/index.tsx13
-rw-r--r--apps/web/components/new/chat/input/chain-of-thought.tsx2
-rw-r--r--apps/web/components/new/chat/input/index.tsx2
-rw-r--r--apps/web/components/new/chat/message/related-memories.tsx2
-rw-r--r--apps/web/components/new/chat/model-selector.tsx2
5 files changed, 13 insertions, 8 deletions
diff --git a/apps/web/components/new/chat/index.tsx b/apps/web/components/new/chat/index.tsx
index 3460c456..08f4e2ef 100644
--- a/apps/web/components/new/chat/index.tsx
+++ b/apps/web/components/new/chat/index.tsx
@@ -14,7 +14,7 @@ import {
SquarePenIcon,
} from "lucide-react"
import { cn } from "@lib/utils"
-import { dmSansClassName } from "@/utils/fonts"
+import { dmSansClassName } from "@/lib/fonts"
import ChatInput from "./input"
import ChatModelSelector from "./model-selector"
import { GradientLogo, LogoBgGradient } from "@ui/assets/Logo"
@@ -110,7 +110,6 @@ export function ChatSidebar({
},
},
}),
- maxSteps: 10,
onFinish: async (result) => {
if (result.message.role !== "assistant") return
@@ -285,14 +284,20 @@ export function ChatSidebar({
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
+ const activeElement = document.activeElement as HTMLElement | null
+ const isInEditableContext =
+ activeElement?.tagName === "INPUT" ||
+ activeElement?.tagName === "TEXTAREA" ||
+ activeElement?.isContentEditable ||
+ activeElement?.closest('[contenteditable="true"]')
+
if (
e.key.toLowerCase() === "t" &&
!e.metaKey &&
!e.ctrlKey &&
!e.altKey &&
isChatOpen &&
- document.activeElement?.tagName !== "INPUT" &&
- document.activeElement?.tagName !== "TEXTAREA"
+ !isInEditableContext
) {
e.preventDefault()
handleNewChat()
diff --git a/apps/web/components/new/chat/input/chain-of-thought.tsx b/apps/web/components/new/chat/input/chain-of-thought.tsx
index 0371a97e..b1923146 100644
--- a/apps/web/components/new/chat/input/chain-of-thought.tsx
+++ b/apps/web/components/new/chat/input/chain-of-thought.tsx
@@ -2,7 +2,7 @@ import { useAuth } from "@lib/auth-context"
import { Avatar, AvatarFallback, AvatarImage } from "@ui/components/avatar"
import type { UIMessage } from "@ai-sdk/react"
import { cn } from "@lib/utils"
-import { dmSansClassName } from "@/utils/fonts"
+import { dmSansClassName } from "@/lib/fonts"
interface MemoryResult {
documentId?: string
diff --git a/apps/web/components/new/chat/input/index.tsx b/apps/web/components/new/chat/input/index.tsx
index 4294add5..40c1949d 100644
--- a/apps/web/components/new/chat/input/index.tsx
+++ b/apps/web/components/new/chat/input/index.tsx
@@ -3,7 +3,7 @@
import { ChevronUpIcon } from "lucide-react"
import NovaOrb from "@/components/nova/nova-orb"
import { cn } from "@lib/utils"
-import { dmSansClassName } from "@/utils/fonts"
+import { dmSansClassName } from "@/lib/fonts"
import { useRef, useState } from "react"
import { motion } from "motion/react"
import { SendButton, StopButton } from "./actions"
diff --git a/apps/web/components/new/chat/message/related-memories.tsx b/apps/web/components/new/chat/message/related-memories.tsx
index f3b406db..ad83d03e 100644
--- a/apps/web/components/new/chat/message/related-memories.tsx
+++ b/apps/web/components/new/chat/message/related-memories.tsx
@@ -1,6 +1,6 @@
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
import type { UIMessage } from "@ai-sdk/react"
-import { dmSansClassName } from "@/utils/fonts"
+import { dmSansClassName } from "@/lib/fonts"
import { cn } from "@lib/utils"
interface MemoryResult {
diff --git a/apps/web/components/new/chat/model-selector.tsx b/apps/web/components/new/chat/model-selector.tsx
index 9cecafc2..c1952bea 100644
--- a/apps/web/components/new/chat/model-selector.tsx
+++ b/apps/web/components/new/chat/model-selector.tsx
@@ -3,7 +3,7 @@
import { useState } from "react"
import { cn } from "@lib/utils"
import { Button } from "@ui/components/button"
-import { dmSansClassName } from "@/utils/fonts"
+import { dmSansClassName } from "@/lib/fonts"
import { ChevronDownIcon } from "lucide-react"
import { models, type ModelId, modelNames } from "@/lib/models"