gemcode 0.3.44__py3-none-any.whl → 0.3.46__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/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:
@@ -573,12 +592,14 @@ async def run_gemcode_scrollback_tui(
573
592
  INTENT_GREETING,
574
593
  INTENT_DESCRIPTIONS,
575
594
  )
576
- _intent, _intent_src = await classify_intent_with_source(prompt)
577
- if show_intentifying_line(_intent_src):
578
- print(
579
- f" \u23bf {ansi.dim}\u2234 Intentifying\u2026{ansi.reset}"
580
- )
581
- print("")
595
+ # Show as a transient spinner status (do not print a permanent line).
596
+ _start_anim("Intentifying\u2026")
597
+ try:
598
+ _intent, _intent_src = await classify_intent_with_source(prompt)
599
+ finally:
600
+ _stop_anim()
601
+ # If disabled, show nothing; otherwise the spinner already conveyed it.
602
+ _ = show_intentifying_line(_intent_src)
582
603
 
583
604
  if _intent == INTENT_GREETING:
584
605
  _start_anim("Replying\u2026")
@@ -726,6 +747,24 @@ async def run_gemcode_scrollback_tui(
726
747
  final_text = thought_text
727
748
  thought_text = ""
728
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
+
760
+ # If the model produced no visible text at all, show an explicit hint
761
+ # instead of returning to the prompt silently.
762
+ if not final_text and not thought_text and not assistant_wrote_text:
763
+ await typewrite(
764
+ f"{ansi.dim}(No text response received. Try 'continue' to retry the last request.){ansi.reset}"
765
+ )
766
+ print("")
767
+
729
768
  # ── Thinking display (collapsed by default, verbose with /thinking verbose)
730
769
  if thought_text and not (
731
770
  buffered_final and _normalize_ws(thought_text) == _normalize_ws(final_text)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gemcode
3
- Version: 0.3.44
3
+ Version: 0.3.46
4
4
  Summary: Local-first coding agent on Google Gemini + ADK
5
5
  Author: GemCode Contributors
6
6
  License: Apache License
@@ -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=oNUKV2VXFEXxVeam49QZoY0r0WrMjJZgu2bKNsWoeZk,33453
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.44.dist-info/licenses/LICENSE,sha256=TD4524qn-W8Z07GTDnag-9jJPFutFZNB0a1WbMHPC54,8388
84
- gemcode-0.3.44.dist-info/METADATA,sha256=i4CWi2k5U0g3bjZruZp7cy5_yCbR4qhR7B8r3VeLdfE,23695
85
- gemcode-0.3.44.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
86
- gemcode-0.3.44.dist-info/entry_points.txt,sha256=cZdLTLDiHbks7OSUCuxCh66dCWeQdpLR8BozoqfEjV4,45
87
- gemcode-0.3.44.dist-info/top_level.txt,sha256=UYrjULLBY2bcgK6KI6flomJWmsbDXu7n0rvW2SWFrbo,8
88
- gemcode-0.3.44.dist-info/RECORD,,
83
+ gemcode-0.3.46.dist-info/licenses/LICENSE,sha256=TD4524qn-W8Z07GTDnag-9jJPFutFZNB0a1WbMHPC54,8388
84
+ gemcode-0.3.46.dist-info/METADATA,sha256=Ezcxs4DisacoIdLLUsOpgjoLG9_hyrgxmetVsKhSosk,23695
85
+ gemcode-0.3.46.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
86
+ gemcode-0.3.46.dist-info/entry_points.txt,sha256=cZdLTLDiHbks7OSUCuxCh66dCWeQdpLR8BozoqfEjV4,45
87
+ gemcode-0.3.46.dist-info/top_level.txt,sha256=UYrjULLBY2bcgK6KI6flomJWmsbDXu7n0rvW2SWFrbo,8
88
+ gemcode-0.3.46.dist-info/RECORD,,