-
Notifications
You must be signed in to change notification settings - Fork 62
textual v0 + CLI cleanups #1195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is |
| self.exit() | ||
|
|
||
|
|
||
| def run_tui(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime error: run_tui is imported but not defined
cli.py imports run_tui from codegen.cli.tui.app, however app.py only defines the CodegenTUI class and never exposes a run_tui helper. Importing the CLI without this symbol raises an ImportError and breaks the default (codegen with no sub-command) execution path.
| def run_tui(): | |
| # In codegen/cli/tui/app.py – add helper at end of file | |
| def run_tui() -> None: | |
| """Convenience wrapper so other modules can launch the TUI without touching | |
| Textual internals.""" | |
| CodegenTUI().run() |
| from rich.panel import Panel | ||
|
|
||
| from codegen.cli.api.endpoints import API_ENDPOINT | ||
| from codegen.cli.auth.token_manager import get_current_token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImportError: resolve_org_id helper is used but not present in repo
Multiple new modules call from codegen.cli.utils.org import resolve_org_id, yet the package codegen.cli.utils.org does not exist in the repository. Importing these modules will crash immediately.
| from codegen.cli.auth.token_manager import get_current_token | |
| # Introduce fallback to avoid hard import failure until util is implemented | |
| try: | |
| from codegen.cli.utils.org import resolve_org_id # type: ignore | |
| except ModuleNotFoundError: # pragma: no cover | |
| def resolve_org_id(_org_id: int | None = None): # type: ignore | |
| """Temporary shim returning the provided org_id or env var value.""" | |
| import os | |
| return _org_id or os.getenv("CODEGEN_ORG_ID") |
| run_id = str(agent_run.get("id", "Unknown")) | ||
| status = agent_run.get("status", "Unknown") | ||
| source_type = agent_run.get("source_type", "Unknown") | ||
| created_at = agent_run.get("created_at", "Unknown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic bug: status emoji for ACTIVE/RUNNING mismatch in agents listing
agents/main.py switches from status == "RUNNING" ➡️ [dim]•[/dim] Running, but API uses ACTIVE for long-running jobs. The current mapping sets ACTIVE to Active with a grey dot while RUNNING remains grey too. Frontend expects green/animated for active.
| created_at = agent_run.get("created_at", "Unknown") | |
| elif status in ("RUNNING", "ACTIVE"): | |
| status_display = "[dim]●[/dim] Running" |
|
Found 3 issues. Please review my inline comments above. |
|
🎉 This PR is included in version 0.56.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
codegencodegen agentscodegen agent --prompt "you there?"