localcoder 0.1.0__py3-none-any.whl
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.
- localcoder/__init__.py +2 -0
- localcoder/__main__.py +2 -0
- localcoder/agent.py +35 -0
- localcoder/backends.py +2470 -0
- localcoder/bench.py +335 -0
- localcoder/cli.py +827 -0
- localcoder/gemma4coder_display.py +583 -0
- localcoder/setup.py +321 -0
- localcoder/tui.py +276 -0
- localcoder/voice.py +187 -0
- localcoder-0.1.0.dist-info/METADATA +187 -0
- localcoder-0.1.0.dist-info/RECORD +15 -0
- localcoder-0.1.0.dist-info/WHEEL +4 -0
- localcoder-0.1.0.dist-info/entry_points.txt +2 -0
- localcoder-0.1.0.dist-info/licenses/LICENSE +4 -0
localcoder/__init__.py
ADDED
localcoder/__main__.py
ADDED
localcoder/agent.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Agent runner — delegates to the localcoder agent script."""
|
|
2
|
+
import os, sys
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def run_agent(api_base, model, args):
|
|
6
|
+
"""Run the localcoder agent with the given config."""
|
|
7
|
+
os.environ["GEMMA_API_BASE"] = api_base
|
|
8
|
+
os.environ["GEMMA_MODEL"] = model
|
|
9
|
+
|
|
10
|
+
# Find the agent script — bundled with the package
|
|
11
|
+
script = os.path.join(os.path.dirname(__file__), "localcoder_agent.py")
|
|
12
|
+
if not os.path.exists(script):
|
|
13
|
+
# Fallback
|
|
14
|
+
script = os.path.expanduser("~/Projects/gemma4-research/localcoder")
|
|
15
|
+
|
|
16
|
+
if not os.path.exists(script):
|
|
17
|
+
from rich.console import Console
|
|
18
|
+
Console().print("[red]Agent script not found.[/]")
|
|
19
|
+
return
|
|
20
|
+
|
|
21
|
+
cmd = [sys.executable, script]
|
|
22
|
+
if args.prompt:
|
|
23
|
+
cmd += ["-p", args.prompt]
|
|
24
|
+
if args.cont:
|
|
25
|
+
cmd += ["-c"]
|
|
26
|
+
if args.model:
|
|
27
|
+
cmd += ["-m", model]
|
|
28
|
+
if args.yolo or args.bypass:
|
|
29
|
+
cmd += ["--yolo"]
|
|
30
|
+
if args.ask:
|
|
31
|
+
cmd += ["--ask"]
|
|
32
|
+
if args.api:
|
|
33
|
+
cmd += ["--api", api_base]
|
|
34
|
+
|
|
35
|
+
os.execvp(sys.executable, cmd)
|