File tree Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 4848
4949 export function editActiveConversation() {
5050 if (currentChatId ) {
51- const activeConversation = filteredConversations .find (conv => conv .id === currentChatId );
51+ const activeConversation = filteredConversations .find (( conv ) => conv .id === currentChatId );
5252
5353 if (activeConversation ) {
54- const event = new CustomEvent (' edit-active-conversation' , {
55- detail: { conversationId: currentChatId }
54+ const event = new CustomEvent (' edit-active-conversation' , {
55+ detail: { conversationId: currentChatId }
5656 });
5757 document .dispatchEvent (event );
5858 }
Original file line number Diff line number Diff line change 7171 // Add event listener when component mounts
7272 $effect (() => {
7373 document .addEventListener (' edit-active-conversation' , handleGlobalEditEvent as EventListener );
74-
74+
7575 return () => {
76- document .removeEventListener (' edit-active-conversation' , handleGlobalEditEvent as EventListener );
76+ document .removeEventListener (
77+ ' edit-active-conversation' ,
78+ handleGlobalEditEvent as EventListener
79+ );
7780 };
7881 });
7982 </script >
111114 </DropdownMenu .Trigger >
112115
113116 <DropdownMenu .Content align =" end" class =" z-999 w-48" >
114- <DropdownMenu .Item onclick ={handleEdit } class =" flex items-center justify-between hover:[& >kbd]:opacity-100" >
117+ <DropdownMenu .Item
118+ onclick ={handleEdit }
119+ class =" flex items-center justify-between hover:[& >kbd]:opacity-100"
120+ >
115121 <div class =" flex items-center gap-2" >
116122 <Pencil class =" h-4 w-4" />
117123 Edit
Original file line number Diff line number Diff line change 77 class? : string ;
88 }
99
10- let {
11- keys,
12- variant = ' default' ,
13- class : className = ' '
14- }: Props = $props ();
10+ let { keys, variant = ' default' , class : className = ' ' }: Props = $props ();
1511
16- let baseClasses = ' px-1 pointer-events-none inline-flex select-none items-center gap-0.5 font-mono text-md font-medium opacity-0 transition-opacity' ;
12+ let baseClasses =
13+ ' px-1 pointer-events-none inline-flex select-none items-center gap-0.5 font-mono text-md font-medium opacity-0 transition-opacity' ;
1714 let variantClasses = variant === ' destructive' ? ' text-destructive' : ' text-muted-foreground' ;
1815 </script >
1916
Original file line number Diff line number Diff line change 5858
5959 if (event .shiftKey && isCtrlOrCmd && event .key === ' e' ) {
6060 event .preventDefault ();
61-
61+
6262 if (chatSidebar ?.editActiveConversation ) {
6363 chatSidebar .editActiveConversation ();
6464 }
You can’t perform that action at this time.
0 commit comments