Repository navigation
feat: add plain-text session suggestions across chat surfaces - #3388
Merged
Merged
Conversation
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.
Summary
After a successful interactive turn, offer one optional next-input suggestion using the turn's model and request context. The model returns plain text; accepting a suggestion fills and focuses the composer without submitting it.
Type and Areas
Feature and regression protection. Agent runtime/assembly, config/event contracts, remote session streams, desktop Web UI, mobile web and native mobile.
Motivation / Impact
Users can continue a conversation from a grounded follow-up without retyping it. Suggestions are enabled by default and configurable in session settings. The runtime reuses the completed turn's request prefix, tools and cache routing; it never executes suggested tool calls. CLI, ACP, bots, detached jobs and subagents are excluded from generation.
Legacy config defaults and explicit opt-out round trips are covered. Older hosts omit the optional setting/event and remain usable. This adds no RPC command or required protocol capability.
Verification
Passed locally:
pnpm --dir src/mobile-web run test:host-stream: 22 tests;test:prompt-suggestion-browser: real browser/production composer at 390px and 1200px, exact text, focus, no submission, offline/sending gates and new-turn retirement.pnpm run check:core-boundaries,i18n:audit,theme:color-audit:all,capabilities:check,mobile:ui:check,harmony:architecture, formatting and diff whitespace checks.Existing local failures outside this diff:
check:webstops at 25 typography audit violations in design-lab/MobileAvatar/MobileTag;mobile:architecturereports the existing shared test platform-tree reference and three public constructor defaults. The broader KMP session suite has an existing attachment retry failure reproduced with the unchanged baseline. These files/baselines were not relaxed for this feature.Remote coverage uses simulated host streams and provider fixtures. No live SSH workspace, Relay, Peer Device or Detached Dispatch topology was exercised; HarmonyOS device/foldable visual verification was unavailable. The opt-in live-provider desktop E2E is included but was not used as evidence for this review.
Reviewer Notes
AI-assisted implementation and review. Four feature commits separate runtime, Web surfaces, Android/iOS and HarmonyOS; a merge commit synchronizes current upstream main. Generated capability and mobile design artifacts are included with their owner changes. GitHub CI passed on
ed1e8d1ff74c6a15f0fe5b9c43cbdaa43cd568b9: CI run, including all three Rust/CLI platforms and Frontend Build. The Linux full core suite passed 2,590 tests and its Desktop suite passed 431 tests; all nine suggestion generation tests ran successfully.Checklist