regcode 0.4.1__tar.gz → 0.5.1__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.
- {regcode-0.4.1 → regcode-0.5.1}/PKG-INFO +2 -2
- {regcode-0.4.1 → regcode-0.5.1}/pyproject.toml +2 -2
- {regcode-0.4.1 → regcode-0.5.1}/regcode/__init__.py +1 -1
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tui.py +32 -3
- {regcode-0.4.1 → regcode-0.5.1}/uv.lock +1575 -35
- regcode-0.4.1/repair_tui.md +0 -115
- {regcode-0.4.1 → regcode-0.5.1}/.gitignore +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/.python-version +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/.qwen/settings.json +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/AGENTS.md +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/GOALS.md +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/README.md +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/config.yaml.template +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/main.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/cli.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/config.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/conversation_manager.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/dependencies.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/main.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/monty_sandbox.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/permissions.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/sandbox.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/__init__.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/base.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/builtins.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/registry.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/review_notes.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tools/web_crawl.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/regcode/tracing.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/__init__.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/conftest.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_api.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_cli.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_config.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_context_manager.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_dependencies.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_main.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_monty_sandbox.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_osv_cve.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_provider_extra.py +0 -0
- {regcode-0.4.1 → regcode-0.5.1}/tests/test_review_notes.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: regcode
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Minimalistic coding agent with Python API and CLI
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: click>=8.0
|
|
7
7
|
Requires-Dist: crawl4ai>=0.4.0
|
|
8
8
|
Requires-Dist: litellm>=1.83.17
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "regcode"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.1"
|
|
4
4
|
description = "Minimalistic coding agent with Python API and CLI"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"crawl4ai>=0.4.0",
|
|
9
9
|
"litellm>=1.83.17",
|
|
@@ -44,7 +44,6 @@ class ChatMessage:
|
|
|
44
44
|
# ChatApp — main Textual application
|
|
45
45
|
# ---------------------------------------------------------------------------
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
class ChatApp(App):
|
|
49
48
|
"""Clean modern TUI for RegCode agent."""
|
|
50
49
|
|
|
@@ -150,6 +149,7 @@ class ChatApp(App):
|
|
|
150
149
|
self._cumulative_cost: float = 0.0
|
|
151
150
|
self._total_tokens: int = 0
|
|
152
151
|
self._context_window: int = 128000
|
|
152
|
+
self._pending_tool_line: str = ""
|
|
153
153
|
|
|
154
154
|
# ── Compose ───────────────────────────────────────────────────
|
|
155
155
|
|
|
@@ -338,6 +338,27 @@ class ChatApp(App):
|
|
|
338
338
|
|
|
339
339
|
def _run_agent_sync(self, message: str) -> None:
|
|
340
340
|
"""Run agent.chat synchronously in a background thread."""
|
|
341
|
+
# Suppress noise from litellm, mlflow, crawl4ai, and other
|
|
342
|
+
# library loggers during agent execution — they spew logging
|
|
343
|
+
# lines to stdout/stderr which corrupt the TUI display.
|
|
344
|
+
_noisy_loggers = (
|
|
345
|
+
"LiteLLM",
|
|
346
|
+
"mlflow",
|
|
347
|
+
"mlflow.tracking",
|
|
348
|
+
"crawl4ai",
|
|
349
|
+
"urllib3",
|
|
350
|
+
"httpx",
|
|
351
|
+
"httpcore",
|
|
352
|
+
"openai",
|
|
353
|
+
"http11",
|
|
354
|
+
"hpack",
|
|
355
|
+
)
|
|
356
|
+
_old_levels: dict[str, int] = {}
|
|
357
|
+
for name in _noisy_loggers:
|
|
358
|
+
logger = logging.getLogger(name)
|
|
359
|
+
_old_levels[name] = logger.level
|
|
360
|
+
logger.setLevel(logging.WARNING)
|
|
361
|
+
|
|
341
362
|
try:
|
|
342
363
|
with self._lock:
|
|
343
364
|
if self._agent is None:
|
|
@@ -364,6 +385,9 @@ class ChatApp(App):
|
|
|
364
385
|
)
|
|
365
386
|
finally:
|
|
366
387
|
self.call_from_thread(self._finish_message)
|
|
388
|
+
# Restore logger levels in the same thread (background thread, not main)
|
|
389
|
+
for name, level in _old_levels.items():
|
|
390
|
+
logging.getLogger(name).setLevel(level)
|
|
367
391
|
|
|
368
392
|
# ── Agent callbacks (any thread → main thread) ────────────────
|
|
369
393
|
|
|
@@ -383,6 +407,9 @@ class ChatApp(App):
|
|
|
383
407
|
self._flush_stream_for_status()
|
|
384
408
|
|
|
385
409
|
if status == AgentStatus.TOOL_CALL and tool_call_info is not None:
|
|
410
|
+
# Buffer the tool call text — RichLog always starts a new line
|
|
411
|
+
# per write(), so we can't append the ✓ on the same line until
|
|
412
|
+
# TOOL_RESULT arrives.
|
|
386
413
|
tool_name = rich_escape(str(tool_call_info.tool_name))
|
|
387
414
|
parts = [f"[dim] [dim]⚙[/dim] {tool_name}[/dim]"]
|
|
388
415
|
if tool_call_info.tool_args:
|
|
@@ -391,11 +418,13 @@ class ChatApp(App):
|
|
|
391
418
|
parts.append(
|
|
392
419
|
f" [dim]{rich_escape(str(k))}=[/dim]{val}"
|
|
393
420
|
)
|
|
394
|
-
|
|
421
|
+
self._pending_tool_line = " ".join(parts)
|
|
395
422
|
|
|
396
423
|
elif status == AgentStatus.TOOL_RESULT \
|
|
397
424
|
and tool_call_info is not None:
|
|
398
|
-
|
|
425
|
+
# Emit the complete tool line with ✓ appended
|
|
426
|
+
log.write(self._pending_tool_line + " [dim]✓[/dim]\n")
|
|
427
|
+
self._pending_tool_line = ""
|
|
399
428
|
|
|
400
429
|
elif status == AgentStatus.COMPACTION_START:
|
|
401
430
|
log.write(
|