Skip to content

Commit

Permalink
Merge pull request #258 from tigergraph/GML-1839-clean-chat-ui
Browse files Browse the repository at this point in the history
GML-1839: clean chat UI
  • Loading branch information
billshitg authored Aug 7, 2024
2 parents e0e285e + 44f35ec commit 3876197
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
12 changes: 12 additions & 0 deletions copilot-ui/public/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion copilot-ui/src/actions/ActionProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const ActionProvider: React.FC<ActionProviderProps> = ({

return (
<div>
<span className='absolute bottom-0 pl-2 z-[5000] text-[8px] text-[#666]'>The WebSocket is currently {connectionStatus}</span>
{/* <span className='absolute bottom-0 pl-2 z-[5000] text-[8px] text-[#666]'>The WebSocket is currently {connectionStatus}</span> */}
{React.Children.map(children, (child) => {
return React.cloneElement(child, {
actions: {
Expand Down
8 changes: 4 additions & 4 deletions copilot-ui/src/components/Interact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ export const Interactions: FC<Interactions> = ({
)}
</div>

<div
{/* <div
className="w-[28px] h-[28px] bg-shadeA flex items-center justify-center rounded-sm mr-1 cursor-pointer"
onClick={() => alert("Copy!!")}
>
<IoMdCopy className="text-[15px]" />
</div>
</div> */}

<div
{/* <div
className="w-[28px] h-[28px] bg-shadeA flex items-center justify-center rounded-sm mr-1 cursor-pointer"
onClick={() => alert("Regenerate!!")}
>
<PiArrowsCounterClockwiseFill className="text-[15px]" />
</div>
</div> */}

<div
className="w-auto h-[28px] bg-shadeA flex items-center justify-center rounded-sm mr-1 px-2 cursor-pointer"
Expand Down
23 changes: 5 additions & 18 deletions copilot-ui/src/components/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const SideMenu = ({ height, setGetConversationId }: { height?: string, setGetCon
}
className="min-h-[32px] pt-5 pl-5 min-w-[144px]'"
/>
<Popover>
{/* <Popover>
<PopoverTrigger className="ml-auto"><GoGear className="text-lg mr-5 mt-4"/></PopoverTrigger>
<PopoverContent className="flex flex-col">
Expand Down Expand Up @@ -231,20 +231,7 @@ const SideMenu = ({ height, setGetConversationId }: { height?: string, setGetCon
{/* <Table>
<TableHeader>
<TableRow>
<TableHead className="w-[100px]">Query Name</TableHead>
<TableHead className="text-right">Description</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow key='0'>
<TableCell className="font-medium">find_transactions_unusual_for_merchant</TableCell>
<TableCell className="text-right"><IoPencil/> This query reports transactions having...</TableCell>
</TableRow>
</TableBody>
</Table> */}
<Table>
Expand Down Expand Up @@ -339,7 +326,7 @@ const SideMenu = ({ height, setGetConversationId }: { height?: string, setGetCon
</PopoverContent>
</Popover>
</Popover> */}

</div>
</div>
Expand All @@ -355,7 +342,7 @@ const SideMenu = ({ height, setGetConversationId }: { height?: string, setGetCon

{renderConvoHistory()}

<div
{/* <div
className={`hidden md:block w-[320px] md:max-w-[320px] absolute bg-white dark:bg-background dark:border-[#3D3D3D] rounded-bl-3xl border-t ${height ? "open-dialog-avatar" : "bottom-0"}`}
>
<div className="flex justify-center items-center text-sm h-[80px]">
Expand All @@ -369,7 +356,7 @@ const SideMenu = ({ height, setGetConversationId }: { height?: string, setGetCon
</div>
<IoIosArrowForward />
</div>
</div>
</div> */}
</div>
);
};
Expand Down
6 changes: 4 additions & 2 deletions copilot-ui/src/components/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const questions =
{title: 'Can I load data with pyTG?'},
{title: 'Write a short python snippet to run a loading job'},
]
: [
: localStorage.getItem('selectedGraph') === 'Transaction_Fraud' ?
[
{title: 'How many transactions are there?'},
{title: 'Tell me about transaction fraud.'},
{title: 'Describe flow of one transaction.'},
Expand All @@ -23,7 +24,8 @@ const questions =
// { title: "What is William Torres' ID?" },
// { title: "What's his email?" },
// {title:"How do I get a count of vertices in Python?"}
];
]
: [];

interface Start {
props: any;
Expand Down
2 changes: 1 addition & 1 deletion copilot-ui/src/components/UserAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const UserAvatar: FC<UserAvatarProps> = ({ props }) => {
<>
{props}
<img
src="./avatar.svg"
src="./user.svg"
className='h-[52px] w-[52px] relative inline-block rounded-full overflow-hidden md:h-11 md:w-11"'
/>
</>
Expand Down

0 comments on commit 3876197

Please sign in to comment.