Skip to content

Fix #217: uvx pptagent onboard 启动失败#222

Merged
Force1ess merged 5 commits intoicip-cas:mainfrom
JiwaniZakir:fix/217-uvx-pptagent-onboard
Apr 6, 2026
Merged

Fix #217: uvx pptagent onboard 启动失败#222
Force1ess merged 5 commits intoicip-cas:mainfrom
JiwaniZakir:fix/217-uvx-pptagent-onboard

Conversation

@JiwaniZakir
Copy link
Copy Markdown
Contributor

Closes #217

Describe your changes

Moves the deeppresenter.tui.app and deeppresenter.tui.controller imports from module-level in deeppresenter/cli/commands.py to lazy imports inside the tui() function body. Previously, these two imports were evaluated at module load time (lines 20–21), which caused a ModuleNotFoundError whenever any CLI command (onboard, generate, serve, etc.) was invoked in environments where the deeppresenter.tui subpackage was absent or not yet installed. By deferring the imports to the point of use inside tui(), all other commands load successfully regardless of whether the TUI dependencies are present.

Adds deeppresenter/test/test_cli_commands.py with a test (test_tui_not_imported_at_module_level) that parses commands.py via the ast module and asserts no top-level ImportFrom nodes reference deeppresenter.tui, preventing regression.

Issue ticket number and link

Issue #217: #217

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.

This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Force1ess Force1ess merged commit 5f53924 into icip-cas:main Apr 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uvx pptagent onboard 启动失败

2 participants