comet-code 0.1.3__tar.gz → 0.1.4__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.
- {comet_code-0.1.3 → comet_code-0.1.4}/PKG-INFO +1 -1
- {comet_code-0.1.3 → comet_code-0.1.4}/pyproject.toml +1 -1
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/render.py +15 -2
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/ui.py +4 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/.claude/settings.local.json +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/.gitignore +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/.python-version +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/LICENSE +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/README.md +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/main.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/commands.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/completer.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/cli/state.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/config.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/core/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/core/graph.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/core/graph_state.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/core/nodes.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/core/orchestrator.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/llm/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/llm/models.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/llm/openrouter_client.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/llm/prompts.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/output/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/patching/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/retrieval/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/sandbox/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/attempt.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/code_chunk.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/events.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/mode_policy.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/plan.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/session.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/task.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/schemas/tool.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/tools/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/src/verify/__init__.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/tests/test_cli_render.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/tests/test_cli_ui.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/tests/test_limit_handling.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/tests/test_tool_approval.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/tests/test_tools_schema.py +0 -0
- {comet_code-0.1.3 → comet_code-0.1.4}/uv.lock +0 -0
|
@@ -62,6 +62,7 @@ class EventRenderer:
|
|
|
62
62
|
self._persisted_tool_history_count = 0
|
|
63
63
|
self._token_count: int = 0
|
|
64
64
|
self._start_time: float = time.monotonic()
|
|
65
|
+
self._pending_final_text: str | None = None
|
|
65
66
|
|
|
66
67
|
def get_tool_history(self) -> list[dict]:
|
|
67
68
|
return [item.to_dict() for item in self._tool_history]
|
|
@@ -248,6 +249,20 @@ class EventRenderer:
|
|
|
248
249
|
text = (event.text or "").strip()
|
|
249
250
|
if not text:
|
|
250
251
|
text = "No final response text was produced."
|
|
252
|
+
self._pending_final_text = text
|
|
253
|
+
self._buffer.clear()
|
|
254
|
+
self._show_post_tool_transition = False
|
|
255
|
+
|
|
256
|
+
def flush_final(self) -> None:
|
|
257
|
+
"""Print the final response panel outside any Live context.
|
|
258
|
+
|
|
259
|
+
Called after the Live spinner exits so the terminal's normal scroll
|
|
260
|
+
buffer is clean — no cursor-up manipulation can confuse scrollback.
|
|
261
|
+
"""
|
|
262
|
+
text = self._pending_final_text
|
|
263
|
+
if text is None:
|
|
264
|
+
return
|
|
265
|
+
self._pending_final_text = None
|
|
251
266
|
|
|
252
267
|
if self._collapsed_tools and self._persisted_tool_history_count < len(self._tool_history):
|
|
253
268
|
self.console.print()
|
|
@@ -265,8 +280,6 @@ class EventRenderer:
|
|
|
265
280
|
)
|
|
266
281
|
)
|
|
267
282
|
self.console.print()
|
|
268
|
-
self._buffer.clear()
|
|
269
|
-
self._show_post_tool_transition = False
|
|
270
283
|
|
|
271
284
|
def _render_limit(self, event: StreamEvent) -> None:
|
|
272
285
|
self._show_post_tool_transition = bool(self._tool_history)
|
|
@@ -420,5 +420,9 @@ def run_shell(api_key: str = "") -> None:
|
|
|
420
420
|
except Exception as exc:
|
|
421
421
|
console.print(f"\n [bold red]error:[/bold red] {exc}\n")
|
|
422
422
|
finally:
|
|
423
|
+
# Flush the response panel after Live exits so it lands in the
|
|
424
|
+
# terminal's normal scroll buffer — no cursor-up magic from the
|
|
425
|
+
# Live context can confuse the terminal's scrollback.
|
|
426
|
+
renderer.flush_final()
|
|
423
427
|
state.last_tool_history = renderer.get_tool_history()
|
|
424
428
|
console.print(Text(f"Cooked for {renderer.get_elapsed_str()}", style="dim"))
|
|
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
|
|
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
|
|
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
|