browse-code 0.2.2__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {browse_code-0.2.2 → browse_code-0.2.3}/PKG-INFO +1 -1
  2. browse_code-0.2.3/browse_code/__init__.py +1 -0
  3. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/cli.py +20 -9
  4. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/server.py +38 -0
  5. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/PKG-INFO +1 -1
  6. {browse_code-0.2.2 → browse_code-0.2.3}/setup.py +1 -1
  7. browse_code-0.2.2/browse_code/__init__.py +0 -1
  8. {browse_code-0.2.2 → browse_code-0.2.3}/README.md +0 -0
  9. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/content.js +0 -0
  10. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/icon128.png +0 -0
  11. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/icon16.png +0 -0
  12. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/icon48.png +0 -0
  13. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/manifest.json +0 -0
  14. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/popup.html +0 -0
  15. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/popup.js +0 -0
  16. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code/extension/spoof.js +0 -0
  17. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/SOURCES.txt +0 -0
  18. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/dependency_links.txt +0 -0
  19. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/entry_points.txt +0 -0
  20. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/requires.txt +0 -0
  21. {browse_code-0.2.2 → browse_code-0.2.3}/browse_code.egg-info/top_level.txt +0 -0
  22. {browse_code-0.2.2 → browse_code-0.2.3}/pyproject.toml +0 -0
  23. {browse_code-0.2.2 → browse_code-0.2.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: browse_code
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Turn any AI chatbot into an autonomous coding agent
5
5
  Description-Content-Type: text/markdown
6
6
  Requires-Dist: fastapi
@@ -0,0 +1 @@
1
+ __version__ = "0.2.3"
@@ -19,14 +19,23 @@ console = Console()
19
19
  PORT = 5505
20
20
  HOST = "127.0.0.1"
21
21
 
22
- ASCII_BANNER = r"""
23
- ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗███████╗ ██████╗ ██████╗ ██████╗ ███████╗
24
- ██╔══██╗██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔════╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
25
- ██████╔╝██████╔╝██║ ██║██║ █╗ ██║███████╗█████╗ ██║ ██║ ██║██║ ██║█████╗
26
- ██╔══██╗██╔══██╗██║ ██║██║███╗██║╚════██║██╔══╝ ██║ ██║ ██║██║ ██║██╔══╝
27
- ██████╔╝██║ ██║╚██████╔╝╚███╔███╔╝███████║███████╗██╗╚██████╗╚██████╔╝██████╔╝███████╗
28
- ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
29
- """
22
+ ASCII_BROWSE = [
23
+ "██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗███████╗ ",
24
+ "██╔══██╗██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔════╝ ",
25
+ "██████╔╝██████╔╝██║ ██║██║ █╗ ██║███████╗█████╗ ",
26
+ "██╔══██╗██╔══██╗██║ ██║██║███╗██║╚════██║██╔══╝ ",
27
+ "██████╔╝██║ ██║╚██████╔╝╚███╔███╔╝███████║███████╗██╗",
28
+ "╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚══════╝╚═╝ "
29
+ ]
30
+
31
+ ASCII_CODE = [
32
+ "██████╗ ██████╗ ██████╗ ███████╗",
33
+ "██╔════╝██╔═══██╗██╔══██╗██╔════╝",
34
+ "██║ ██║ ██║██║ ██║█████╗ ",
35
+ "██║ ██║ ██║██║ ██║██╔══╝ ",
36
+ "╚██████╗╚██████╔╝██████╔╝███████╗",
37
+ "╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝"
38
+ ]
30
39
 
31
40
 
32
41
  def get_data_dir():
@@ -64,7 +73,9 @@ def copy_to_clipboard(text):
64
73
 
65
74
  def print_banner():
66
75
  """Print the Browse Code ASCII art banner."""
67
- console.print(f"[bold green]{ASCII_BANNER}[/bold green]")
76
+ console.print()
77
+ for b, c in zip(ASCII_BROWSE, ASCII_CODE):
78
+ console.print(f"[bold green]{b}[/bold green][bold red]{c}[/bold red]")
68
79
 
69
80
 
70
81
  def setup_extension():
@@ -15,9 +15,47 @@ from fastapi import FastAPI, HTTPException, Request
15
15
  from fastapi.middleware.cors import CORSMiddleware
16
16
  from pydantic import BaseModel
17
17
 
18
+ async def check_extension_connection():
19
+ from pathlib import Path
20
+ try:
21
+ from rich.console import Console
22
+ from rich.panel import Panel
23
+ from rich import box
24
+ console = Console()
25
+
26
+ while True:
27
+ await asyncio.sleep(30) # Check every 30 seconds
28
+ if not is_extension_connected():
29
+ ext_path = str(Path.home() / ".browse_code" / "extension")
30
+ console.print()
31
+ console.print(
32
+ Panel(
33
+ "[bold yellow]Extension Not Connected![/bold yellow]\n\n"
34
+ "The server is running, but the browser extension hasn't connected.\n"
35
+ "To fix this:\n"
36
+ " 1. Ensure the [bold]Browse Code[/bold] extension is installed and enabled.\n"
37
+ " 2. Make sure Chrome is open.\n\n"
38
+ "[dim]If you haven't installed it yet:[/dim]\n"
39
+ " • Open [cyan]chrome://extensions/[/cyan]\n"
40
+ " • Enable [bold]Developer Mode[/bold] (top right)\n"
41
+ " • Click [bold]Load unpacked[/bold] and select this folder:\n"
42
+ f" [green]{ext_path}[/green]",
43
+ title="[bold yellow]Warning[/bold yellow]",
44
+ title_align="left",
45
+ border_style="yellow",
46
+ box=box.ROUNDED,
47
+ padding=(1, 2),
48
+ expand=False
49
+ )
50
+ )
51
+ except asyncio.CancelledError:
52
+ pass
53
+
18
54
  @asynccontextmanager
19
55
  async def lifespan(app: FastAPI):
56
+ task = asyncio.create_task(check_extension_connection())
20
57
  yield
58
+ task.cancel()
21
59
 
22
60
 
23
61
  app = FastAPI(title="Agent Bridge Backend", lifespan=lifespan)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: browse_code
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Turn any AI chatbot into an autonomous coding agent
5
5
  Description-Content-Type: text/markdown
6
6
  Requires-Dist: fastapi
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="browse_code",
5
- version="0.2.2",
5
+ version="0.2.3",
6
6
  description="Turn any AI chatbot into an autonomous coding agent",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
@@ -1 +0,0 @@
1
- __version__ = "0.2.2"
File without changes
File without changes
File without changes