This repository was archived by the owner on Jul 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
fix: check for claude install first #1261
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -570,9 +570,26 @@ def _display_dashboard_tab(self): | |
|
|
||
| def _display_claude_tab(self): | ||
| """Display the Claude Code interface tab.""" | ||
| print(" \033[37m→ Run Claude Code\033[0m") | ||
| print() | ||
| print("Press Enter to launch Claude Code with session tracking.") | ||
| # Check if Claude Code is installed | ||
| from codegen.cli.commands.claude.utils import resolve_claude_path | ||
|
|
||
| claude_path = resolve_claude_path() | ||
| if not claude_path: | ||
| # Display error message when Claude is not installed | ||
| print(" \033[31m✗ Claude Code Not Installed\033[0m") | ||
| print() | ||
| print("\033[33m⚠ Claude Code CLI is not installed or cannot be found.\033[0m") | ||
| print() | ||
| print("To install Claude Code:") | ||
| print(" • Install globally: \033[36mnpm install -g @anthropic-ai/claude-code\033[0m") | ||
| print(" • Or run: \033[36mclaude /migrate-installer\033[0m for local installation") | ||
| print() | ||
| print("Once installed, restart this CLI to use Claude Code.") | ||
| else: | ||
| print(" \033[37m→ Run Claude Code\033[0m") | ||
| print() | ||
| print("Press Enter to launch Claude Code with session tracking.") | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Claude Tab Layout Inconsistent Across InstallationsThe |
||
| # The claude tab main content area should be a fixed 10 lines | ||
| self._pad_to_lines(7) | ||
|
|
||
|
|
@@ -892,6 +909,15 @@ def _handle_dashboard_tab_keypress(self, key: str): | |
| def _handle_claude_tab_keypress(self, key: str): | ||
| """Handle keypresses in the claude tab.""" | ||
| if key == "\r" or key == "\n": # Enter - run Claude Code | ||
| # Check if Claude is installed before attempting to run | ||
| from codegen.cli.commands.claude.utils import resolve_claude_path | ||
|
|
||
| claude_path = resolve_claude_path() | ||
| if not claude_path: | ||
| # Claude is not installed, don't try to launch | ||
| logger.warning("Attempted to launch Claude Code but it's not installed", extra={"operation": "tui.launch_claude", "error": "not_installed"}) | ||
| return | ||
|
|
||
| self._run_claude_code() | ||
|
|
||
| def _run_claude_code(self): | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.