From 97bc5fa39b9fc9e277d5a0ca1ded80dd68563132 Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Thu, 1 Feb 2024 13:55:37 -0800 Subject: [PATCH] rename to embed folder --- {embedded-app => embed}/.gitignore | 0 embed/README.md | 3 +++ {embedded-app => embed}/index.html | 0 {embedded-app => embed}/jsconfig.json | 0 {embedded-app => embed}/package.json | 3 +-- {embedded-app => embed}/src/App.jsx | 0 .../src/assets/anything-llm-dark.png | Bin .../ChatHistory/HistoricalMessage/Actions/index.jsx | 0 .../ChatHistory/HistoricalMessage/index.jsx | 0 .../ChatContainer/ChatHistory/PromptReply/index.jsx | 0 .../ChatWindow/ChatContainer/ChatHistory/index.jsx | 0 .../ChatWindow/ChatContainer/PromptInput/index.jsx | 0 .../components/ChatWindow/ChatContainer/index.jsx | 0 .../src/components/ChatWindow/Header/index.jsx | 0 .../src/components/ChatWindow/index.jsx | 0 {embedded-app => embed}/src/components/Head.jsx | 0 .../src/components/OpenButton/index.jsx | 0 .../src/components/SessionId/index.jsx | 0 .../src/hooks/chat/useChatHistory.js | 0 {embedded-app => embed}/src/hooks/useOpen.js | 0 .../src/hooks/useScriptAttributes.js | 0 {embedded-app => embed}/src/hooks/useSessionId.js | 0 {embedded-app => embed}/src/main.jsx | 0 {embedded-app => embed}/src/models/chatService.js | 0 .../src/static/tailwind@3.4.1.js | 0 {embedded-app => embed}/src/utils/chat/index.js | 0 {embedded-app => embed}/src/utils/chat/markdown.js | 0 {embedded-app => embed}/src/utils/constants.js | 0 {embedded-app => embed}/vite.config.js | 5 ++++- {embedded-app => embed}/yarn.lock | 0 embedded-app/README.md | 8 -------- embedded-app/tailwind.config.js | 9 --------- 32 files changed, 8 insertions(+), 20 deletions(-) rename {embedded-app => embed}/.gitignore (100%) create mode 100644 embed/README.md rename {embedded-app => embed}/index.html (100%) rename {embedded-app => embed}/jsconfig.json (100%) rename {embedded-app => embed}/package.json (96%) rename {embedded-app => embed}/src/App.jsx (100%) rename {embedded-app => embed}/src/assets/anything-llm-dark.png (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/ChatContainer/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/Header/index.jsx (100%) rename {embedded-app => embed}/src/components/ChatWindow/index.jsx (100%) rename {embedded-app => embed}/src/components/Head.jsx (100%) rename {embedded-app => embed}/src/components/OpenButton/index.jsx (100%) rename {embedded-app => embed}/src/components/SessionId/index.jsx (100%) rename {embedded-app => embed}/src/hooks/chat/useChatHistory.js (100%) rename {embedded-app => embed}/src/hooks/useOpen.js (100%) rename {embedded-app => embed}/src/hooks/useScriptAttributes.js (100%) rename {embedded-app => embed}/src/hooks/useSessionId.js (100%) rename {embedded-app => embed}/src/main.jsx (100%) rename {embedded-app => embed}/src/models/chatService.js (100%) rename {embedded-app => embed}/src/static/tailwind@3.4.1.js (100%) rename {embedded-app => embed}/src/utils/chat/index.js (100%) rename {embedded-app => embed}/src/utils/chat/markdown.js (100%) rename {embedded-app => embed}/src/utils/constants.js (100%) rename {embedded-app => embed}/vite.config.js (89%) rename {embedded-app => embed}/yarn.lock (100%) delete mode 100644 embedded-app/README.md delete mode 100644 embedded-app/tailwind.config.js diff --git a/embedded-app/.gitignore b/embed/.gitignore similarity index 100% rename from embedded-app/.gitignore rename to embed/.gitignore diff --git a/embed/README.md b/embed/README.md new file mode 100644 index 00000000..38ee480a --- /dev/null +++ b/embed/README.md @@ -0,0 +1,3 @@ +# AnythingLLM Embedded Mode + +This folder of AnythingLLM contains the source code for how the embedded version of AnythingLLM works to provide a public facing interface of your workspace. \ No newline at end of file diff --git a/embedded-app/index.html b/embed/index.html similarity index 100% rename from embedded-app/index.html rename to embed/index.html diff --git a/embedded-app/jsconfig.json b/embed/jsconfig.json similarity index 100% rename from embedded-app/jsconfig.json rename to embed/jsconfig.json diff --git a/embedded-app/package.json b/embed/package.json similarity index 96% rename from embedded-app/package.json rename to embed/package.json index 2bcff424..68830285 100644 --- a/embedded-app/package.json +++ b/embed/package.json @@ -1,7 +1,6 @@ { - "name": "embedded-app", + "name": "anythingllm-embedded-chat", "private": true, - "version": "0.0.0", "type": "module", "scripts": { "dev": "nodemon -e js,jsx,css --watch src --exec \"yarn run dev:preview\"", diff --git a/embedded-app/src/App.jsx b/embed/src/App.jsx similarity index 100% rename from embedded-app/src/App.jsx rename to embed/src/App.jsx diff --git a/embedded-app/src/assets/anything-llm-dark.png b/embed/src/assets/anything-llm-dark.png similarity index 100% rename from embedded-app/src/assets/anything-llm-dark.png rename to embed/src/assets/anything-llm-dark.png diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx b/embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx b/embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx b/embed/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx b/embed/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx b/embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx diff --git a/embedded-app/src/components/ChatWindow/ChatContainer/index.jsx b/embed/src/components/ChatWindow/ChatContainer/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/ChatContainer/index.jsx rename to embed/src/components/ChatWindow/ChatContainer/index.jsx diff --git a/embedded-app/src/components/ChatWindow/Header/index.jsx b/embed/src/components/ChatWindow/Header/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/Header/index.jsx rename to embed/src/components/ChatWindow/Header/index.jsx diff --git a/embedded-app/src/components/ChatWindow/index.jsx b/embed/src/components/ChatWindow/index.jsx similarity index 100% rename from embedded-app/src/components/ChatWindow/index.jsx rename to embed/src/components/ChatWindow/index.jsx diff --git a/embedded-app/src/components/Head.jsx b/embed/src/components/Head.jsx similarity index 100% rename from embedded-app/src/components/Head.jsx rename to embed/src/components/Head.jsx diff --git a/embedded-app/src/components/OpenButton/index.jsx b/embed/src/components/OpenButton/index.jsx similarity index 100% rename from embedded-app/src/components/OpenButton/index.jsx rename to embed/src/components/OpenButton/index.jsx diff --git a/embedded-app/src/components/SessionId/index.jsx b/embed/src/components/SessionId/index.jsx similarity index 100% rename from embedded-app/src/components/SessionId/index.jsx rename to embed/src/components/SessionId/index.jsx diff --git a/embedded-app/src/hooks/chat/useChatHistory.js b/embed/src/hooks/chat/useChatHistory.js similarity index 100% rename from embedded-app/src/hooks/chat/useChatHistory.js rename to embed/src/hooks/chat/useChatHistory.js diff --git a/embedded-app/src/hooks/useOpen.js b/embed/src/hooks/useOpen.js similarity index 100% rename from embedded-app/src/hooks/useOpen.js rename to embed/src/hooks/useOpen.js diff --git a/embedded-app/src/hooks/useScriptAttributes.js b/embed/src/hooks/useScriptAttributes.js similarity index 100% rename from embedded-app/src/hooks/useScriptAttributes.js rename to embed/src/hooks/useScriptAttributes.js diff --git a/embedded-app/src/hooks/useSessionId.js b/embed/src/hooks/useSessionId.js similarity index 100% rename from embedded-app/src/hooks/useSessionId.js rename to embed/src/hooks/useSessionId.js diff --git a/embedded-app/src/main.jsx b/embed/src/main.jsx similarity index 100% rename from embedded-app/src/main.jsx rename to embed/src/main.jsx diff --git a/embedded-app/src/models/chatService.js b/embed/src/models/chatService.js similarity index 100% rename from embedded-app/src/models/chatService.js rename to embed/src/models/chatService.js diff --git a/embedded-app/src/static/tailwind@3.4.1.js b/embed/src/static/tailwind@3.4.1.js similarity index 100% rename from embedded-app/src/static/tailwind@3.4.1.js rename to embed/src/static/tailwind@3.4.1.js diff --git a/embedded-app/src/utils/chat/index.js b/embed/src/utils/chat/index.js similarity index 100% rename from embedded-app/src/utils/chat/index.js rename to embed/src/utils/chat/index.js diff --git a/embedded-app/src/utils/chat/markdown.js b/embed/src/utils/chat/markdown.js similarity index 100% rename from embedded-app/src/utils/chat/markdown.js rename to embed/src/utils/chat/markdown.js diff --git a/embedded-app/src/utils/constants.js b/embed/src/utils/constants.js similarity index 100% rename from embedded-app/src/utils/constants.js rename to embed/src/utils/constants.js diff --git a/embedded-app/vite.config.js b/embed/vite.config.js similarity index 89% rename from embedded-app/vite.config.js rename to embed/vite.config.js index 3391f774..c9b1e0b5 100644 --- a/embedded-app/vite.config.js +++ b/embed/vite.config.js @@ -36,7 +36,10 @@ export default defineConfig({ fileName: (format) => `embedded-anything-llm.${format}.js` }, rollupOptions: { - external: [] + external: [ + // Reduces transformation time by 50% and we don't even use this variant, so we can ignore. + /@phosphor-icons\/react\/dist\/ssr/, + ] }, commonjsOptions: { transformMixedEsModules: true diff --git a/embedded-app/yarn.lock b/embed/yarn.lock similarity index 100% rename from embedded-app/yarn.lock rename to embed/yarn.lock diff --git a/embedded-app/README.md b/embedded-app/README.md deleted file mode 100644 index f768e33f..00000000 --- a/embedded-app/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh diff --git a/embedded-app/tailwind.config.js b/embedded-app/tailwind.config.js deleted file mode 100644 index 6dc94c5e..00000000 --- a/embedded-app/tailwind.config.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -export default { - content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"], - theme: { - extend: {}, - }, - plugins: [], -} -