From bba716d6b89aeb844ff4218e3c3b892a8eb50f82 Mon Sep 17 00:00:00 2001 From: Liuweiqing <121866954+14790897@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:27:34 +0800 Subject: [PATCH] init --- .env.production | 9 --------- components/QuillEditor.tsx | 26 +++++++++++++------------ components/ReferenceList.tsx | 37 ++++++++++++++++++++++++++++-------- utils/others/quillutils.ts | 19 +++++++++++++----- 4 files changed, 57 insertions(+), 34 deletions(-) diff --git a/.env.production b/.env.production index 8e694b2..e69de29 100644 --- a/.env.production +++ b/.env.production @@ -1,9 +0,0 @@ -# Update these with your Supabase details from your project settings > API -# https://app.supabase.com/project/_/settings/api -NEXT_PUBLIC_SUPABASE_URL=https://yidfukfbrluizjvfrrsj.supabase.co -NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlpZGZ1a2Zicmx1aXpqdmZycnNqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDQ4NjMyNjEsImV4cCI6MjAyMDQzOTI2MX0.EXIXAdNIGLFo5wHmwmY2-9bqLO9vyFYDvMMtCtkxgig -NEXT_PUBLIC_TINYMCE_API_KEY=e983nu390inks6be1wwlsrdxjebot3yc4pld7d44zs6vcrxr -NEXT_PUBLIC_OPENAI_API_KEY=sess-1CQMw0TDL0VZd9C1W3aGAZ6scffG32JJPcap7Re4 -NEXT_PUBLIC_SEMANTIC_API_KEY=hEQvK6ARe84dzDPcMnpzX4n9jfoqztkMfaftPWnb -NEXT_PUBLIC_AI_URL=https://chatgpt-api-proxy-private.14790897abc.workers.dev/v1/chat/completions -#"https://api.openai.com/v1/chat/completions" \ No newline at end of file diff --git a/components/QuillEditor.tsx b/components/QuillEditor.tsx index eef4893..dd5e8f4 100644 --- a/components/QuillEditor.tsx +++ b/components/QuillEditor.tsx @@ -148,7 +148,7 @@ const QEditor = () => { const newReferences = rawData.map((entry) => ({ url: entry.url, title: entry.title, - year: entry.published, + year: entry.year, author: entry.authors?.slice(0, 3).join(", "), venue: entry.venue, journal: entry.journal, @@ -174,15 +174,15 @@ const QEditor = () => { } // 插入论文信息 - const insertPapers = async (topic: string) => { - const rawData = await getArxivPapers(topic); - const dataString = rawData - .map((entry) => { - return `ID: ${entry.id}\nPublished: ${entry.published}\nTitle: ${entry.title}\nSummary: ${entry.summary}\n\n`; - }) - .join(""); - quill.insertText(quill.getLength(), dataString); - }; + // const insertPapers = async (topic: string) => { + // const rawData = await getArxivPapers(topic); + // const dataString = rawData + // .map((entry) => { + // return `ID: ${entry.id}\nPublished: ${entry.published}\nTitle: ${entry.title}\nSummary: ${entry.summary}\n\n`; + // }) + // .join(""); + // quill.insertText(quill.getLength(), dataString); + // }; return (
@@ -199,12 +199,12 @@ const QEditor = () => { > Insert AI Text */} - + */}