Repository navigation
feat(composer): add next-message predictions - #6568
Merged
Merged
Conversation
M4n5ter
force-pushed
the
feat/composer-predictions
branch
2 times, most recently
from
November 2, 2026 07:54
c91e7e2 to
8bddfe3
Compare
Generated-by: Codex
M4n5ter
force-pushed
the
feat/composer-predictions
branch
from
November 2, 2026 09:29
90f2460 to
2e683f6
Compare
3 of 6 tasks
3 of 8 tasks
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
Adds next-message suggestions to the empty composer after a reply and when reopening a conversation. Muted inline text and a trailing acceptance hint follow the ChatGPT interaction. Tab, Right Arrow, Enter, or clicking the hint inserts an editable, undoable draft; Escape dismisses it. Typing and IME composition hide the preview. Failures stay out of the chat UI and are logged.
Predictions are enabled by default, with 100% reply sampling and 50% reopen sampling. Agent-created sessions (
parentSessionId != null) are always excluded. Settings → General → Message predictions adds Only for regular conversations, off by default: enabling it additionally excludes the registered Bot. The interface does not expose the internal session classification.The General settings table supports both switches, fractional sampling percentages, and editing/restoring instructions. English defaults match the observed ChatGPT prompt; Simplified and Traditional Chinese defaults translate it. The original one-line/240-character guidance remains in the prompt without an extra hard parser rejection.
Prediction extends the completed conversation's frozen Main request and verifies its exact prefix before dispatch. It reuses the model, reasoning, system instructions, tool declarations, provider options, output budget, and tool choice. The auxiliary path accounts for usage without dispatching local tools or appending conversation events. Cancellation and source/configuration changes retire stale results. No temporary conversation is created, and there is no separate prediction model/effort configuration or global frontend inference queue.
Auxiliary requests reuse the main model executor and collect ordinary output text rather than buffering all provider events. This removes the independent idle timeout and cumulative event-size cap while preserving usage/cancellation custody. Existing title/recap regressions have also been exercised.
Synced with
rust-previewthrough750eca369, including upstream removal of planning mode and the revised CI/test setup.Verification
The feature keeps a few focused cases by extending existing fixtures and lifecycle tests:
SendUser → sleep → prediction → next user message, exact prefix/options reuse, unchanged outbox/conversation events, default Bot support, and exclusion when the new switch is on. Model responses are fixtures.just fmt-check,just lint,just typecheck,just test-js(180 tests),just licenses, and strict Clippy for the desktop integration target pass. Focused Rust runs pass: 2 Bot/delegation cases, settings reopening, 9 component regressions, and the desktop prediction case in all four visual configurations.The history assertion checks session-scoped canonical events.
observe.throughis partition-wide and can legitimately advance due to auxiliary usage accounting, so equality of that cursor is not a valid no-chat-write assertion. The focused side-pane draft-isolation test replaces the earlier intermittent multi-pane/resize scenario. Obsolete pixel/TMPDIR checks removed upstream were not restored.Full workspace Rust tests were not run locally; the focused checks above do not claim a complete workspace test pass.
Actual desktop renderer captures (fixture conversation; scope switch enabled):
AI use
Tool(s) and scope: OpenAI Codex implemented the feature, localized copy, and tests. ChatGPT desktop behavior and its observed default instructions informed the reconstruction. AI-authored commits include a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?