File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed
Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 11import { useEmails } from "@/lib/hooks/use-emails" ;
22import { useState } from "react" ;
33import { Button } from "./ui/button" ;
4- import { CopilotTextarea } from "@copilotkit/react- textarea" ;
4+ import { Textarea } from "./ui/ textarea" ;
55
66export function Reply ( ) {
77 const { sendEmail } = useEmails ( ) ;
@@ -17,16 +17,7 @@ export function Reply() {
1717
1818 return (
1919 < div className = "mt-4 pt-4 space-y-2 bg-background p-4 rounded-md border" >
20- < CopilotTextarea
21- className = "min-h-40 border h-40 p-2 overflow-hidden"
22- value = { input }
23- onChange = { ( e ) => setInput ( e . target . value ) }
24- placeholder = "Write your reply..."
25- autosuggestionsConfig = { {
26- textareaPurpose : `Asisst me in replying to this email thread. Remmeber all important details.` ,
27- chatApiConfigs : { }
28- } }
29- />
20+ < Textarea value = { input } onChange = { ( e ) => setInput ( e . target . value ) } />
3021 < Button disabled = { ! input } onClick = { handleReply } >
3122 Reply
3223 </ Button >
Original file line number Diff line number Diff line change 11import { createContext , useContext , useState , ReactNode } from "react" ;
22import { Email } from "../emails.types" ;
33import emailHistory from "./email-history.json" ;
4- import { useCopilotReadable } from "@copilotkit/react-core" ;
54
65type EmailsContextType = {
76 emails : Email [ ] ;
@@ -31,11 +30,6 @@ export const EmailsProvider = ({ children }: { children: ReactNode }) => {
3130 setEmails ( [ ...emails , email ] ) ;
3231 } ;
3332
34- useCopilotReadable ( {
35- description : "The history of this email thread" ,
36- value : emails
37- } ) ;
38-
3933 return (
4034 < EmailsContext . Provider
4135 value = { { emails, sendEmail } }
You can’t perform that action at this time.
0 commit comments