Let the keyboard alone decide a sentence start - #918
Merged
Merged
Conversation
Two rules decided sentence starts independently: the keyboard after a sentence mark it typed, and the worker after any of several marks it saw in its buffer, or at the bare start of that buffer, which is often mid-line after a reset. Each could fire without the other. The keyboard now sends its pending automatic capital with each query and the worker uses only that, so a suggestion never disagrees with the keyboard's own Shift, and a person who cancelled the capital is respected. The worker's own sentence-start guess is removed. Closes #910 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Closes #910. Part of the casing plan in #914.
What changed
sentence_start, the keyboard's pending automatic capital: a full stop, exclamation or question mark it typed, not yet followed by a letter, and not cancelled by pressing Shift. In-process pipe message only; no persisted schema change.sentence_startfield of the extracted context. Prefix and preceding-text extraction are unchanged.docs/word-prediction.mdexplains that the keyboard alone decides.Behaviour change worth knowing: at the true start of a document, with nothing typed and no punctuation, the keyboard has no signal, so the first word is not auto-capitalised. Shift once gives "Water". Before, the worker guessed a capital at the bare start of its buffer, which was right at a document start and wrong mid-line.
Validation
Node 24.13.0, Rust 1.97.1:
npm run lint,npm test(244 Vitest tests and 5 Node tests) andnpm run buildpassed. No frontend files changed.cargo fmt --checkandcargo clippy --all-targets -D warningspassed.cargo testpassed: 567 tests.🤖 Generated with Claude Code