Skip to content

Add a setting for longer inline completions - #4

Merged
seeARMS merged 3 commits into
mainfrom
seeARMS/completion-length-setting
Sep 6, 2026
Merged

Add a setting for longer inline completions#4
seeARMS merged 3 commits into
mainfrom
seeARMS/completion-length-setting

Conversation

@seeARMS

@seeARMS seeARMS commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Fixes #2.

The old prompt requested only 3–10 words, and cleanup truncated suggestions to one sentence, 12 words, or 96 characters. Add a persisted More actions → Completion length setting: Short (default), Medium, and Long. The selected target controls both generation instructions and the sentence/word/character limits so longer responses survive Tab acceptance.

Changing length also cancels an in-flight suggestion and restores editor focus immediately so the new request can run. Invalid saved values fall back to Short.

Validation:

  • All 18 Chromium browser tests passed against the combined production build, including the 11 spacing regressions from Fix partial-word boundaries in inline completions #3.
  • Seven length tests cover default behavior, Medium/Long persistence after reload, complete Tab acceptance (including a 60-word, 346-character response), long suggestions beginning inside a word, invalid preferences, stale response rejection, and touch interaction at 390px width.
  • Browser tests control only the model API response; the editor, hooks, cleanup, preference storage, and key handlers run normally.
  • Also drove Chrome with real Gemini Nano in the final production build: selected Long, confirmed it remained selected after reload, generated a 48-word continuation across four sentences, and accepted the full text with Tab (53 words / 300 characters including the existing draft).
  • npm run typecheck, npm run build, and git diff --check passed.

Word ranges are generation targets; the local model can still return a shorter suggestion.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
draftside 03b551b Sep 06 2026, 05:18 PM

@seeARMS
seeARMS force-pushed the seeARMS/completion-length-setting branch from d2e63b3 to 03b551b Compare September 6, 2026 17:18
@seeARMS
seeARMS changed the base branch from seeARMS/fix-two-github-comments to main September 6, 2026 17:18
@seeARMS
seeARMS merged commit 696cf25 into main Sep 6, 2026
1 of 2 checks passed
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.

There should be a setting to predict more tokens ahead.

1 participant