sync update from LAN repo (source dhk-1 @ fc974e93)
This commit is contained in:
1 parent
a1fa13a238
commit
e2fea6a801
432 files changed
+68707
-2270
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import type { Message } from "@langchain/langgraph-sdk";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { FilesIcon, XIcon } from "lucide-react";
|
||||
import { FilesIcon, GripVertical, XIcon } from "lucide-react";
|
||||
import { usePathname, useSearchParams } from "next/navigation";
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
||||
import type { GroupImperativeHandle } from "react-resizable-panels";
|
||||
@@ -859,13 +859,48 @@ const ChatBox: React.FC<{
|
||||
</ResizablePanel>
|
||||
<ResizableHandle
|
||||
id={`${resizableIdBase}-separator`}
|
||||
onPointerDownCapture={(event) => {
|
||||
const target = event.target;
|
||||
// The library starts a drag from any pointerdown inside the separator.
|
||||
// Hovering the edge only reveals the grip; the grip is the only drag target.
|
||||
if (!(target instanceof Element) || !target.closest("[data-resize-grip]")) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
}}
|
||||
className={cn(
|
||||
"opacity-33 hover:opacity-100",
|
||||
stackArtifactPanel &&
|
||||
"h-px w-full after:inset-x-0 after:inset-y-auto after:top-1/2 after:h-4 after:w-full after:-translate-x-0 after:-translate-y-1/2 after:cursor-row-resize",
|
||||
"group/split z-20",
|
||||
stackArtifactPanel
|
||||
? "h-px w-full opacity-33 hover:opacity-100 after:inset-x-0 after:inset-y-auto after:top-1/2 after:h-4 after:w-full after:-translate-x-0 after:-translate-y-1/2 after:cursor-row-resize"
|
||||
: // The default hit box is a full-height strip and covers both the chat
|
||||
// scrollbar and the panel on the right. The separator itself stays
|
||||
// inert; only the short center grip starts a drag.
|
||||
"pointer-events-none after:pointer-events-none after:w-0",
|
||||
!sidePanelOpen && "pointer-events-none opacity-0",
|
||||
)}
|
||||
/>
|
||||
>
|
||||
{!stackArtifactPanel && (
|
||||
<>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={cn(
|
||||
"absolute inset-y-0 left-0 z-20 w-8 cursor-default",
|
||||
sidePanelOpen ? "pointer-events-auto" : "pointer-events-none",
|
||||
)}
|
||||
/>
|
||||
<span
|
||||
data-resize-grip=""
|
||||
className={cn(
|
||||
"absolute top-1/2 left-1/2 z-30 flex h-16 w-10 -translate-x-1/2 -translate-y-1/2 items-center justify-center",
|
||||
sidePanelOpen ? "pointer-events-auto cursor-col-resize" : "pointer-events-none",
|
||||
)}
|
||||
>
|
||||
<span className="bg-border z-10 flex h-8 w-4 items-center justify-center rounded-sm border shadow-sm opacity-0 transition-opacity group-hover/split:opacity-100 group-focus-visible/split:opacity-100">
|
||||
<GripVertical className="size-3.5" />
|
||||
</span>
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</ResizableHandle>
|
||||
<ResizablePanel
|
||||
className={cn(
|
||||
"bg-background transition-all duration-300 ease-in-out",
|
||||
|
||||
Reference in new issue
Block a user