Skip to content

feat: add plain-text session suggestions across chat surfaces - #3388

Merged
bobleer merged 5 commits into
GCWing:mainfrom
bobleer:bob/session-prompt-suggestions
Oct 14, 2026
Merged

bobleer merged 5 commits into
GCWing:mainfrom
bobleer:bob/session-prompt-suggestions

Conversation

@bobleer

@bobleer bobleer commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • Try the lowest supported reasoning setting, then retry once with the original session client only if preparing or calling the first client fails. Both attempts share an 80-second deadline and cancellation; empty/null output, tool calls and filtered responses remain silent. No JSON Schema, format negotiation, truncation or rewritten output.
  • Add the session setting and localized desktop keyboard hint, plus mobile web, Android, iOS and HarmonyOS composer actions.
  • Keep suggestions tied to the latest completed turn and device surface. New turns, history rewrites, host restart and disconnect gates prevent stale hints from appearing or crossing sessions/devices.

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:

  • Focused Rust suggestion tests: 9 core tests and 7 portable runtime tests, including real local HTTP/SSE fixtures for plain-text output, reasoning fallback, request identity, cancellation and the shared timeout.
  • Six focused Web UI test files: 92 tests covering settings, event delivery, stale-turn retirement, device isolation and composer key policy; Web UI and mobile web TypeScript checks.
  • 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.
  • Focused KMP session/replica tests; iOS simulator core compilation. Android suggestion UI test on compact and wide emulator layouts; iOS suggestion UI test on iPhone and iPad simulators.
  • HarmonyOS session-record/composer/host-stream tests: 52 tests, and debug HAP build.
  • 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:web stops at 25 typography audit violations in design-lab/MobileAvatar/MobileTag; mobile:architecture reports 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

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit dc8b8e7 into GCWing:main Oct 14, 2026
13 checks passed
@bobleer
bobleer deleted the bob/session-prompt-suggestions branch October 18, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant