gemcode 0.3.45__py3-none-any.whl → 0.3.47__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.
- gemcode/agent.py +6 -6
- gemcode/tools/__init__.py +1 -3
- gemcode/tui/scrollback.py +29 -0
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/METADATA +1 -1
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/RECORD +9 -9
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/WHEEL +0 -0
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/entry_points.txt +0 -0
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/licenses/LICENSE +0 -0
- {gemcode-0.3.45.dist-info → gemcode-0.3.47.dist-info}/top_level.txt +0 -0
gemcode/agent.py
CHANGED
|
@@ -470,12 +470,12 @@ You have native deep thinking capability — use it actively:
|
|
|
470
470
|
- For **dev servers**: `bash("npm run dev", background=True, cwd_subdir="frontend")`
|
|
471
471
|
- For **subfolders**: `bash("cargo build --release", cwd_subdir="backend")`
|
|
472
472
|
|
|
473
|
-
-
|
|
474
|
-
- `
|
|
475
|
-
- `
|
|
476
|
-
- `
|
|
477
|
-
- `
|
|
478
|
-
-
|
|
473
|
+
- **Long-running servers / watchers** — use `bash` with `background=True`:
|
|
474
|
+
- `bash("npm run dev", background=True)` — start the dev server in background
|
|
475
|
+
- `bash("python manage.py runserver", background=True)` — Django server
|
|
476
|
+
- `bash("tail -f logs/app.log", background=True)` — background log watcher
|
|
477
|
+
- NEVER call `bash("npm run dev")` without `background=True` — it blocks forever and crashes the turn
|
|
478
|
+
- After starting a background process, confirm the port is ready with `bash("sleep 2 && curl -s http://localhost:3000 -o /dev/null && echo ready")`
|
|
479
479
|
|
|
480
480
|
- **`run_command`** — simple single-executable calls without shell features:
|
|
481
481
|
- `run_command("npm", args=["install", "--legacy-peer-deps"])` — clean npm install
|
gemcode/tools/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from gemcode.config import GemCodeConfig
|
|
6
|
-
from gemcode.tools.bash import make_bash_tool
|
|
6
|
+
from gemcode.tools.bash import make_bash_tool
|
|
7
7
|
from gemcode.tools.edit import make_edit_tools
|
|
8
8
|
from gemcode.tools.filesystem import make_filesystem_tools
|
|
9
9
|
from gemcode.tools.search import make_grep_tool
|
|
@@ -35,7 +35,6 @@ def build_function_tools(cfg: GemCodeConfig, *, include_subtask: bool = True) ->
|
|
|
35
35
|
grep_content = make_grep_tool(cfg)
|
|
36
36
|
run_command = make_run_command(cfg)
|
|
37
37
|
bash = make_bash_tool(cfg)
|
|
38
|
-
bash_stream = make_bash_stream_tool(cfg)
|
|
39
38
|
write_file, search_replace = make_edit_tools(cfg)
|
|
40
39
|
todo_write = make_todo_tool(cfg)
|
|
41
40
|
think = make_think_tool()
|
|
@@ -55,7 +54,6 @@ def build_function_tools(cfg: GemCodeConfig, *, include_subtask: bool = True) ->
|
|
|
55
54
|
glob_files,
|
|
56
55
|
grep_content,
|
|
57
56
|
bash_tool,
|
|
58
|
-
bash_stream,
|
|
59
57
|
run_command_tool,
|
|
60
58
|
write_file,
|
|
61
59
|
search_replace,
|
gemcode/tui/scrollback.py
CHANGED
|
@@ -86,6 +86,25 @@ def format_tool_call_extras(fc) -> str:
|
|
|
86
86
|
return ""
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
def _events_to_text_best_effort(events: list) -> str:
|
|
90
|
+
"""Fallback extraction of assistant text from ADK events."""
|
|
91
|
+
parts: list[str] = []
|
|
92
|
+
for event in events or []:
|
|
93
|
+
try:
|
|
94
|
+
content = getattr(event, "content", None)
|
|
95
|
+
if not content or not getattr(content, "parts", None):
|
|
96
|
+
continue
|
|
97
|
+
if getattr(event, "author", None) == "user":
|
|
98
|
+
continue
|
|
99
|
+
for part in getattr(content, "parts", []) or []:
|
|
100
|
+
t = getattr(part, "text", None)
|
|
101
|
+
if isinstance(t, str) and t:
|
|
102
|
+
parts.append(t)
|
|
103
|
+
except Exception:
|
|
104
|
+
continue
|
|
105
|
+
return "".join(parts).strip()
|
|
106
|
+
|
|
107
|
+
|
|
89
108
|
def _events_had_non_confirmation_tools(events: list) -> bool:
|
|
90
109
|
for ev in events:
|
|
91
110
|
try:
|
|
@@ -728,6 +747,16 @@ async def run_gemcode_scrollback_tui(
|
|
|
728
747
|
final_text = thought_text
|
|
729
748
|
thought_text = ""
|
|
730
749
|
|
|
750
|
+
# Second-pass fallback: sometimes streamed parsing misses text (ADK event shape
|
|
751
|
+
# changes, tool plugins rewriting events, etc.). Recover from the full event list.
|
|
752
|
+
if not final_text:
|
|
753
|
+
try:
|
|
754
|
+
recovered = _events_to_text_best_effort(events)
|
|
755
|
+
if recovered:
|
|
756
|
+
final_text = recovered
|
|
757
|
+
except Exception:
|
|
758
|
+
pass
|
|
759
|
+
|
|
731
760
|
# If the model produced no visible text at all, show an explicit hint
|
|
732
761
|
# instead of returning to the prompt silently.
|
|
733
762
|
if not final_text and not thought_text and not assistant_wrote_text:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
gemcode/__init__.py,sha256=l0DCRYqK7KM7Fb7u49fqh-5_SlpeIL7r3LjMeJWMgSg,112
|
|
2
2
|
gemcode/__main__.py,sha256=EX2s1hxq2Yvli_-tnBN3w5Qv4bOjsBBbjyISF0pDIQw,37
|
|
3
|
-
gemcode/agent.py,sha256=
|
|
3
|
+
gemcode/agent.py,sha256=L8doyA6B90F1fYg9N6invYCR0kVfLd4IhMPjjjU2ouY,42217
|
|
4
4
|
gemcode/audit.py,sha256=bh9uhXaeh8wqxqoZtz3ZAowd8Ndk1ss-mw9993Vlrgo,469
|
|
5
5
|
gemcode/autocompact.py,sha256=77h5tgFzJ2rjrhlCL2oIc28IHwLbP4Pqlo7cSNgDwiA,6727
|
|
6
6
|
gemcode/callbacks.py,sha256=qgbxyBMOlgzVkJr9lI55En4EpJOwjo83U3dvNrl5I4s,24229
|
|
@@ -59,7 +59,7 @@ gemcode/query/engine.py,sha256=GPuvUgTRpWmyA39I_3ayVEADlHVFhPrC2FGW_yKs2yw,1420
|
|
|
59
59
|
gemcode/query/stop_hooks.py,sha256=jaXMN2OptwHeGXF8o630zIVr62T8jVg-eIyREG0GyxA,1847
|
|
60
60
|
gemcode/query/token_budget.py,sha256=JTq2TrGkFY5t5KOs-P9XQPqahyjcdTzN3wctZ1JxFV0,2973
|
|
61
61
|
gemcode/query/transitions.py,sha256=vJ77cv4cFwdvsxyGr7MxXz6uGVB5IDqOClqR1MkWvqw,933
|
|
62
|
-
gemcode/tools/__init__.py,sha256=
|
|
62
|
+
gemcode/tools/__init__.py,sha256=jea95Ds3BwUaiDNVGesBXDKvveIHbdTNpk4yKVWcPVA,2226
|
|
63
63
|
gemcode/tools/bash.py,sha256=1Nv1UmnWhc1Y-9gZyYUQEcAE43K8V2bakj27ULcvjR8,9075
|
|
64
64
|
gemcode/tools/browser.py,sha256=StWRttiyGkR4qaG5urRviJgdoj2hiFB2OuHPItaVzJY,7250
|
|
65
65
|
gemcode/tools/edit.py,sha256=Q6ALUCHQV37n0j6XQd2luCaDm0fIavho3faDisOqtuU,1716
|
|
@@ -73,16 +73,16 @@ gemcode/tools/think.py,sha256=WrNATR-bi97aLkbSsOFOYYAGxbzihe9AnPDZfw3z5-Q,1704
|
|
|
73
73
|
gemcode/tools/todo.py,sha256=d9aXiyT04r1RFZIk6qdVif17-_Oc3oi4ymDnsPBRg68,3143
|
|
74
74
|
gemcode/tools/web.py,sha256=ULg1e3inG4FjPSUCYI8dVBzTrcCHINNRo76SIU9qw-A,4489
|
|
75
75
|
gemcode/tui/input_handler.py,sha256=VWF92Fe3WkD3QP9kBDY5zrx333Vj2eShO3UO0x2n6eo,10079
|
|
76
|
-
gemcode/tui/scrollback.py,sha256=
|
|
76
|
+
gemcode/tui/scrollback.py,sha256=7b7knFb6iRmwwiPKFkKApW0Dqah5QtNbFMMvAorBE58,34950
|
|
77
77
|
gemcode/tui/spinner.py,sha256=AJrApG5od-Sh40-5uWcNM9RHb5ax7gr-NbgAZmTbIYY,4848
|
|
78
78
|
gemcode/tui/welcome_banner.py,sha256=aocl1lnoyLIM6RN4f65g3i0wRA71RqUlgPrGsXeVLW4,4387
|
|
79
79
|
gemcode/tui/welcome_rich.py,sha256=8FEZzLXrzqly5JWiDgV9ooRV1LNXDk-CXV1a7K6ua-U,4048
|
|
80
80
|
gemcode/web/__init__.py,sha256=EysmUAWs6g-lmMk4VFljKfaHVrEgb_FiIzwQmBdORJc,40
|
|
81
81
|
gemcode/web/claude_sse_adapter.py,sha256=HcNp0Lh4DdBZBLOpstsqa-VzfqAUrRngZ6FSuJ-mIMg,8609
|
|
82
82
|
gemcode/web/terminal_repl.py,sha256=k2irvFGbCY8gDm_pbirR7b_cakaeafcctoTIvnJkVXk,3902
|
|
83
|
-
gemcode-0.3.
|
|
84
|
-
gemcode-0.3.
|
|
85
|
-
gemcode-0.3.
|
|
86
|
-
gemcode-0.3.
|
|
87
|
-
gemcode-0.3.
|
|
88
|
-
gemcode-0.3.
|
|
83
|
+
gemcode-0.3.47.dist-info/licenses/LICENSE,sha256=TD4524qn-W8Z07GTDnag-9jJPFutFZNB0a1WbMHPC54,8388
|
|
84
|
+
gemcode-0.3.47.dist-info/METADATA,sha256=TYNsVHmkHCw3pLQwBpO4nmZwgptk6pEdvuOqvk7deiw,23695
|
|
85
|
+
gemcode-0.3.47.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
86
|
+
gemcode-0.3.47.dist-info/entry_points.txt,sha256=cZdLTLDiHbks7OSUCuxCh66dCWeQdpLR8BozoqfEjV4,45
|
|
87
|
+
gemcode-0.3.47.dist-info/top_level.txt,sha256=UYrjULLBY2bcgK6KI6flomJWmsbDXu7n0rvW2SWFrbo,8
|
|
88
|
+
gemcode-0.3.47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|