Skip to content

Commit f00561c

Browse files
base version
1 parent e9e4e97 commit f00561c

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

components/Reply.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEmails } from "@/lib/hooks/use-emails";
22
import { useState } from "react";
33
import { Button } from "./ui/button";
4-
import { CopilotTextarea } from "@copilotkit/react-textarea";
4+
import { Textarea } from "./ui/textarea";
55

66
export 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>

lib/hooks/use-emails.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createContext, useContext, useState, ReactNode } from "react";
22
import { Email } from "../emails.types";
33
import emailHistory from "./email-history.json";
4-
import { useCopilotReadable } from "@copilotkit/react-core";
54

65
type 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 }}

0 commit comments

Comments
 (0)