Add create image and web search to native input#8567
Conversation
|
Should the "Ask anything privately" text change when in image generation mode / websearch modes? e.g. "Describe your image" or similar? This is what other AI apps do |
| if (!isAttachedToWindow) return | ||
| if (visibility == VISIBLE && !viewModel.shouldShowPickers) { | ||
| post { | ||
| host.showModelPicker(false) |
There was a problem hiding this comment.
post defers the hide calls to the next message queue cycle, so on the first frame after OptionsView becomes visible the model/reasoning pickers may briefly appear before being hidden. worth checking if this creates a visual flash during the toggle-to-Search-and-back flow.
There was a problem hiding this comment.
It doesn’t flicker as far as I can see
| android:layout_height="wrap_content" | ||
| android:background="?attr/selectableItemBackground" | ||
| android:minHeight="@dimen/popupMenuItemHeight" | ||
| android:paddingTop="@dimen/keyline_2" |
There was a problem hiding this comment.
nit: the old layout had android:minHeight="@dimen/popupMenuItemHeight" which enforced a minimum touch target height on each menu item. the new one relies on padding alone — worth checking if the resulting item height still meets the accessibility minimum, especially at small text sizes.
There was a problem hiding this comment.
This matches the styling of the reasoning one now, I’ll look at them both separately
119ecee to
2525815
Compare
malmstein
left a comment
There was a problem hiding this comment.
works as expected, nice job!
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a6e867. Configure here.
| host.showReasoningPicker(false) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Stale post in onVisibilityChanged can hide pickers incorrectly
Medium Severity
The post lambda in onVisibilityChanged unconditionally hides pickers without re-checking viewModel.shouldShowPickers when it actually executes. If the selected tool is cleared between the post being enqueued and running (e.g., updateCapabilitiesFrom clears an unsupported tool selection synchronously, then the deferred hide fires), the pickers get incorrectly hidden even though no tool is selected. Adding if (!viewModel.shouldShowPickers) inside the post block would prevent the stale hide from executing after the state has changed.
Reviewed by Cursor Bugbot for commit 4a6e867. Configure here.
There was a problem hiding this comment.
This will be fixed with upcoming state changes



Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1214776295472425?focus=true
Description
Steps to test this PR
With the native input enabled
Note
Medium Risk
Adds a new tool-selection path that alters AI chat prompt payloads and UI state across native input, which could affect prompt handling and model capability gating if mismatched with backend/JS expectations.
Overview
Adds native input tool selection for Duck.ai prompts (e.g. Create Image and Web Search) and threads it through submission and pending-prompt flows.
The selected tool is contributed via the options plugin/UI, persisted while navigating, cleared after submit/store, and sent to JS as a new
toolChoicearray in thesubmitAIChatNativePrompt/pending prompt payloads.Model capabilities are extended with
supportedTools(newToolenum) and used to show/hide available options; selecting image generation also hides the model/reasoning pickers.Reviewed by Cursor Bugbot for commit 4a6e867. Bugbot is set up for automated code reviews on this repo. Configure here.