diff --git a/README.md b/README.md index 184eeb9..529a9df 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,6 @@ playwright install ``` ## Changelog - +- [x] **2025/01/26:** Thanks to @vvincent1234. Now browser-use-webui can combine with DeepSeek-r1 to engage in deep thinking! - [x] **2025/01/10:** Thanks to @casistack. Now we have Docker Setup option and also Support keep browser open between tasks.[Video tutorial demo](https://github.com/browser-use/web-ui/issues/1#issuecomment-2582511750). - [x] **2025/01/06:** Thanks to @richard-devbot. A New and Well-Designed WebUI is released. [Video tutorial demo](https://github.com/warmshao/browser-use-webui/issues/1#issuecomment-2573393113). \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py index 93fbe7f..e69de29 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: __init__.py.py diff --git a/src/agent/__init__.py b/src/agent/__init__.py index 93fbe7f..e69de29 100644 --- a/src/agent/__init__.py +++ b/src/agent/__init__.py @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: __init__.py.py diff --git a/src/agent/custom_agent.py b/src/agent/custom_agent.py index e501d0c..5cd0128 100644 --- a/src/agent/custom_agent.py +++ b/src/agent/custom_agent.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: custom_agent.py - import json import logging import pdb diff --git a/src/agent/custom_massage_manager.py b/src/agent/custom_massage_manager.py index c9ca432..f906300 100644 --- a/src/agent/custom_massage_manager.py +++ b/src/agent/custom_massage_manager.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: custom_massage_manager.py - from __future__ import annotations import logging diff --git a/src/agent/custom_prompts.py b/src/agent/custom_prompts.py index e9f1bd6..d32cce4 100644 --- a/src/agent/custom_prompts.py +++ b/src/agent/custom_prompts.py @@ -1,8 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: custom_prompts.py import pdb from typing import List, Optional diff --git a/src/agent/custom_views.py b/src/agent/custom_views.py index 78752ab..44272fb 100644 --- a/src/agent/custom_views.py +++ b/src/agent/custom_views.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: custom_views.py - from dataclasses import dataclass from typing import Type diff --git a/src/browser/__init__.py b/src/browser/__init__.py index 93fbe7f..e69de29 100644 --- a/src/browser/__init__.py +++ b/src/browser/__init__.py @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: __init__.py.py diff --git a/src/browser/config.py b/src/browser/config.py deleted file mode 100644 index 32329c4..0000000 --- a/src/browser/config.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/6 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: config.py - -import os -from dataclasses import dataclass -from typing import Optional - - -@dataclass -class BrowserPersistenceConfig: - """Configuration for browser persistence""" - - persistent_session: bool = False - user_data_dir: Optional[str] = None - debugging_port: Optional[int] = None - debugging_host: Optional[str] = None - - @classmethod - def from_env(cls) -> "BrowserPersistenceConfig": - """Create config from environment variables""" - return cls( - persistent_session=os.getenv("CHROME_PERSISTENT_SESSION", "").lower() - == "true", - user_data_dir=os.getenv("CHROME_USER_DATA"), - debugging_port=int(os.getenv("CHROME_DEBUGGING_PORT", "9222")), - debugging_host=os.getenv("CHROME_DEBUGGING_HOST", "localhost"), - ) \ No newline at end of file diff --git a/src/browser/custom_browser.py b/src/browser/custom_browser.py index 5f4943c..c624e25 100644 --- a/src/browser/custom_browser.py +++ b/src/browser/custom_browser.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: browser.py - import asyncio import pdb @@ -20,7 +14,6 @@ from browser_use.browser.context import BrowserContext, BrowserContextConfig from playwright.async_api import BrowserContext as PlaywrightBrowserContext import logging -from .config import BrowserPersistenceConfig from .custom_context import CustomBrowserContext logger = logging.getLogger(__name__) diff --git a/src/browser/custom_context.py b/src/browser/custom_context.py index 6de991b..aeafa68 100644 --- a/src/browser/custom_context.py +++ b/src/browser/custom_context.py @@ -1,10 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: context.py - import json import logging import os @@ -14,7 +7,6 @@ from browser_use.browser.context import BrowserContext, BrowserContextConfig from playwright.async_api import Browser as PlaywrightBrowser from playwright.async_api import BrowserContext as PlaywrightBrowserContext -from .config import BrowserPersistenceConfig logger = logging.getLogger(__name__) diff --git a/src/controller/__init__.py b/src/controller/__init__.py index b2eb1b3..e69de29 100644 --- a/src/controller/__init__.py +++ b/src/controller/__init__.py @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: __init__.py.py diff --git a/src/controller/custom_controller.py b/src/controller/custom_controller.py index 6e57dd4..957de89 100644 --- a/src/controller/custom_controller.py +++ b/src/controller/custom_controller.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: custom_action.py - import pyperclip from browser_use.agent.views import ActionResult from browser_use.browser.context import BrowserContext diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 93fbe7f..e69de29 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: __init__.py.py diff --git a/src/utils/utils.py b/src/utils/utils.py index 9c86b26..18ce403 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: utils.py import base64 import os import time diff --git a/tests/test_browser_use.py b/tests/test_browser_use.py index 7f4a65e..7df27d6 100644 --- a/tests/test_browser_use.py +++ b/tests/test_browser_use.py @@ -1,8 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @ProjectName: browser-use-webui -# @FileName: test_browser_use.py import pdb from dotenv import load_dotenv diff --git a/tests/test_llm_api.py b/tests/test_llm_api.py index bd52286..9738834 100644 --- a/tests/test_llm_api.py +++ b/tests/test_llm_api.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: test_llm_api.py import os import pdb diff --git a/tests/test_playwright.py b/tests/test_playwright.py index 40d8285..6704a02 100644 --- a/tests/test_playwright.py +++ b/tests/test_playwright.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/2 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: test_playwright.py import pdb from dotenv import load_dotenv diff --git a/webui.py b/webui.py index 2e3570b..59d09b0 100644 --- a/webui.py +++ b/webui.py @@ -1,10 +1,3 @@ -# -*- coding: utf-8 -*- -# @Time : 2025/1/1 -# @Author : wenshao -# @Email : wenshaoguo1026@gmail.com -# @Project : browser-use-webui -# @FileName: webui.py - import pdb import logging @@ -35,7 +28,6 @@ from src.utils import utils from src.agent.custom_agent import CustomAgent from src.browser.custom_browser import CustomBrowser from src.agent.custom_prompts import CustomSystemPrompt -from src.browser.config import BrowserPersistenceConfig from src.browser.custom_context import BrowserContextConfig, CustomBrowserContext from src.controller.custom_controller import CustomController from gradio.themes import Citrus, Default, Glass, Monochrome, Ocean, Origin, Soft, Base