mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-02-04 21:40:10 +00:00
* Webui: add Rename/Upload conversation in header and sidebar webui: don't change modified date when renaming conversation * webui: add a preset feature to the settings #14649 * webui: Add editing assistant messages #13522 Webui: keep the following message while editing assistance response. webui: change icon to edit message * webui: DB import and export #14347 * webui: Wrap long numbers instead of infinite horizontal scroll (#14062) fix sidebar being covered by main content #14082 --------- Co-authored-by: firecoperana <firecoperana>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { HashRouter, Outlet, Route, Routes } from 'react-router';
|
|
import Header from './components/Header';
|
|
import Sidebar from './components/Sidebar';
|
|
import { AppContextProvider, useAppContext } from './utils/app.context';
|
|
import ChatScreen from './components/ChatScreen';
|
|
import SettingDialog from './components/SettingDialog';
|
|
import { ModalProvider } from './components/ModalProvider';
|
|
|
|
function App() {
|
|
return (
|
|
<ModalProvider>
|
|
<HashRouter>
|
|
<div className="flex flex-row drawer lg:drawer-open">
|
|
<AppContextProvider>
|
|
<Routes>
|
|
<Route element={<AppLayout />}>
|
|
<Route path="/chat/:convId" element={<ChatScreen />} />
|
|
<Route path="*" element={<ChatScreen />} />
|
|
</Route>
|
|
</Routes>
|
|
</AppContextProvider>
|
|
</div>
|
|
</HashRouter>
|
|
</ModalProvider>
|
|
);
|
|
}
|
|
|
|
function AppLayout() {
|
|
const { showSettings, setShowSettings } = useAppContext();
|
|
return (
|
|
<>
|
|
<Sidebar />
|
|
<div
|
|
className="drawer-content grow flex flex-col h-screen mx-auto px-4 overflow-auto bg-base-100"
|
|
id="main-scroll"
|
|
>
|
|
<Header />
|
|
<Outlet />
|
|
</div>
|
|
{
|
|
<SettingDialog
|
|
show={showSettings}
|
|
onClose={() => setShowSettings(false)}
|
|
/>
|
|
}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default App;
|