browse-code 0.2.6__tar.gz → 0.2.9__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.
- {browse_code-0.2.6 → browse_code-0.2.9}/PKG-INFO +1 -1
- browse_code-0.2.9/browse_code/__init__.py +1 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/cli.py +30 -29
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/popup.html +1 -1
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/popup.js +7 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/PKG-INFO +1 -1
- {browse_code-0.2.6 → browse_code-0.2.9}/setup.py +1 -1
- browse_code-0.2.6/browse_code/__init__.py +0 -1
- {browse_code-0.2.6 → browse_code-0.2.9}/README.md +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/content.js +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/icon128.png +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/icon16.png +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/icon48.png +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/manifest.json +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/extension/spoof.js +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code/server.py +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/SOURCES.txt +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/dependency_links.txt +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/entry_points.txt +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/requires.txt +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/browse_code.egg-info/top_level.txt +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/pyproject.toml +0 -0
- {browse_code-0.2.6 → browse_code-0.2.9}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.9"
|
|
@@ -79,10 +79,9 @@ def print_banner():
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
def setup_extension():
|
|
82
|
-
"""First-time setup:
|
|
82
|
+
"""First-time setup: open Chrome, guide the user."""
|
|
83
83
|
data_dir = get_data_dir()
|
|
84
84
|
ext_dest = data_dir / "extension"
|
|
85
|
-
pkg_ext_dir = Path(__file__).parent / "extension"
|
|
86
85
|
|
|
87
86
|
print_banner()
|
|
88
87
|
console.print(
|
|
@@ -101,15 +100,9 @@ def setup_extension():
|
|
|
101
100
|
console.print(" [dim]Skipped. Re-run 'bc' anytime to set it up.[/dim]")
|
|
102
101
|
return False
|
|
103
102
|
|
|
104
|
-
# Extract extension files
|
|
105
|
-
console.print()
|
|
106
|
-
with console.status("[green]Extracting extension files...[/green]", spinner="dots"):
|
|
107
|
-
if ext_dest.exists():
|
|
108
|
-
shutil.rmtree(ext_dest)
|
|
109
|
-
shutil.copytree(pkg_ext_dir, ext_dest)
|
|
110
|
-
|
|
111
103
|
ext_path_str = str(ext_dest)
|
|
112
|
-
console.print(
|
|
104
|
+
console.print()
|
|
105
|
+
console.print(f" [green]Extension ready at:[/green] [bold]{ext_path_str}[/bold]")
|
|
113
106
|
console.print()
|
|
114
107
|
|
|
115
108
|
# Copy path to clipboard
|
|
@@ -129,42 +122,40 @@ def setup_extension():
|
|
|
129
122
|
steps.add_column("step", style="bold green", width=4)
|
|
130
123
|
steps.add_column("instruction")
|
|
131
124
|
|
|
132
|
-
steps.add_row("1.",
|
|
133
|
-
steps.add_row(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
steps.add_row("1.", "Enable [bold]Developer mode[/bold] in the top right")
|
|
126
|
+
steps.add_row(
|
|
127
|
+
"2.",
|
|
128
|
+
f"Click [bold]Load unpacked[/bold] and select this folder:\n[cyan]{ext_path_str}[/cyan]"
|
|
129
|
+
+ (" [dim](Copied to clipboard!)[/dim]" if copied else ""),
|
|
130
|
+
)
|
|
131
|
+
steps.add_row("3.", "The Browse Code icon should now appear in your browser")
|
|
138
132
|
|
|
139
|
-
console.print()
|
|
140
133
|
console.print(
|
|
141
134
|
Panel(
|
|
142
135
|
steps,
|
|
143
|
-
title="[bold
|
|
144
|
-
|
|
145
|
-
border_style="green",
|
|
136
|
+
title="[bold]Installation Steps[/bold]",
|
|
137
|
+
border_style="blue",
|
|
146
138
|
box=box.ROUNDED,
|
|
147
|
-
padding=(1,
|
|
139
|
+
padding=(1, 2),
|
|
148
140
|
expand=False,
|
|
149
141
|
)
|
|
150
142
|
)
|
|
151
|
-
console.print()
|
|
152
143
|
|
|
153
|
-
|
|
144
|
+
# Ask user to confirm they installed it
|
|
145
|
+
Confirm.ask("\n [yellow]Did you finish installing it?[/yellow]", default=True)
|
|
154
146
|
|
|
155
|
-
#
|
|
147
|
+
# Create marker file
|
|
156
148
|
marker = data_dir / ".installed"
|
|
157
149
|
marker.touch()
|
|
158
150
|
|
|
159
|
-
console.print(" [bold green]Extension setup complete![/bold green]")
|
|
160
151
|
return True
|
|
161
152
|
|
|
162
153
|
|
|
163
154
|
def print_server_header():
|
|
164
|
-
"""Print the server
|
|
165
|
-
info = Table(
|
|
166
|
-
info.add_column(
|
|
167
|
-
info.add_column(
|
|
155
|
+
"""Print the server startup header."""
|
|
156
|
+
info = Table.grid(padding=(0, 2))
|
|
157
|
+
info.add_column(style="dim", justify="right")
|
|
158
|
+
info.add_column()
|
|
168
159
|
|
|
169
160
|
info.add_row("Endpoint", f"[bold]http://{HOST}:{PORT}[/bold]")
|
|
170
161
|
info.add_row("Extension", "[yellow]Waiting for connection...[/yellow]")
|
|
@@ -190,6 +181,16 @@ def main():
|
|
|
190
181
|
data_dir = get_data_dir()
|
|
191
182
|
marker = data_dir / ".installed"
|
|
192
183
|
|
|
184
|
+
# Always sync the latest extension files from the package to the data dir
|
|
185
|
+
# so updates (like new icons, JS changes) propagate automatically
|
|
186
|
+
ext_dest = data_dir / "extension"
|
|
187
|
+
pkg_ext_dir = Path(__file__).parent / "extension"
|
|
188
|
+
try:
|
|
189
|
+
import shutil
|
|
190
|
+
shutil.copytree(pkg_ext_dir, ext_dest, dirs_exist_ok=True)
|
|
191
|
+
except Exception:
|
|
192
|
+
pass
|
|
193
|
+
|
|
193
194
|
if not marker.exists():
|
|
194
195
|
result = setup_extension()
|
|
195
196
|
if not result:
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<label>Workspace Directory:</label>
|
|
95
95
|
<input type="text" id="dir-input" placeholder="C:\Projects\app">
|
|
96
96
|
<label>Inject Prompt Every N Messages (0 to disable):</label>
|
|
97
|
-
<input type="number" id="inject-n-input" placeholder="
|
|
97
|
+
<input type="number" id="inject-n-input" placeholder="10" value="10" min="0">
|
|
98
98
|
<button id="save-btn">Save Directory</button>
|
|
99
99
|
<button id="init-btn">Initialize Agent in Chat</button>
|
|
100
100
|
|
|
@@ -29,6 +29,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
initBtn.addEventListener('click', () => {
|
|
32
|
+
const path = dirInput.value.trim();
|
|
33
|
+
if (!path) {
|
|
34
|
+
initBtn.innerText = 'Workspace directory required!';
|
|
35
|
+
setTimeout(() => initBtn.innerText = 'Initialize Agent in Chat', 3000);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
initBtn.innerText = 'Initializing...';
|
|
33
40
|
chrome.tabs.query({active: true, currentWindow: true}, (tabs) => {
|
|
34
41
|
const activeTab = tabs[0];
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="browse_code",
|
|
5
|
-
version="0.2.
|
|
5
|
+
version="0.2.9",
|
|
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.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|