Add suggested prompts to contextual sheet - #9349
Open
joshliebe wants to merge 24 commits into
Open
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
karlenDimla
reviewed
Jul 31, 2026
karlenDimla
reviewed
Jul 31, 2026
karlenDimla
reviewed
Jul 31, 2026
karlenDimla
reviewed
Jul 31, 2026
| private fun uiLanguageSubtag(uiLocale: String): String { | ||
| return localeFrom(uiLocale).language.lowercase() | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Is it expected that for a different locale we only show the translate prompt? We never translate the suggested prompts?
Contributor
Author
There was a problem hiding this comment.
I will translate the suggested prompts in a follow-up PR
Contributor
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 0a77549. Configure here.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1217024500235994?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/481882893211075/task/1216117537545343?focus=true
API Proposals URL(s) (if applicable):
Description
Steps to test this PR
Fresh install from this branch
Movie
E-commerce
Paper
Recipe
New chat
Navigation
Loading indicator
Automatically Send Page Context
Disable feature
(if the sheet is already open it requires a new page context or closing the sheet to clear)
UI changes
Context unattached
Context attached
No suggestions (context unattached)
No suggestions (context attached)
Note
Low Risk
UI and local catalog matching only; prompt submission reuses existing contextual send/context paths with broad test coverage. No auth or network contract changes beyond advertising supportsSuggestions to the web layer.
Overview
Adds context-aware suggested prompts on the contextual Duck.ai input surface, gated by a new
contextualSuggestedPromptsfeature toggle (defaults internal).A bundled
PageSuggestionsCatalog.jsondrives labels, prompts, and icons;ContextualSuggestionsMatcherpicks candidates from JSON-LD type, Open Graph type, hostname, and defaults (e.g. translate when page language differs from UI). The provider drops the standalone summarize-page catalog entry so summarize is not duplicated when suggestions are shown.New
ContextualSuggestionsView(loading dots, scrollable chips) loads on INPUT sheet mode, refreshes when page context updates, and clears in WEBVIEW mode. Tapping a suggestion attaches page context when needed and submits the prompt (preserving any typed draft). The summarize quick-action chip is hidden when suggestions are visible and summarize would overlap; an Ask about page quick action reserves one slot in the suggestion budget.The contextual prompts area is wrapped in a
NestedScrollView.supportsSuggestionsis added to the AI chat native JS config when contextual mode and the toggle are on. New chat half-expansion re-requests page context so suggestions can refresh.Reviewed by Cursor Bugbot for commit a2e0a74. Bugbot is set up for automated code reviews on this repo. Configure here.