-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: resolve claude-code provider image hang (#5100) #5105
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
- Add missing claude-code case in useSelectedModel hook - Ensures proper model info is returned with supportsImages: false - Prevents UI from allowing image uploads to claude-code provider - Fixes application hang when attempting to send images to claude-code
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.
Pull Request Overview
This PR fixes the hang issue when using the Claude Code provider by adding a missing case in the useSelectedModel hook. The changes include adding the claude-code case, importing the necessary default model ID and models, and ensuring proper model capabilities are returned so that image uploads are correctly disabled for the provider.
- Added "claude-code" case in the useSelectedModel hook.
- Imported claudeCodeDefaultModelId and claudeCodeModels to support the new case.
- Returns the correct model information to disable image uploads.
✅ No security or compliance issues detected. Reviewed everything up to 2bd3b91. Security Overview
Detected Code Changes
Reply to this PR with |
- Add comprehensive test cases for claude-code provider in useSelectedModel hook - Verify that claude-code models correctly report supportsImages: false - Test default model selection when no modelId is specified - Add inline documentation explaining claude-code's disabled features
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Tested and it works.
LGTM
…deInc#5105) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Can we not have the ability to paste pictures into roo code using the claude code provider? Isnt this possible? #5100 (comment) |
Description
Fixes #5100
Resolves the issue where Roo Code hangs when users attempt to send images to the Claude Code provider. The root cause was a missing case in the
useSelectedModel
hook for the "claude-code" provider, which caused it to fall through to the default case and return incorrect model information.Changes Made
useSelectedModel
hook - The hook now properly handles the claude-code provider and returns the correct model informationsupportsImages: false
Testing
Verification of Acceptance Criteria
Code Quality
Files Changed
webview-ui/src/components/ui/hooks/useSelectedModel.ts
- Added claude-code case to properly return model info with supportsImages: falseImpact
This fix implements the suggested solution from the issue description by preventing users from encountering the hanging issue when using the Claude Code provider.
Important
Fixes hanging issue with
claude-code
provider by updatinguseSelectedModel
to handle it correctly and disable image support.claude-code
provider by adding a missing case inuseSelectedModel
inuseSelectedModel.ts
.claude-code
models now correctly reportsupportsImages: false
.claude-code
is selected.useSelectedModel.spec.ts
to verifyclaude-code
behavior, including default model handling and image support.getSelectedModel()
.This description was created by
for 552e04e. You can customize this summary. It will automatically update as commits are pushed.