@@ -58,7 +58,7 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
5858 // projects, // Removed unused variable
5959 isLoading,
6060 error,
61- setIsOpen,
61+ // setIsOpen, // Commented out as we will force sidebar to be closed
6262 setActiveTab,
6363 setSearchQuery,
6464 getFilteredChats,
@@ -69,43 +69,49 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
6969 } = useChatSidebarStore ( )
7070
7171 const [ showSaveDialog , setShowSaveDialog ] = useState ( false )
72- const [ showSettingsDialog , setShowSettingsDialog ] = useState ( false )
73- const [ selectedChatForProject , setSelectedChatForProject ] = useState < string | null > ( null )
72+ // const [showSaveDialog, setShowSaveDialog] = useState(false) // Not needed if sidebar is hidden
73+ // const [showSettingsDialog, setShowSettingsDialog] = useState(false) // Not needed if sidebar is hidden
74+ // const [selectedChatForProject, setSelectedChatForProject] = useState<string | null>(null) // Not needed if sidebar is hidden
7475
75- const filteredChats = getFilteredChats ( )
76- const filteredProjects = getFilteredProjects ( )
76+ // const filteredChats = getFilteredChats() // Not needed if sidebar is hidden
77+ // const filteredProjects = getFilteredProjects() // Not needed if sidebar is hidden
7778
78- const handleSaveAsProject = ( chatId : string ) => {
79- setSelectedChatForProject ( chatId )
80- setShowSaveDialog ( true )
81- }
79+ // const handleSaveAsProject = (chatId: string) => { // Not needed if sidebar is hidden
80+ // setSelectedChatForProject(chatId)
81+ // setShowSaveDialog(true)
82+ // }
8283
83- const handleExport = ( ) => {
84- const data = exportData ( )
85- const blob = new Blob ( [ data ] , { type : "application/json" } )
86- const url = URL . createObjectURL ( blob )
87- const a = document . createElement ( "a" )
88- a . href = url
89- a . download = `chat-history-${ new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] } .json`
90- document . body . appendChild ( a )
91- a . click ( )
92- document . body . removeChild ( a )
93- URL . revokeObjectURL ( url )
94- }
84+ // const handleExport = () => { // Not needed if sidebar is hidden
85+ // const data = exportData()
86+ // const blob = new Blob([data], { type: "application/json" })
87+ // const url = URL.createObjectURL(blob)
88+ // const a = document.createElement("a")
89+ // a.href = url
90+ // a.download = `chat-history-${new Date().toISOString().split("T")[0]}.json`
91+ // document.body.appendChild(a)
92+ // a.click()
93+ // document.body.removeChild(a)
94+ // URL.revokeObjectURL(url)
95+ // }
9596
96- const handleImport = ( event : React . ChangeEvent < HTMLInputElement > ) => {
97- const file = event . target . files ?. [ 0 ]
98- if ( ! file ) return
97+ // const handleImport = (event: React.ChangeEvent<HTMLInputElement>) => { // Not needed if sidebar is hidden
98+ // const file = event.target.files?.[0]
99+ // if (!file) return
99100
100- const reader = new FileReader ( )
101- reader . onload = ( e ) => {
102- const content = e . target ?. result as string
103- importData ( content )
104- }
105- reader . readAsText ( file )
106- event . target . value = "" // Reset input
107- }
101+ // const reader = new FileReader()
102+ // reader.onload = (e) => {
103+ // const content = e.target?.result as string
104+ // importData(content)
105+ // }
106+ // reader.readAsText(file)
107+ // event.target.value = "" // Reset input
108+ // }
109+
110+ // Sidebar is always hidden
111+ return null
108112
113+ // Original code for reference if we need to restore:
114+ /*
109115 if (!isOpen) {
110116 return (
111117 <div className={cn("flex flex-col h-full w-10 border-r bg-background", className)}>
@@ -120,7 +126,7 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
120126
121127 return (
122128 <div className={cn("flex flex-col h-full w-80 border-r bg-background", className)}>
123- { /* Header */ }
129+ // Header
124130 <div className="flex items-center justify-between p-4 border-b">
125131 <div className="flex items-center space-x-2">
126132 <h2 className="font-semibold text-lg">Chat History</h2>
@@ -167,7 +173,7 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
167173 </div>
168174 </div>
169175
170- { /* Search */ }
176+ // Search
171177 <div className="p-4 border-b">
172178 <div className="relative">
173179 <Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
@@ -180,7 +186,7 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
180186 </div>
181187 </div>
182188
183- { /* Tabs */ }
189+ // Tabs
184190 <div className="flex border-b">
185191 <Button
186192 variant={activeTab === "chats" ? "default" : "ghost"}
@@ -200,7 +206,7 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
200206 </Button>
201207 </div>
202208
203- { /* Content */ }
209+ // Content
204210 <ScrollArea className="flex-1">
205211 <div className="p-4">
206212 {error && <div className="p-3 mb-2 text-sm text-destructive bg-destructive/10 rounded-md">{error}</div> }
@@ -254,10 +260,11 @@ export function ChatSidebar({ className, onChatSelect, onNewChat }: ChatSidebarP
254260 </div>
255261 </ScrollArea>
256262
257- { /* Dialogs */ }
263+ // Dialogs
258264 <SaveProjectDialog open={showSaveDialog} onOpenChange={setShowSaveDialog} chatId={selectedChatForProject} />
259265
260266 <SettingsDialog open={showSettingsDialog} onOpenChange={setShowSettingsDialog} />
261267 </div>
262268 )
269+ */
263270}
0 commit comments