diff --git a/sandbox/sandbox_spec.md b/agent/sandbox/sandbox_spec.md similarity index 100% rename from sandbox/sandbox_spec.md rename to agent/sandbox/sandbox_spec.md diff --git a/intergrations/extension_chrome/README.md b/intergrations/extension_chrome/README.md deleted file mode 100644 index 63221b026c..0000000000 --- a/intergrations/extension_chrome/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Chrome Extension -``` -chrome-extension/ -│ -├── manifest.json         # Main configuration file for the extension -├── popup.html          # Main user interface of the extension -├── popup.js            # Script for the main interface -├── background.js       # Background script for the extension -├── content.js          # Script to interact with web pages -├── styles/ -│   └── popup.css       # CSS file for the popup -├── icons/ -│   ├── icon16.png      # 16x16 pixel icon -│   ├── icon48.png      # 48x48 pixel icon -│   └── icon128.png     # 128x128 pixel icon -├── assets/ -│   └── ...             # Directory for other assets (images, fonts, etc.) -├── scripts/ -│   ├── utils.js        # File containing utility functions -│   └── api.js          # File containing API call logic -└── README.md           # Instructions for using and installing the extension -``` - -# Installation -1. Open chrome://extensions/. -2. Enable Developer mode. -3. Click Load unpacked and select the project directory. -# Features -1. Interact with web pages. -2. Run in the background to handle logic. -# Usage -- Click the extension icon in the toolbar. -- Follow the instructions in the interface. -# Additional Notes -- **manifest.json**: This file is crucial as it defines the extension's metadata, permissions, and entry points. -- **background.js**: This script runs independently of any web page and can perform tasks such as listening for browser events, making network requests, and storing data. -- **content.js**: This script injects code into web pages to manipulate the DOM, modify styles, or communicate with the background script. -- **popup.html/popup.js**: These files create the popup that appears when the user clicks the extension icon. -icons: These icons are used to represent the extension in the browser's UI. -More Detailed Explanation -- **manifest.json**: Specifies the extension's name, version, permissions, and other details. It also defines the entry points for the background script, content scripts, and the popup. -- **background.js**: Handles tasks that need to run continuously, such as syncing data, listening for browser events, or controlling the extension's behavior. -- **content.js**: Interacts directly with the web page's DOM, allowing you to modify the content, style, or behavior of the page. -- **popup.html/popup.js**: Creates a user interface that allows users to interact with the extension. -Other files: These files can contain additional scripts, styles, or assets that are used by the extension. diff --git a/intergrations/extension_chrome/assets/logo-with-text.png b/intergrations/extension_chrome/assets/logo-with-text.png deleted file mode 100644 index b55b5e0422..0000000000 Binary files a/intergrations/extension_chrome/assets/logo-with-text.png and /dev/null differ diff --git a/intergrations/extension_chrome/assets/logo.png b/intergrations/extension_chrome/assets/logo.png deleted file mode 100644 index 6591b28da0..0000000000 Binary files a/intergrations/extension_chrome/assets/logo.png and /dev/null differ diff --git a/intergrations/extension_chrome/assets/logo.svg b/intergrations/extension_chrome/assets/logo.svg deleted file mode 100644 index 54167d2fb3..0000000000 --- a/intergrations/extension_chrome/assets/logo.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/intergrations/extension_chrome/background.js b/intergrations/extension_chrome/background.js deleted file mode 100644 index 3ed9644c2e..0000000000 --- a/intergrations/extension_chrome/background.js +++ /dev/null @@ -1,17 +0,0 @@ -chrome.runtime.onInstalled.addListener(() => { - console.log("Tiện ích đã được cài đặt!"); -}); - -chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - if (message.action === "PAGE_INFO") { - console.log( message); - - - chrome.storage.local.set({ pageInfo: message }, () => { - console.log("Page info saved to local storage."); - }); - - // Send a response to the content script - sendResponse({ status: "success", message: "Page info received and processed." }); - } -}); \ No newline at end of file diff --git a/intergrations/extension_chrome/content.js b/intergrations/extension_chrome/content.js deleted file mode 100644 index b77c968dfa..0000000000 --- a/intergrations/extension_chrome/content.js +++ /dev/null @@ -1,68 +0,0 @@ -(function () { - const extractElementData = (el) => { - const tag = el.tagName.toLowerCase(); - if ( - tag === "input" && - el.name !== "DXScript" && - el.name !== "DXMVCEditorsValues" && - el.name !== "DXCss" - ) { - return { - type: "input", - name: el.name, - value: - el.type === "checkbox" || el.type === "radio" - ? el.checked - ? el.value - : null - : el.value, - }; - } else if (tag === "select") { - const selectedOption = el.querySelector("option:checked"); - return { - type: "select", - name: el.name, - value: selectedOption ? selectedOption.value : null, - }; - } else if (tag.startsWith("h") && el.textContent.trim()) { - return { type: "header", tag, content: el.textContent.trim() }; - } else if ( - ["label", "span", "p", "b", "strong"].includes(tag) && - el.textContent.trim() - ) { - return { type: tag, content: el.textContent.trim() }; - } - }; - - const getElementValues = (els) => - Array.from(els).map(extractElementData).filter(Boolean); - - const getIframeInputValues = (iframe) => { - try { - const iframeDoc = iframe.contentWindow.document; - return getElementValues( - iframeDoc.querySelectorAll("input, select, header, label, span, p") - ); - } catch (e) { - console.error("Can't access iframe:", e); - return []; - } - }; - - const inputValues = getElementValues( - document.querySelectorAll("input, select, header, label, span, p") - ); - const iframeInputValues = Array.from(document.querySelectorAll("iframe")).map( - getIframeInputValues - ); - - return ` - ## input values\n - \`\`\`json\n - ${JSON.stringify(inputValues)}\n - \`\`\`\n - ## iframe input values\n - \`\`\`json\n - ${JSON.stringify(iframeInputValues)}\n - \`\`\``; -})(); diff --git a/intergrations/extension_chrome/icons/icon-128x128.png b/intergrations/extension_chrome/icons/icon-128x128.png deleted file mode 100644 index 500b27a1d9..0000000000 Binary files a/intergrations/extension_chrome/icons/icon-128x128.png and /dev/null differ diff --git a/intergrations/extension_chrome/icons/icon-16x16.png b/intergrations/extension_chrome/icons/icon-16x16.png deleted file mode 100644 index 817f811e09..0000000000 Binary files a/intergrations/extension_chrome/icons/icon-16x16.png and /dev/null differ diff --git a/intergrations/extension_chrome/icons/icon-48x48.png b/intergrations/extension_chrome/icons/icon-48x48.png deleted file mode 100644 index 90946676dd..0000000000 Binary files a/intergrations/extension_chrome/icons/icon-48x48.png and /dev/null differ diff --git a/intergrations/extension_chrome/manifest.json b/intergrations/extension_chrome/manifest.json deleted file mode 100644 index e30b89c73a..0000000000 --- a/intergrations/extension_chrome/manifest.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "manifest_version": 3, - "name": "Ragflow Extension", - "description": "Ragflow for Chrome", - "version": "1.0", - "options_page": "options.html", - - "permissions": ["activeTab", "scripting", "storage"], - "background": { - "service_worker": "background.js" - }, - - "action": { - "default_popup": "popup.html", - "default_icon": { - "16": "icons/icon-16x16.png", - "48": "icons/icon-48x48.png", - "128": "icons/icon-128x128.png" - } - }, - - "content_scripts": [ - { - "matches": [""], - "js": ["content.js"], - "css": ["styles/popup.css"] - } - ], - "icons": { - "16": "icons/icon-16x16.png", - "48": "icons/icon-48x48.png", - "128": "icons/icon-128x128.png" - } -} diff --git a/intergrations/extension_chrome/options.html b/intergrations/extension_chrome/options.html deleted file mode 100644 index b39625a760..0000000000 --- a/intergrations/extension_chrome/options.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - RagFlow option - - - - -
-
- -
-
- - - - - - - - - - - - - - -
-
- - - - \ No newline at end of file diff --git a/intergrations/extension_chrome/options.js b/intergrations/extension_chrome/options.js deleted file mode 100644 index d72a942d5f..0000000000 --- a/intergrations/extension_chrome/options.js +++ /dev/null @@ -1,36 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - - chrome.storage.sync.get(["baseURL", "from", "auth", "sharedID"], (result) => { - if (result.baseURL) { - document.getElementById("base-url").value = result.baseURL; - } - if (result.from) { - document.getElementById("from").value = result.from; - } - if (result.auth) { - document.getElementById("auth").value = result.auth; - } - if (result.sharedID) { - document.getElementById("shared-id").value = result.sharedID; - } - }); - - document.getElementById("save-config").addEventListener("click", () => { - const baseURL = document.getElementById("base-url").value; - const from = document.getElementById("from").value; - const auth = document.getElementById("auth").value; - const sharedID = document.getElementById("shared-id").value; - - chrome.storage.sync.set( - { - baseURL: baseURL, - from: from, - auth: auth, - sharedID: sharedID, - }, - () => { - alert("Successfully saved"); - } - ); - }); -}); diff --git a/intergrations/extension_chrome/popup.html b/intergrations/extension_chrome/popup.html deleted file mode 100644 index c69d01053e..0000000000 --- a/intergrations/extension_chrome/popup.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - RAGFLOW - - - - -
- - -
- - - - \ No newline at end of file diff --git a/intergrations/extension_chrome/popup.js b/intergrations/extension_chrome/popup.js deleted file mode 100644 index 0a8bdaba0a..0000000000 --- a/intergrations/extension_chrome/popup.js +++ /dev/null @@ -1,24 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - chrome.storage.sync.get(["baseURL", "from", "auth", "sharedID"], (result) => { - if (result.baseURL && result.sharedID && result.from && result.auth) { - const iframeSrc = `${result.baseURL}chat/share?shared_id=${result.sharedID}&from=${result.from}&auth=${result.auth}`; - const iframe = document.querySelector("iframe"); - iframe.src = iframeSrc; - } - }); - chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { - chrome.scripting.executeScript( - { - target: { tabId: tabs[0].id }, - files: ["content.js"], - }, - (results) => { - if (results && results[0]) { - const getHtml = document.getElementById("getHtml"); - getHtml.value = results[0].result; - - } - } - ); - }); -}); diff --git a/intergrations/extension_chrome/styles/options.css b/intergrations/extension_chrome/styles/options.css deleted file mode 100644 index 1e3ded6751..0000000000 --- a/intergrations/extension_chrome/styles/options.css +++ /dev/null @@ -1,91 +0,0 @@ -#ragflow { - font-family: "Segoe UI", Arial, sans-serif; - margin: 0; - padding: 0; - display: flex; - justify-content: center; - align-items: center; - height: 600px; -} - -#ragflow .window { - display: flex; - flex-direction: column; - justify-content: space-between; - flex: 1; - overflow: hidden; -} -#ragflow #form-config { - background-color: #fff; - box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); - display: flex; - flex-direction: column; - justify-content: space-between; - overflow: hidden; -} - -#ragflow .header { - background-color: #fff; - padding: 4px; - display: flex; - justify-content: space-between; - align-items: center; - flex-direction: row; -} - -#ragflow .header .title { - font-size: 16px; -} - -#ragflow .header .logo { - width: 100px; /* Adjust size as needed */ - height: auto; - margin-right: 10px; -} - -#ragflow .content { - padding: 20px; - display: flex; - flex-direction: column; - justify-content: space-between; -} - -#ragflow label { - font-weight: bold; - margin-bottom: 5px; -} - -#ragflow input, -#ragflow select { - width: 100%; - padding: 8px; - margin-bottom: 15px; - border: 1px solid #ccc; - border-radius: 5px; - box-sizing: border-box; -} - -#ragflow button { - background-color: #0078d4; - color: #fff; - padding: 10px; - border: none; - border-radius: 5px; - cursor: pointer; - font-size: 14px; -} - -#ragflow button:hover { - background-color: #005bb5; -} - -#ragflow #config-button { - display: flex; - position: absolute; - top: 2px; - right: 2px; - font-size: 22px; -} -#ragflow #config-button:hover { - cursor: pointer; -} diff --git a/intergrations/extension_chrome/styles/popup.css b/intergrations/extension_chrome/styles/popup.css deleted file mode 100644 index 90134f8ad9..0000000000 --- a/intergrations/extension_chrome/styles/popup.css +++ /dev/null @@ -1,20 +0,0 @@ -#ragflow { - font-family: "Segoe UI", Arial, sans-serif; - margin: 0; - padding: 0; - display: flex; - justify-content: center; - align-items: center; - width: 320px; -} - -#ragflow .window { - display: flex; - flex-direction: column; - justify-content: space-between; - flex: 1; - overflow: hidden; -} -#ragflow #output { - position: absolute; -} \ No newline at end of file diff --git a/intergrations/chatgpt-on-wechat/plugins/README.md b/tools/chatgpt-on-wechat/plugins/README.md similarity index 100% rename from intergrations/chatgpt-on-wechat/plugins/README.md rename to tools/chatgpt-on-wechat/plugins/README.md diff --git a/intergrations/chatgpt-on-wechat/plugins/__init__.py b/tools/chatgpt-on-wechat/plugins/__init__.py similarity index 100% rename from intergrations/chatgpt-on-wechat/plugins/__init__.py rename to tools/chatgpt-on-wechat/plugins/__init__.py diff --git a/intergrations/chatgpt-on-wechat/plugins/config.json b/tools/chatgpt-on-wechat/plugins/config.json similarity index 100% rename from intergrations/chatgpt-on-wechat/plugins/config.json rename to tools/chatgpt-on-wechat/plugins/config.json diff --git a/intergrations/chatgpt-on-wechat/plugins/ragflow_chat.py b/tools/chatgpt-on-wechat/plugins/ragflow_chat.py similarity index 100% rename from intergrations/chatgpt-on-wechat/plugins/ragflow_chat.py rename to tools/chatgpt-on-wechat/plugins/ragflow_chat.py diff --git a/intergrations/chatgpt-on-wechat/plugins/requirements.txt b/tools/chatgpt-on-wechat/plugins/requirements.txt similarity index 100% rename from intergrations/chatgpt-on-wechat/plugins/requirements.txt rename to tools/chatgpt-on-wechat/plugins/requirements.txt diff --git a/intergrations/firecrawl/INSTALLATION.md b/tools/firecrawl/INSTALLATION.md similarity index 100% rename from intergrations/firecrawl/INSTALLATION.md rename to tools/firecrawl/INSTALLATION.md diff --git a/intergrations/firecrawl/README.md b/tools/firecrawl/README.md similarity index 100% rename from intergrations/firecrawl/README.md rename to tools/firecrawl/README.md diff --git a/intergrations/firecrawl/__init__.py b/tools/firecrawl/__init__.py similarity index 100% rename from intergrations/firecrawl/__init__.py rename to tools/firecrawl/__init__.py diff --git a/intergrations/firecrawl/example_usage.py b/tools/firecrawl/example_usage.py similarity index 100% rename from intergrations/firecrawl/example_usage.py rename to tools/firecrawl/example_usage.py diff --git a/intergrations/firecrawl/firecrawl_config.py b/tools/firecrawl/firecrawl_config.py similarity index 100% rename from intergrations/firecrawl/firecrawl_config.py rename to tools/firecrawl/firecrawl_config.py diff --git a/intergrations/firecrawl/firecrawl_connector.py b/tools/firecrawl/firecrawl_connector.py similarity index 100% rename from intergrations/firecrawl/firecrawl_connector.py rename to tools/firecrawl/firecrawl_connector.py diff --git a/intergrations/firecrawl/firecrawl_processor.py b/tools/firecrawl/firecrawl_processor.py similarity index 100% rename from intergrations/firecrawl/firecrawl_processor.py rename to tools/firecrawl/firecrawl_processor.py diff --git a/intergrations/firecrawl/firecrawl_ui.py b/tools/firecrawl/firecrawl_ui.py similarity index 100% rename from intergrations/firecrawl/firecrawl_ui.py rename to tools/firecrawl/firecrawl_ui.py diff --git a/intergrations/firecrawl/integration.py b/tools/firecrawl/integration.py similarity index 100% rename from intergrations/firecrawl/integration.py rename to tools/firecrawl/integration.py diff --git a/intergrations/firecrawl/ragflow_integration.py b/tools/firecrawl/ragflow_integration.py similarity index 100% rename from intergrations/firecrawl/ragflow_integration.py rename to tools/firecrawl/ragflow_integration.py diff --git a/intergrations/firecrawl/requirements.txt b/tools/firecrawl/requirements.txt similarity index 100% rename from intergrations/firecrawl/requirements.txt rename to tools/firecrawl/requirements.txt