final set of updates for the upgrade
This commit is contained in:
BIN
llm-fe/public/favicon.jpg
Normal file
BIN
llm-fe/public/favicon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
@@ -1,14 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.jpg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Chat app by AI ML Operations, LLC"
|
||||
/>
|
||||
<meta name="description" content="Chat app by AI ML Operations, LLC" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
@@ -26,6 +24,7 @@
|
||||
-->
|
||||
<title>Chat by AI ML Operations. LCC</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
@@ -39,4 +38,5 @@
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -69,7 +69,9 @@ function WebSocketProvider({ children }) {
|
||||
/* WS initialization and cleanup */
|
||||
if (account) {
|
||||
ws.current = new WebSocket(`ws://localhost:8011/ws/chat_again/`);
|
||||
//ws.current = new WebSocket(`ws://localhost:8011/ws/conditional_chat/`);
|
||||
//ws.current = new WebSocket('wss://chatbackend.aimloperations.com/ws/chat_again/')
|
||||
//ws.current = new WebSocket('wss://chatbackend.aimloperations.com/ws/conditional_chat/')
|
||||
//ws.current = process.env.REACT_APP_BACKEND_WS_API_BASE_URL;
|
||||
|
||||
ws.current.onopen = () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useRef, useState } from "react";
|
||||
import styled, { ThemeContext } from "styled-components";
|
||||
import { Formik, Form, Field, ErrorMessage } from "formik";
|
||||
import * as Yup from "yup";
|
||||
import { AttachFile, Send } from "@mui/icons-material"; // Keeping icons for now, can replace later if needed
|
||||
import { AttachFile, Delete, Send } from "@mui/icons-material"; // Keeping icons for now, can replace later if needed
|
||||
import Markdown from "markdown-to-jsx";
|
||||
|
||||
import {
|
||||
@@ -155,10 +155,10 @@ const ConversationItem = styled.div<{ $active: boolean }>`
|
||||
background: ${(props) => (props.$active ? props.theme.main + "33" : "transparent")};
|
||||
color: ${(props) => (props.$active ? props.theme.colors.text : props.theme.darkMode ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)")};
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border: 1px solid ${(props) => (props.$active ? props.theme.main + "66" : "transparent")};
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
background: ${({ theme }) => theme.darkMode ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'};
|
||||
@@ -166,6 +166,15 @@ const ConversationItem = styled.div<{ $active: boolean }>`
|
||||
}
|
||||
`;
|
||||
|
||||
const ConversationTitle = styled.span`
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
const NewChatButton = styled.button`
|
||||
width: 100%;
|
||||
padding: 0.8rem;
|
||||
@@ -221,7 +230,7 @@ const AsyncDashboardInner = ({ }): JSX.Element => {
|
||||
useContext(WebSocketContext);
|
||||
const { account } = useContext(AccountContext);
|
||||
|
||||
const { conversations, selectedConversation, setSelectedConversation } =
|
||||
const { conversations, selectedConversation, setSelectedConversation, deleteConversation } =
|
||||
useContext(ConversationContext);
|
||||
|
||||
const {
|
||||
@@ -284,7 +293,19 @@ const AsyncDashboardInner = ({ }): JSX.Element => {
|
||||
$active={convo.id === selectedConversation}
|
||||
onClick={() => setSelectedConversation(convo.id)}
|
||||
>
|
||||
{convo.title || "New Conversation"}
|
||||
<ConversationTitle>{convo.title || "New Conversation"}</ConversationTitle>
|
||||
{convo.id === selectedConversation && (
|
||||
<IconButton
|
||||
as="div"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
deleteConversation(convo.id);
|
||||
}}
|
||||
style={{ padding: 4, width: 'auto', height: 'auto' }}
|
||||
>
|
||||
<Delete fontSize="small" />
|
||||
</IconButton>
|
||||
)}
|
||||
</ConversationItem>
|
||||
))}
|
||||
</div>
|
||||
@@ -345,7 +366,7 @@ const AsyncDashboardInner = ({ }): JSX.Element => {
|
||||
<VisuallyHiddenInput
|
||||
id="file-upload"
|
||||
type="file"
|
||||
accept=".csv,.xlsx,.txt"
|
||||
accept=".csv,.xlsx,.txt,.pdf,.PDF"
|
||||
onChange={(event) => {
|
||||
const file = event.target.files?.[0];
|
||||
if (file) {
|
||||
|
||||
Reference in New Issue
Block a user