MAJOR REFACTOR (#494)

* move index to home folder, create state and context files and barrell folder

* Sanity Check Commit:  reducer added to home.tsx manual QA all working

* WIP: promptBar

* fix missing json parse on folders and prompts

* split context and add promptbar context

* add context to nested prompt componets and componetize Folder componet

* remove log

* Create buttons folder and componetize sidebar action button

* tidy up prompt handlers

* componetized sidebar

* added back chatbar componet to left side sidebar

* monster commit: Componetized the common code between chatbar and promptbar into new componet Sidebar and added context to both bars

* add useFetch service

* added prettier import sort to keep imports ordered and easier to indentify

* added react query and useFetch to work with RQ

* added apiService, errorService and reactQuery

* add callback and tidy up error service

* refactor chat and child componets to useContext

* fix extra calls and bad calls to mel endpoint

* minor import cleanup

---------

Co-authored-by: jc.durbin <jc.durbin@ardanis.com>
This commit is contained in:
Mckay Wrigley
2023-04-10 21:10:18 -06:00
committed by GitHub
parent 68c9cd4bd8
commit 6500db9c1c
128 changed files with 3666 additions and 3053 deletions
-6
View File
@@ -23,14 +23,8 @@
"click if using a .env.local file": ".env.local انقر إذا كنت تستخدم ملف",
"Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "حرفًا {{maxLength}} حد الرسالة هو {{valueLength}} لقد أدخلت ",
"Please enter a message": "يرجى إدخال رسالة",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI هي مجموعة متقدمة للدردشة تستخدم",
"Are you sure you want to clear all messages?": "هل أنت متأكد أنك تريد مسح كافة الرسائل؟"
+4 -4
View File
@@ -1,5 +1,5 @@
{
"Copy code": "نسخ الكود",
"Copied!": "تم النسخ!",
"Enter file name": "أدخل اسم الملف"
}
"Copy code": "نسخ الكود",
"Copied!": "تم النسخ!",
"Enter file name": "أدخل اسم الملف"
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "مطلب",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "محتوى المطلب. استخدم {{}} للإشارة إلى متغير. مثال: {{الاسم}} هي {{صفة}} {{اسم}}",
"Save": "حفظ"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "تصدير المحادثات",
"Dark mode": "الوضع الداكن",
"Light mode": "الوضع الفاتح"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "আলাপচারিতা এক্সপোর্ট",
"Dark mode": "ডার্ক মোড",
"Light mode": "লাইট মোড"
}
}
+1 -1
View File
@@ -25,4 +25,4 @@
"Please enter a message": "Bitte gib eine Nachricht ein",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI ist ein fortschrittliches Chatbot-Toolkit für OpenAI's Chat-Modelle, das darauf abzielt, die Benutzeroberfläche und Funktionalität von ChatGPT nachzuahmen.",
"Are you sure you want to clear all messages?": "Bist du sicher, dass du alle Nachrichten löschen möchtest?"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Konversationen exportieren",
"Dark mode": "Dark Mode",
"Light mode": "Light Mode"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Exportar conversaciones",
"Dark mode": "Modo oscuro",
"Light mode": "Modo claro"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Exporter les conversations",
"Dark mode": "Mode sombre",
"Light mode": "Mode clair"
}
}
+1 -1
View File
@@ -25,4 +25,4 @@
"Please enter a message": "הקלד את הודעתך",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "מערכת הצאטבוט היא ערכה מתקדמת לניהול שיחה המכוונת לחקות את המראה והפונקציונאלית של ChatGPT",
"Are you sure you want to clear all messages?": "האם אתה בטוח שברצונך למחוק את כל ההודעות?"
}
}
+1 -1
View File
@@ -1 +1 @@
{}
{}
+1 -1
View File
@@ -2,4 +2,4 @@
"Copy code": "העתק קוד",
"Copied!": "נשמר בזכרון",
"Enter file name": "הקלד שם לקובץ"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "ייצוא שיחות",
"Dark mode": "מצב כהה",
"Light mode": "מצב בהיר"
}
}
+27 -27
View File
@@ -1,28 +1,28 @@
{
"OpenAI API Key Required": "Memerlukan Kunci API OpenAI",
"Please set your OpenAI API key in the bottom left of the sidebar.": "Silakan atur kunci API OpenAI Anda di bagian kiri bawah bilah sisi.",
"Stop Generating": "Berhenti Menghasilkan",
"Prompt limit is {{maxLength}} characters": "Batas karakter untuk prompt adalah {{maxLength}} karakter",
"System Prompt": "Prompt Sistem",
"You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.": "Anda adalah ChatGPT, model bahasa besar yang dilatih oleh OpenAI. Ikuti instruksi pengguna dengan hati-hati. Balas menggunakan markdown.",
"Enter a prompt": "Masukkan sebuah prompt",
"Regenerate response": "Hasilkan kembali respons",
"Sorry, there was an error.": "Maaf, terjadi kesalahan.",
"Model": "Model",
"Conversation": "Percakapan",
"OR": "ATAU",
"Loading...": "Memuat...",
"Type a message...": "Ketik sebuah pesan...",
"Error fetching models.": "Kesalahan dalam mengambil model.",
"AI": "AI",
"You": "Anda",
"Cancel": "Cancel",
"Save & Submit": "Save & Submit",
"Make sure your OpenAI API key is set in the bottom left of the sidebar.": "Pastikan kunci API OpenAI Anda diatur di bagian kiri bawah bilah sisi.",
"If you completed this step, OpenAI may be experiencing issues.": "Jika Anda telah menyelesaikan langkah ini, OpenAI mungkin mengalami masalah.",
"click if using a .env.local file": "klik jika menggunakan file .env.local",
"Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Batas karakter untuk pesan adalah {{maxLength}} karakter. Anda telah memasukkan {{valueLength}} karakter.",
"Please enter a message": "Silakan masukkan sebuah pesan",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI adalah kit chatbot canggih untuk model obrolan OpenAI yang bertujuan meniru antarmuka dan fungsionalitas ChatGPT.",
"Are you sure you want to clear all messages?": "Apakah Anda yakin ingin menghapus semua pesan?"
}
"OpenAI API Key Required": "Memerlukan Kunci API OpenAI",
"Please set your OpenAI API key in the bottom left of the sidebar.": "Silakan atur kunci API OpenAI Anda di bagian kiri bawah bilah sisi.",
"Stop Generating": "Berhenti Menghasilkan",
"Prompt limit is {{maxLength}} characters": "Batas karakter untuk prompt adalah {{maxLength}} karakter",
"System Prompt": "Prompt Sistem",
"You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.": "Anda adalah ChatGPT, model bahasa besar yang dilatih oleh OpenAI. Ikuti instruksi pengguna dengan hati-hati. Balas menggunakan markdown.",
"Enter a prompt": "Masukkan sebuah prompt",
"Regenerate response": "Hasilkan kembali respons",
"Sorry, there was an error.": "Maaf, terjadi kesalahan.",
"Model": "Model",
"Conversation": "Percakapan",
"OR": "ATAU",
"Loading...": "Memuat...",
"Type a message...": "Ketik sebuah pesan...",
"Error fetching models.": "Kesalahan dalam mengambil model.",
"AI": "AI",
"You": "Anda",
"Cancel": "Cancel",
"Save & Submit": "Save & Submit",
"Make sure your OpenAI API key is set in the bottom left of the sidebar.": "Pastikan kunci API OpenAI Anda diatur di bagian kiri bawah bilah sisi.",
"If you completed this step, OpenAI may be experiencing issues.": "Jika Anda telah menyelesaikan langkah ini, OpenAI mungkin mengalami masalah.",
"click if using a .env.local file": "klik jika menggunakan file .env.local",
"Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Batas karakter untuk pesan adalah {{maxLength}} karakter. Anda telah memasukkan {{valueLength}} karakter.",
"Please enter a message": "Silakan masukkan sebuah pesan",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI adalah kit chatbot canggih untuk model obrolan OpenAI yang bertujuan meniru antarmuka dan fungsionalitas ChatGPT.",
"Are you sure you want to clear all messages?": "Apakah Anda yakin ingin menghapus semua pesan?"
}
+1 -1
View File
@@ -1 +1 @@
{}
{}
+4 -4
View File
@@ -1,5 +1,5 @@
{
"Copy code": "Salin kode",
"Copied!": "Kode disalin!",
"Enter file name": "Masukkan nama file"
}
"Copy code": "Salin kode",
"Copied!": "Kode disalin!",
"Enter file name": "Masukkan nama file"
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Ekspor percakapan",
"Dark mode": "Mode gelap",
"Light mode": "Mode terang"
}
}
+1 -1
View File
@@ -25,4 +25,4 @@
"Please enter a message": "メッセージを入力してください",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UIは、ChatGPTと同様のインターフェイスと機能を実現するための、チャットボットキットです。",
"Are you sure you want to clear all messages?": "すべてのメッセージを削除してもよろしいですか?"
}
}
+1 -1
View File
@@ -1 +1 @@
{}
{}
+1 -1
View File
@@ -2,4 +2,4 @@
"Copy code": "コードをコピー",
"Copied!": "コピーしました!",
"Enter file name": "ファイル名を入力"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "会話履歴をエクスポート",
"Dark mode": "ダークモード",
"Light mode": "ライトモード"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "대화 내보내기",
"Dark mode": "다크 모드",
"Light mode": "라이트 모드"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Exportar conversas",
"Dark mode": "Modo escuro",
"Light mode": "Modo claro"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Экспортировать чаты",
"Dark mode": "Темный режим",
"Light mode": "Светлый режим"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "සංවාද නිර්යාත කරන්න",
"Dark mode": "අඳුරු මාදිලිය",
"Light mode": "ආලෝක මාදිලිය"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt-innehåll. Använd {{}} för att beteckna en variabel. Ex: {{namn}} är ett {{adjektiv}} {{substantiv}}",
"Save": "Spara"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Exportera konversationer",
"Dark mode": "Mörkt läge",
"Light mode": "Ljust läge"
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
"Prompt": "Prompt",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}",
"Save": "Save"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "సంభాషణలు ఎగుమతి చేయండి",
"Dark mode": "డార్క్ మోడ్",
"Light mode": "లైట్ మోడ్"
}
}
+1 -1
View File
@@ -1 +1 @@
{}
{}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "Xuất dữ liệu hội thoại",
"Dark mode": "Chế độ tối",
"Light mode": "Chế độ sáng"
}
}
+1 -1
View File
@@ -26,4 +26,4 @@
"Please enter a message": "请输入一条消息",
"Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI 是一个高级聊天机器人工具包,旨在模仿 OpenAI 聊天模型的 ChatGPT 界面和功能。",
"Are you sure you want to clear all messages?": "你确定要清除所有的消息吗?"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Prompt": "提示词",
"Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "提示内容。使用 {{}} 表示一个变量。例如:{{name}} 是一个 {{adjective}} {{noun}}",
"Save": "保存"
}
}
+1 -1
View File
@@ -10,4 +10,4 @@
"Export data": "导出对话",
"Dark mode": "深色模式",
"Light mode": "浅色模式"
}
}