diff --git a/src/interface/web/app/chat/chat.module.css b/src/interface/web/app/chat/chat.module.css
index 3d3c4665..98786272 100644
--- a/src/interface/web/app/chat/chat.module.css
+++ b/src/interface/web/app/chat/chat.module.css
@@ -11,8 +11,6 @@ div.main {
}
div.inputBox {
- display: grid;
- grid-template-columns: auto 1fr auto auto;
border: 1px solid var(--border-color);
border-radius: 16px;
box-shadow: 0 4px 10px var(--box-shadow-color);
@@ -20,6 +18,12 @@ div.inputBox {
gap: 12px;
padding-left: 20px;
padding-right: 20px;
+ align-content: center;
+}
+
+div.actualInputArea {
+ display: grid;
+ grid-template-columns: auto 1fr auto auto;
}
input.inputBox {
diff --git a/src/interface/web/app/chat/page.tsx b/src/interface/web/app/chat/page.tsx
index ca03eb32..98faad15 100644
--- a/src/interface/web/app/chat/page.tsx
+++ b/src/interface/web/app/chat/page.tsx
@@ -14,19 +14,48 @@ import { handleCompiledReferences, handleImageResponse, setupWebSocket, uploadDa
import { Progress } from "@/components/ui/progress"
import 'katex/dist/katex.min.css';
-import { Lightbulb, ArrowCircleUp, FileArrowUp, Microphone } from '@phosphor-icons/react';
+import {
+ ArrowCircleUp,
+ ArrowRight,
+ Browser,
+ ChatsTeardrop,
+ FileArrowUp,
+ GlobeSimple,
+ Gps,
+ Image,
+ Microphone,
+ Notebook,
+ Question,
+ Robot,
+ Shapes
+} from '@phosphor-icons/react';
+
+import {
+ Command,
+ CommandDialog,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+ CommandSeparator,
+ CommandShortcut,
+} from "@/components/ui/command"
-import { Label } from "@/components/ui/label"
import { Textarea } from "@/components/ui/textarea"
import { Button } from '@/components/ui/button';
import { StreamMessage } from '../components/chatMessage/chatMessage';
import { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogDescription, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
+import { Popover, PopoverContent } from '@/components/ui/popover';
+import { PopoverTrigger } from '@radix-ui/react-popover';
interface ChatInputProps {
sendMessage: (message: string) => void;
sendDisabled: boolean;
setUploadedFiles?: (files: string[]) => void;
conversationId?: string | null;
+ chatOptionsData?: ChatOptions | null;
+ isMobileWidth?: boolean;
}
function ChatInputArea(props: ChatInputProps) {
@@ -68,6 +97,10 @@ function ChatInputArea(props: ChatInputProps) {
setMessage('');
}
+ function handleSlashCommandClick(command: string) {
+ setMessage(`/${command} `);
+ }
+
function handleFileButtonClick() {
if (!fileInputRef.current) return;
fileInputRef.current.click();
@@ -85,6 +118,45 @@ function ChatInputArea(props: ChatInputProps) {
props.conversationId);
}
+ function getIconForSlashCommand(command: string) {
+ if (command.includes('summarize')) {
+ return
+ }
+
+ if (command.includes('help')) {
+ return
+ }
+
+ if (command.includes('automation')) {
+ return
+ }
+
+ if (command.includes('webpage')) {
+ return
+ }
+
+ if (command.includes('notes')) {
+ return
+ }
+
+ if (command.includes('image')) {
+ return
+ }
+
+ if (command.includes('default')) {
+ return
+ }
+
+ if (command.includes('general')) {
+ return
+ }
+
+ if (command.includes('online')) {
+ return
+ }
+ return
+ }
+
return (
<>
{
@@ -134,47 +206,84 @@ function ChatInputArea(props: ChatInputProps) {
)
}
-
-
-
-
+
setMessage(message)}
sendDisabled={processingMessage}
+ chatOptionsData={props.chatOptionsData}
conversationId={conversationId}
+ isMobileWidth={props.isMobileWidth}
setUploadedFiles={props.setUploadedFiles} />
>
@@ -390,10 +492,6 @@ export default function Chat() {
}
}, [queryToProcess]);
- // useEffect(() => {
- // console.log("messages", messages);
- // }, [messages]);
-
useEffect(() => {
if (processQuerySignal && chatWS) {
setProcessQuerySignal(false);
diff --git a/src/interface/web/app/components/chatHistory/chatHistory.tsx b/src/interface/web/app/components/chatHistory/chatHistory.tsx
index e8a70d68..56f1f157 100644
--- a/src/interface/web/app/components/chatHistory/chatHistory.tsx
+++ b/src/interface/web/app/components/chatHistory/chatHistory.tsx
@@ -42,7 +42,7 @@ function constructTrainOfThought(trainOfThought: string[], lastMessage: boolean,
}
{trainOfThought.map((train, index) => (
-
+
))}
)
diff --git a/src/interface/web/app/components/referencePanel/referencePanel.tsx b/src/interface/web/app/components/referencePanel/referencePanel.tsx
index fd8102d2..ee02104d 100644
--- a/src/interface/web/app/components/referencePanel/referencePanel.tsx
+++ b/src/interface/web/app/components/referencePanel/referencePanel.tsx
@@ -99,11 +99,16 @@ interface OnlineReferenceCardProps extends OnlineReferenceData {
}
function GenericOnlineReferenceCard(props: OnlineReferenceCardProps) {
+ const [isHovering, setIsHovering] = useState(false);
+
+ if (!props.link) {
+ console.log("invalid link", props);
+ return null;
+ }
+
const domain = new URL(props.link).hostname;
const favicon = `https://www.google.com/s2/favicons?domain=${domain}`;
- const [isHovering, setIsHovering] = useState(false);
-
const handleMouseEnter = () => {
console.log("mouse entered card");
setIsHovering(true);
diff --git a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
index e2c52d59..4a275527 100644
--- a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
+++ b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
@@ -10,22 +10,13 @@ import Link from "next/link";
import useSWR from "swr";
import Image from "next/image";
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
-
import {
Command,
- CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
- CommandSeparator,
- CommandShortcut,
} from "@/components/ui/command";
import { InlineLoading } from "../loading/loading";
@@ -553,7 +544,7 @@ function ChatSessionsModal({ data }: ChatSessionsModalProps) {