-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from CNTRLAI/refactors
Refactors
- Loading branch information
Showing
59 changed files
with
1,894 additions
and
2,941 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Frontend/src/components/Chat/ChatComponents/ChatHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Button } from "@/components/ui/button"; | ||
import { PlusCircle } from "lucide-react"; | ||
import { Loader2 } from "lucide-react"; | ||
import { IngestProgress } from "@/components/CollectionModals/CollectionComponents/IngestProgress"; | ||
import logo from "@/assets/icon.png"; | ||
import { useSysSettings } from "@/context/useSysSettings"; | ||
import { useChatLogic } from "@/hooks/useChatLogic"; | ||
|
||
export function ChatHeader() { | ||
const { localModalLoading } = useSysSettings(); | ||
const { handleResetChat } = useChatLogic(); | ||
return ( | ||
<div className="p-2 bg-card border-b border-secondary flex items-center"> | ||
<div className="flex items-center flex-1"> | ||
<img src={logo} alt="logo" className="h-6 w-6 mr-2" /> | ||
|
||
<h1 className="text-2xl font-bold">Notate</h1> | ||
</div> | ||
<div className="flex-1 flex justify-center"> | ||
{localModalLoading && ( | ||
<div className="flex items-center gap-2"> | ||
<Loader2 className="animate-spin h-4 w-4" /> | ||
<span>Loading local model...</span> | ||
</div> | ||
)} | ||
<IngestProgress truncate={true} /> | ||
</div> | ||
<div className="flex-1 flex justify-end"> | ||
<Button | ||
variant="secondary" | ||
onClick={() => { | ||
handleResetChat(); | ||
}} | ||
> | ||
<PlusCircle className="mr-2" /> New Chat | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.