mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-08-14 19:58:44 +00:00
feat:add copilotEnabled and setCopilotEnabled to ChatWindow
This commit is contained in:
@ -1,14 +1,15 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ArrowUp } from 'lucide-react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import {cn} from '@/lib/utils';
|
||||
import {ArrowUp} from 'lucide-react';
|
||||
import {useEffect, useRef, useState} from 'react';
|
||||
import TextareaAutosize from 'react-textarea-autosize';
|
||||
import Attach from './MessageInputActions/Attach';
|
||||
import CopilotToggle from './MessageInputActions/Copilot';
|
||||
import { File } from './ChatWindow';
|
||||
import {File} from './ChatWindow';
|
||||
import AttachSmall from './MessageInputActions/AttachSmall';
|
||||
|
||||
const MessageInput = ({
|
||||
sendMessage,
|
||||
copilotEnabled,
|
||||
setCopilotEnabled,
|
||||
loading,
|
||||
fileIds,
|
||||
setFileIds,
|
||||
@ -16,13 +17,14 @@ const MessageInput = ({
|
||||
setFiles,
|
||||
}: {
|
||||
sendMessage: (message: string) => void;
|
||||
copilotEnabled: boolean;
|
||||
setCopilotEnabled: (enable: boolean) => void;
|
||||
loading: boolean;
|
||||
fileIds: string[];
|
||||
setFileIds: (fileIds: string[]) => void;
|
||||
files: File[];
|
||||
setFiles: (files: File[]) => void;
|
||||
}) => {
|
||||
const [copilotEnabled, setCopilotEnabled] = useState(false);
|
||||
const [message, setMessage] = useState('');
|
||||
const [textareaRows, setTextareaRows] = useState(1);
|
||||
const [mode, setMode] = useState<'multi' | 'single'>('single');
|
||||
|
Reference in New Issue
Block a user