@docyrus/ui-pro-ai-assistant 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,13 +3,14 @@ import { useChat as useChat$1 } from '@ai-sdk/react';
3
3
  import { Button } from '@docyrus/ui-pro-shared/components/button';
4
4
  import { toast, Toaster } from 'sonner';
5
5
  import { Dialog as Dialog$1, DialogContent, DialogTitle, DialogHeader, DialogFooter } from '@docyrus/ui-pro-shared/components/dialog';
6
- import { DropdownMenu as DropdownMenu$1, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSub as DropdownMenuSub$1, DropdownMenuSubTrigger as DropdownMenuSubTrigger$1, DropdownMenuSubContent as DropdownMenuSubContent$1, DropdownMenuSeparator as DropdownMenuSeparator$1 } from '@docyrus/ui-pro-shared/components/dropdown-menu';
6
+ import { DropdownMenu as DropdownMenu$1, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator as DropdownMenuSeparator$1, DropdownMenuSub as DropdownMenuSub$1, DropdownMenuSubTrigger as DropdownMenuSubTrigger$1, DropdownMenuSubContent as DropdownMenuSubContent$1 } from '@docyrus/ui-pro-shared/components/dropdown-menu';
7
7
  import { Textarea } from '@docyrus/ui-pro-shared/components/textarea';
8
8
  import { Input } from '@docyrus/ui-pro-shared/components/input';
9
9
  import { Tabs as Tabs$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1, TabsContent as TabsContent$1 } from '@docyrus/ui-pro-shared/components/tabs';
10
10
  import { cn } from '@docyrus/ui-pro-shared/lib/utils';
11
+ import { ScrollArea } from '@docyrus/ui-pro-shared/components/scroll-area';
11
12
  import { DefaultChatTransport, lastAssistantMessageIsCompleteWithToolCalls } from 'ai';
12
- import { PilcrowIcon, Heading1Icon, Heading2Icon, Heading3Icon, SquareIcon, ListIcon, ListOrderedIcon, ChevronDownIcon, Code2Icon, QuoteIcon, LightbulbIcon, Columns3Icon, GripVertical, FileUpIcon, TableIcon, ImageIcon, FilmIcon, AudioLinesIcon, TableOfContentsIcon, RadicalIcon, RectangleVerticalIcon, CalendarIcon, PlusIcon, FileCodeIcon, MinusIcon, ChevronRightIcon, ListTree, PenToolIcon, Link2Icon, FilesIcon, Link, Text, ExternalLink, Unlink, Bold, Italic, Underline, Strikethrough, Code2, MoreHorizontal, ArrowLeftIcon, ArrowRightIcon, Minus, Plus, CircleArrowDown, Minimize2, Trash2, FileUp, Check, Copy, CornerDownLeftIcon, PencilLineIcon, MessageSquareTextIcon, MessagesSquareIcon, ArrowUpIcon, CheckIcon, CaptionsIcon, ZoomInIcon, CircleArrowDownIcon, MoveUpRightIcon, MoreHorizontalIcon, CheckCircle2, FileText, Loader2, XIcon, CornerUpLeftIcon, AlbumIcon, FeatherIcon, ListMinusIcon, ListPlusIcon, ListEnd, Wand, LanguagesIcon, BadgeHelpIcon, X, PenLineIcon, SearchIcon, MusicIcon, CompassIcon, SmileIcon, LeafIcon, ClockIcon, AppleIcon, FlagIcon, StarIcon, DeleteIcon, AlignLeft, AlignCenter, AlignRight, Eye, Pencil, PlusCircle, HelpCircle, Maximize2, Download, FileSpreadsheet, ChevronDown, Search, Globe, CheckCircle, FolderOpen, User, ArrowRight, MapPin, CalendarClock, List, RefreshCw, FilePlus, RotateCcw, AlertTriangle, XCircle, AlertCircle, PencilIcon, TrashIcon, ArrowUpDown, ArrowDownToLine, PenLine, RefreshCwIcon, PaintRoller, MessageSquareText, ArrowLeft, PanelLeft, Edit, RefreshCcw, Code, Brain, Star, Trash, FolderInput, Archive, MessageSquare, NotebookText, CirclePlus, MoreVertical, Sparkles, SlidersHorizontal, FileSearch, Microscope, Ruler, Mic, AudioLines, BrainCircuit, File as File$1, Plug, Inbox, Menu, ChevronRight, LayoutDashboard, Table2, WandSparklesIcon, ArrowUpToLineIcon, BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, HighlighterIcon, Undo2Icon, Redo2Icon, ArrowDownToLineIcon, AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifyIcon, ListOrdered, ListTodoIcon, ListCollapseIcon, Table, Grid3x3Icon, Combine, Ungroup, ArrowUp, ArrowDown, Trash2Icon, LinkIcon, WrapText, OutdentIcon, IndentIcon, EyeIcon, PenIcon } from 'lucide-react';
13
+ import { PilcrowIcon, Heading1Icon, Heading2Icon, Heading3Icon, SquareIcon, ListIcon, ListOrderedIcon, ChevronDownIcon, Code2Icon, QuoteIcon, LightbulbIcon, Columns3Icon, GripVertical, FileUpIcon, TableIcon, ImageIcon, FilmIcon, AudioLinesIcon, TableOfContentsIcon, RadicalIcon, RectangleVerticalIcon, CalendarIcon, PlusIcon, FileCodeIcon, MinusIcon, ChevronRightIcon, ListTree, PenToolIcon, Link2Icon, FilesIcon, Link, Text, ExternalLink, Unlink, Bold, Italic, Underline, Strikethrough, Code2, MoreHorizontal, ArrowLeftIcon, ArrowRightIcon, Minus, Plus, CircleArrowDown, Minimize2, Trash2, FileUp, Check, Copy, CornerDownLeftIcon, PencilLineIcon, MessageSquareTextIcon, MessagesSquareIcon, ArrowUpIcon, CheckIcon, CaptionsIcon, ZoomInIcon, CircleArrowDownIcon, MoveUpRightIcon, MoreHorizontalIcon, CheckCircle2, FileText, Loader2, XIcon, CornerUpLeftIcon, AlbumIcon, FeatherIcon, ListMinusIcon, ListPlusIcon, ListEnd, Wand, LanguagesIcon, BadgeHelpIcon, X, PenLineIcon, SearchIcon, MusicIcon, CompassIcon, SmileIcon, LeafIcon, ClockIcon, AppleIcon, FlagIcon, StarIcon, DeleteIcon, AlignLeft, AlignCenter, AlignRight, Eye, Pencil, PlusCircle, HelpCircle, Maximize2, Download, FileSpreadsheet, ChevronDown, Search, Globe, CheckCircle, FolderOpen, User, ArrowRight, MapPin, CalendarClock, List, RefreshCw, FilePlus, RotateCcw, AlertTriangle, XCircle, AlertCircle, PencilIcon, TrashIcon, ArrowUpDown, ArrowDownToLine, PenLine, RefreshCwIcon, PaintRoller, MessageSquareText, ArrowLeft, Brain, PanelLeft, Edit, RefreshCcw, Code, Star, Trash, FolderInput, Archive, MessageSquare, NotebookText, CirclePlus, MoreVertical, Sparkles, SlidersHorizontal, FileSearch, Microscope, Ruler, Mic, AudioLines, BrainCircuit, File as File$1, Plug, Inbox, Menu, ChevronRight, LayoutDashboard, Table2, WandSparklesIcon, ArrowUpToLineIcon, BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, HighlighterIcon, Undo2Icon, Redo2Icon, ArrowDownToLineIcon, AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifyIcon, ListOrdered, ListTodoIcon, ListCollapseIcon, Table, Grid3x3Icon, Combine, Ungroup, ArrowUp, ArrowDown, Trash2Icon, LinkIcon, WrapText, OutdentIcon, IndentIcon, EyeIcon, PenIcon } from 'lucide-react';
13
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
15
  import { AsyncTokenManager, RestApiClient } from '@docyrus/api-client';
15
16
  import { TooltipProvider, Tooltip as Tooltip$2, TooltipTrigger as TooltipTrigger$1, TooltipContent as TooltipContent$1 } from '@docyrus/ui-pro-shared/components/tooltip';
@@ -100,7 +101,6 @@ import { BaseTogglePlugin } from '@platejs/toggle';
100
101
  import { useFilePicker } from 'use-file-picker';
101
102
  import { createPortal } from 'react-dom';
102
103
  import { Avatar as Avatar$1, AvatarImage as AvatarImage$1, AvatarFallback as AvatarFallback$1 } from '@docyrus/ui-pro-shared/components/avatar';
103
- import { ScrollArea } from '@docyrus/ui-pro-shared/components/scroll-area';
104
104
  import { Badge } from '@docyrus/ui-pro-shared/components/badge';
105
105
  import { Reasoning, ReasoningTrigger, ReasoningContent } from '@docyrus/ui-pro-shared/ai-elements/reasoning';
106
106
  import { Spinner as Spinner$1 } from '@docyrus/ui-pro-shared/components/spinner';
@@ -11985,7 +11985,12 @@ var dialogAtomStore = createAtomStore(
11985
11985
  },
11986
11986
  { name: "dialog" }
11987
11987
  );
11988
- var { DialogProvider, useDialogSet, useDialogStore, useDialogValue } = dialogAtomStore;
11988
+ var {
11989
+ DialogProvider,
11990
+ useDialogSet,
11991
+ useDialogStore,
11992
+ useDialogValue
11993
+ } = dialogAtomStore;
11989
11994
  var dialogContentAtomStore = createAtomStore(
11990
11995
  { fixed: false },
11991
11996
  { name: "dialogContent" }
@@ -22601,7 +22606,7 @@ var AssistantView = ({ ref, ...props }) => {
22601
22606
  {
22602
22607
  className: cn(
22603
22608
  "relative flex flex-col bg-background text-foreground border shadow-sm @container",
22604
- isFullscreen ? "fixed inset-0 z-[9999] rounded-none h-screen" : "h-full rounded-xl",
22609
+ isFullscreen ? "fixed inset-0 z-[9999] rounded-none h-screen" : "h-full min-h-0 overflow-hidden rounded-xl",
22605
22610
  className
22606
22611
  ),
22607
22612
  "data-render-mode": "inline",
@@ -24688,6 +24693,14 @@ var DocyAssistant = ({
24688
24693
  const currentUserId = configUser?.id || null;
24689
24694
  const [projectSearchQuery, setProjectSearchQuery] = useState("");
24690
24695
  const [isInlineFullscreen, setIsInlineFullscreen] = useState(defaultFullscreen);
24696
+ const [modalAgentSelectorOpen, setModalAgentSelectorOpen] = useState(false);
24697
+ const [modalAgents, setModalAgents] = useState([]);
24698
+ const [modalBaseAgents, setModalBaseAgents] = useState([]);
24699
+ const [modalAgentsLoading, setModalAgentsLoading] = useState(false);
24700
+ const [modalAgentSearch, setModalAgentSearch] = useState("");
24701
+ const [modalSelectedAgent, setModalSelectedAgent] = useState(null);
24702
+ const modalAgentSearchRef = useRef(null);
24703
+ const modalAgentFetchedRef = useRef(false);
24691
24704
  const { isRecording, recognition, handleMicrophoneClick } = useSpeechRecognition({
24692
24705
  enabled: enableMicrophone,
24693
24706
  onTranscript: (transcript) => setInput((prev) => prev + (prev ? " " : "") + transcript),
@@ -24935,6 +24948,44 @@ var DocyAssistant = ({
24935
24948
  uiActions.setActiveTab(0);
24936
24949
  setMessages([]);
24937
24950
  };
24951
+ useEffect(() => {
24952
+ if (!modalAgentSelectorOpen) return;
24953
+ if (modalAgentFetchedRef.current) return;
24954
+ if (!agentSelectorUrl && !baseAgentSelectorUrl) return;
24955
+ modalAgentFetchedRef.current = true;
24956
+ const fetchModalAgents = async () => {
24957
+ setModalAgentsLoading(true);
24958
+ try {
24959
+ const deployedRes = agentSelectorUrl ? await apiClient.get(agentSelectorUrl) : { success: true, data: [] };
24960
+ const baseRes = baseAgentSelectorUrl ? await apiClient.get(baseAgentSelectorUrl) : { success: true, data: [] };
24961
+ if (deployedRes.success) {
24962
+ const raw = Array.isArray(deployedRes.data) ? deployedRes.data : [];
24963
+ setModalAgents(raw.map((d) => ({
24964
+ id: d.deploymentId ?? d.id,
24965
+ name: d.agentName ?? d.name,
24966
+ avatar: d.agentAvatar?.signed_url ?? d.avatar
24967
+ })));
24968
+ }
24969
+ if (baseRes.success) {
24970
+ const rawBase = Array.isArray(baseRes.data) ? baseRes.data : [];
24971
+ setModalBaseAgents(rawBase.map((d) => ({
24972
+ id: d.agentId ?? d.id,
24973
+ name: d.agentName ?? d.name,
24974
+ avatar: d.agentAvatar?.signed_url ?? d.agentAvatar ?? d.avatar
24975
+ })));
24976
+ }
24977
+ } catch {
24978
+ } finally {
24979
+ setModalAgentsLoading(false);
24980
+ }
24981
+ };
24982
+ fetchModalAgents();
24983
+ }, [
24984
+ modalAgentSelectorOpen,
24985
+ agentSelectorUrl,
24986
+ baseAgentSelectorUrl,
24987
+ apiClient
24988
+ ]);
24938
24989
  const handleSendMessage = async (e, options3) => {
24939
24990
  e?.preventDefault();
24940
24991
  if (!input.trim()) return;
@@ -25114,6 +25165,114 @@ var DocyAssistant = ({
25114
25165
  const query = sessionState.searchQuery.toLowerCase();
25115
25166
  return session.title.toLowerCase().includes(query);
25116
25167
  });
25168
+ const modalAllAgents = [...modalAgents, ...modalBaseAgents];
25169
+ const modalActiveAgent = modalSelectedAgent ?? (deploymentId ? modalAgents.find((a) => a.id === deploymentId) : null) ?? (activeAgentId ? modalAllAgents.find((a) => a.id === activeAgentId) : null);
25170
+ const modalFilteredDeployedAgents = modalAgents.filter(
25171
+ (a) => !modalAgentSearch || a.name?.toLowerCase().includes(modalAgentSearch.toLowerCase())
25172
+ );
25173
+ const modalFilteredBaseAgents = modalBaseAgents.filter(
25174
+ (a) => !modalAgentSearch || a.name?.toLowerCase().includes(modalAgentSearch.toLowerCase())
25175
+ );
25176
+ const modalHasAnyAgents = modalFilteredDeployedAgents.length > 0 || modalFilteredBaseAgents.length > 0;
25177
+ const renderModalAgentSelector = () => agentSelectorUrl || baseAgentSelectorUrl ? /* @__PURE__ */ jsxs(
25178
+ DropdownMenu$1,
25179
+ {
25180
+ open: modalAgentSelectorOpen,
25181
+ onOpenChange: (o) => {
25182
+ setModalAgentSelectorOpen(o);
25183
+ if (!o) setModalAgentSearch("");
25184
+ },
25185
+ children: [
25186
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
25187
+ Button,
25188
+ {
25189
+ variant: "ghost",
25190
+ className: "h-7 px-2 gap-1 text-sm font-medium text-foreground hover:bg-accent rounded-md flex-1 min-w-0 justify-start",
25191
+ children: [
25192
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: modalActiveAgent?.name ?? (agentDetails?.name ?? title) }),
25193
+ /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 shrink-0 text-muted-foreground ml-auto" })
25194
+ ]
25195
+ }
25196
+ ) }),
25197
+ /* @__PURE__ */ jsxs(
25198
+ DropdownMenuContent,
25199
+ {
25200
+ align: "start",
25201
+ className: "w-64 p-0",
25202
+ onCloseAutoFocus: (e) => e.preventDefault(),
25203
+ children: [
25204
+ /* @__PURE__ */ jsx("div", { className: "p-2 border-b", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
25205
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none" }),
25206
+ /* @__PURE__ */ jsx(
25207
+ Input,
25208
+ {
25209
+ ref: modalAgentSearchRef,
25210
+ value: modalAgentSearch,
25211
+ onChange: (e) => setModalAgentSearch(e.target.value),
25212
+ onKeyDown: (e) => e.stopPropagation(),
25213
+ placeholder: "Search agents...",
25214
+ className: "h-7 pl-7 text-sm",
25215
+ autoFocus: true
25216
+ }
25217
+ )
25218
+ ] }) }),
25219
+ /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-56", children: modalAgentsLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-muted-foreground" }) }) : !modalHasAnyAgents ? /* @__PURE__ */ jsx("div", { className: "py-4 text-center text-xs text-muted-foreground", children: "No agents found" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
25220
+ modalFilteredBaseAgents.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
25221
+ /* @__PURE__ */ jsx("div", { className: "px-3 py-1.5 text-xs font-medium text-muted-foreground", children: "Base Agents" }),
25222
+ modalFilteredBaseAgents.map((agent) => /* @__PURE__ */ jsxs(
25223
+ DropdownMenuItem,
25224
+ {
25225
+ className: "cursor-pointer gap-2 px-3 py-2",
25226
+ onClick: () => {
25227
+ setModalSelectedAgent(agent);
25228
+ setModalAgentSelectorOpen(false);
25229
+ setModalAgentSearch("");
25230
+ localStorage.setItem(agentStorageKey, agent.id);
25231
+ localStorage.removeItem(deploymentStorageKey);
25232
+ setActiveAgentId(agent.id);
25233
+ setDeploymentId(void 0);
25234
+ createNewThread();
25235
+ onAgentChange?.(agent.id, "base");
25236
+ },
25237
+ children: [
25238
+ /* @__PURE__ */ jsx("div", { className: "w-5 h-5 rounded-full shrink-0 bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(Brain, { className: "w-3 h-3 text-muted-foreground" }) }),
25239
+ /* @__PURE__ */ jsx("span", { className: "truncate text-sm", children: agent.name })
25240
+ ]
25241
+ },
25242
+ agent.id
25243
+ ))
25244
+ ] }),
25245
+ modalFilteredDeployedAgents.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
25246
+ modalFilteredBaseAgents.length > 0 && /* @__PURE__ */ jsx(DropdownMenuSeparator$1, {}),
25247
+ /* @__PURE__ */ jsx("div", { className: "px-3 py-1.5 text-xs font-medium text-muted-foreground", children: "Deployed Agents" }),
25248
+ modalFilteredDeployedAgents.map((agent) => /* @__PURE__ */ jsxs(
25249
+ DropdownMenuItem,
25250
+ {
25251
+ className: "cursor-pointer gap-2 px-3 py-2",
25252
+ onClick: () => {
25253
+ setModalSelectedAgent(agent);
25254
+ setModalAgentSelectorOpen(false);
25255
+ setModalAgentSearch("");
25256
+ localStorage.setItem(deploymentStorageKey, agent.id);
25257
+ setDeploymentId(agent.id);
25258
+ createNewThread();
25259
+ onAgentChange?.(agent.id, "deployment");
25260
+ },
25261
+ children: [
25262
+ /* @__PURE__ */ jsx("div", { className: "w-5 h-5 rounded-full shrink-0 bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(Brain, { className: "w-3 h-3 text-muted-foreground" }) }),
25263
+ /* @__PURE__ */ jsx("span", { className: "truncate text-sm", children: agent.name })
25264
+ ]
25265
+ },
25266
+ agent.id
25267
+ ))
25268
+ ] })
25269
+ ] }) })
25270
+ ]
25271
+ }
25272
+ )
25273
+ ]
25274
+ }
25275
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground truncate flex-1 px-2", children: agentDetails?.name ?? title });
25117
25276
  const renderSidebarContent = () => /* @__PURE__ */ jsx(
25118
25277
  SidebarContent,
25119
25278
  {
@@ -25612,7 +25771,7 @@ var DocyAssistant = ({
25612
25771
  "div",
25613
25772
  {
25614
25773
  className: cn(
25615
- "absolute left-0 top-0 h-full w-72 rounded-lg z-100 shadow-xl",
25774
+ "absolute left-0 top-0 h-full w-72 bg-background border-r rounded-lg z-100 shadow-xl overflow-hidden",
25616
25775
  // Show floating sidebar when container is smaller than 3xl
25617
25776
  "@3xl:hidden"
25618
25777
  ),
@@ -25632,17 +25791,34 @@ var DocyAssistant = ({
25632
25791
  }
25633
25792
  },
25634
25793
  children: /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col", children: [
25635
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end h-10 px-2 border-b", children: /* @__PURE__ */ jsx(
25636
- Button,
25637
- {
25638
- variant: "ghost",
25639
- size: "icon",
25640
- onClick: () => uiActions.setSidebarOpen(false),
25641
- className: "h-8 w-8 text-muted-foreground hover:text-foreground",
25642
- children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
25643
- }
25644
- ) }),
25645
- /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 flex flex-col min-h-0", children: renderSidebarContent() })
25794
+ /* @__PURE__ */ jsxs("div", { className: "flex-none flex items-center gap-1 px-2 py-2 border-b bg-background", children: [
25795
+ renderModalAgentSelector(),
25796
+ /* @__PURE__ */ jsx(
25797
+ Button,
25798
+ {
25799
+ variant: "ghost",
25800
+ size: "icon",
25801
+ onClick: () => uiActions.setActiveTab(uiState.activeTab === 4 ? 0 : 4),
25802
+ className: cn(
25803
+ "h-7 w-7 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
25804
+ uiState.activeTab === 4 && "bg-accent text-accent-foreground"
25805
+ ),
25806
+ title: t("tabs.memories"),
25807
+ children: /* @__PURE__ */ jsx(Brain, { className: "w-4 h-4" })
25808
+ }
25809
+ ),
25810
+ /* @__PURE__ */ jsx(
25811
+ Button,
25812
+ {
25813
+ variant: "ghost",
25814
+ size: "icon",
25815
+ onClick: () => uiActions.setSidebarOpen(false),
25816
+ className: "h-7 w-7 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
25817
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
25818
+ }
25819
+ )
25820
+ ] }),
25821
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 flex flex-col min-h-0 overflow-hidden", children: renderSidebarContent() })
25646
25822
  ] })
25647
25823
  }
25648
25824
  )
@@ -25712,12 +25888,31 @@ var DocyAssistant = ({
25712
25888
  "div",
25713
25889
  {
25714
25890
  className: cn(
25715
- "relative flex-none transition-all duration-300",
25891
+ "relative flex-none bg-background border-r transition-all duration-300",
25716
25892
  // Show inline sidebar when container is 3xl or larger (48rem/768px)
25717
- "hidden @3xl:block",
25893
+ "hidden @3xl:flex @3xl:flex-col",
25718
25894
  uiState.isSidebarOpen ? "w-72" : "w-0 overflow-hidden"
25719
25895
  ),
25720
- children: /* @__PURE__ */ jsx("div", { className: "w-72 h-full flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 flex flex-col min-h-0", children: renderSidebarContent() }) })
25896
+ children: /* @__PURE__ */ jsxs("div", { className: "w-72 h-full flex flex-col overflow-hidden", children: [
25897
+ /* @__PURE__ */ jsxs("div", { className: "flex-none flex items-center gap-1 px-2 py-2 border-b bg-background", children: [
25898
+ renderModalAgentSelector(),
25899
+ /* @__PURE__ */ jsx(
25900
+ Button,
25901
+ {
25902
+ variant: "ghost",
25903
+ size: "icon",
25904
+ onClick: () => uiActions.setActiveTab(uiState.activeTab === 4 ? 0 : 4),
25905
+ className: cn(
25906
+ "h-7 w-7 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
25907
+ uiState.activeTab === 4 && "bg-accent text-accent-foreground"
25908
+ ),
25909
+ title: t("tabs.memories"),
25910
+ children: /* @__PURE__ */ jsx(Brain, { className: "w-4 h-4" })
25911
+ }
25912
+ )
25913
+ ] }),
25914
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 flex flex-col min-h-0 overflow-hidden", children: renderSidebarContent() })
25915
+ ] })
25721
25916
  }
25722
25917
  ),
25723
25918
  /* @__PURE__ */ jsx("div", { className: cn("flex-1 flex flex-col bg-background", uiState.isDocked ? "min-w-0" : "min-w-96"), children: uiState.activeTab === 1 ? /* @__PURE__ */ jsx(