Skip to content

Commit

Permalink
Updates for african microscopists
Browse files Browse the repository at this point in the history
  • Loading branch information
GullyBurns committed Dec 6, 2023
1 parent 434c344 commit 9a61477
Show file tree
Hide file tree
Showing 17,459 changed files with 1,723,385 additions and 183 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 15 additions & 4 deletions alhazen-client/app/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ import { ChatMessageBubble, Message } from "../components/ChatMessageBubble";
import { AutoResizeTextarea } from "./AutoResizeTextarea";
import { marked } from "marked";
import { Renderer } from "marked";


import {
RecoilRoot,
atom,
selector,
useRecoilState,
useRecoilValue,
} from 'recoil';

import hljs from "highlight.js";
import "highlight.js/styles/gradient-dark.css";

Expand All @@ -34,21 +44,22 @@ import {
import { ArrowUpIcon } from "@chakra-ui/icons";
import { Source } from "./SourceBubble";
import { apiBaseUrl } from "../utils/constants";
import { messagesAtom } from "../recoil/atoms/messagesAtom";

export function ChatWindow(props: {
placeholder?: string;
titleText?: string;
}) {
const conversationId = uuidv4();

const messageContainerRef = useRef<HTMLDivElement | null>(null);
const [messages, setMessages] = useState<Array<Message>>([]);
//const [messages, setMessages] = useState<Array<Message>>([]);
const [messages, setMessages] = useRecoilState(messagesAtom);
const [input, setInput] = useState("");
const [isLoading, setIsLoading] = useState(false);

const [chatHistory, setChatHistory] = useState<
{ human: string; ai: string }[]
>([]);

const { placeholder, titleText = "An LLM" } = props;

const sendMessage = async (message?: string) => {
Expand Down Expand Up @@ -145,7 +156,7 @@ export function ChatWindow(props: {
runId = parsed.metadata.run_id;
}
});

let parsedResult = marked.parse(accumulatedMessage);

setMessages((prevMessages) => {
Expand Down
105 changes: 105 additions & 0 deletions alhazen-client/app/components/SimpleNavBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/**
* @description :
* @author :
* @group :
* @created : 01/12/2023 - 15:57:01
*
* MODIFICATION LOG
* - Version : 1.0.0
* - Date : 01/12/2023
* - Author :
* - Modification :
**/
'use client'

import {
Box,
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbSeparator,
Flex,
Avatar,
HStack,
Text,
IconButton,
Button,
Menu,
MenuButton,
MenuList,
MenuItem,
MenuDivider,
useDisclosure,
useColorModeValue,
Stack,
} from '@chakra-ui/react'
import { HamburgerIcon, CloseIcon } from '@chakra-ui/icons'

interface Props {
children: React.ReactNode
}

const Links = ['Dashboard', 'Projects', 'Team', 'Search']

const NavLink = (props: Props) => {
const { children } = props

return (
<Box
as="a"
px={2}
py={1}
rounded={'md'}
_hover={{
textDecoration: 'none',
bg: useColorModeValue('gray.200', 'gray.700'),
}}
href={'#'}>
{children}
</Box>
)
}

export default function SimpleNavBar() {
const { isOpen, onOpen, onClose } = useDisclosure()

return (
<>
<Box bg={useColorModeValue('gray.100', 'gray.900')} px={4}>
<Flex h={16} alignItems={'center'} justifyContent={'space-between'}>
<HStack spacing={8} alignItems={'center'}>
<Box>Logo</Box>
<HStack as={'nav'} spacing={4} display={{ base: 'none', md: 'flex' }}>
{Links.map((link) => (
<NavLink key={link}>{link}</NavLink>
))}
</HStack>
</HStack>
<Breadcrumb>
<BreadcrumbItem>
<BreadcrumbLink href='#'>Home</BreadcrumbLink>
</BreadcrumbItem>

<BreadcrumbItem>
<BreadcrumbLink href='#'>Docs</BreadcrumbLink>
</BreadcrumbItem>

<BreadcrumbItem isCurrentPage>
<BreadcrumbLink href='#'>Breadcrumb</BreadcrumbLink>
</BreadcrumbItem>
</Breadcrumb>
</Flex>

{isOpen ? (
<Box pb={4} display={{ md: 'none' }}>
<Stack as={'nav'} spacing={4}>
{Links.map((link) => (
<NavLink key={link}>{link}</NavLink>
))}
</Stack>
</Box>
) : null}
</Box>
</>
)
}
32 changes: 32 additions & 0 deletions alhazen-client/app/components/TopDashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @description :
* @author :
* @group :
* @created : 27/11/2023 - 23:19:05
*
* MODIFICATION LOG
* - Version : 1.0.0
* - Date : 27/11/2023
* - Author :
* - Modification :
**/
import { MouseEvent, MouseEventHandler } from "react";
import {
Heading,
Link,
Card,
CardHeader,
Flex,
Spacer,
} from "@chakra-ui/react";
import { ExternalLinkIcon } from "@chakra-ui/icons";

export function TopDashboard(props: {}) {
return (
<div className="rounded flex flex-col items-center max-w-full md:p-8">
<Heading fontSize="3xl" fontWeight={"medium"} mb={1} color={"white"}>
Placeholder
</Heading>
</div>
);
}
1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/autoprefixer

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/conc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/concurrently

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/cssesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/jiti

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/loose-envify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/marked

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/next

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/resolve

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/sucrase

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/sucrase-node

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/tailwind

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/tailwindcss

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/tree-kill

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/tsc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/tsserver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions alhazen-client/app/node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9a61477

Please sign in to comment.