Skip to content

Stabilize ghost-text size, token-budget completion length, tabby model lineup, full-accept reset#251

Merged
FuJacob merged 4 commits into
mainfrom
fix/ghost-text-size-stabilization
May 25, 2026
Merged

Stabilize ghost-text size, token-budget completion length, tabby model lineup, full-accept reset#251
FuJacob merged 4 commits into
mainfrom
fix/ghost-text-size-stabilization

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 25, 2026

Summary

  • Stabilize ghost-text size per focus session so the overlay stops resizing mid-typing.
  • Govern completion length by the shared token budget; llama drops the in-prompt word range, the Foundation Model prompt keeps the length cue (per-engine tuning).
  • Model lineup: display names tabby-fast-1 / tabby-balanced-1, drop the Qwen3.5 entry, prefer gemma-4-E2B then Qwen3-0.6B.
  • Full-accept keybind gets a Reset-to-default (backtick) button in settings and onboarding, so it can't get stuck disabled.
  • Stop tracking .writing/, remove the old Tabby->Cotabby rename docs.

Validation

xcodebuild build ...   # ** BUILD SUCCEEDED **
xcodebuild test ...     # 297 tests, 0 failures
swiftlint --quiet       # clean

Risk / rollout notes

  • Cosmetic + behavior only; no schema or signing changes. Auto-update path unaffected.

FuJacob added 4 commits May 25, 2026 06:33
Remove the explicit word-range cue from both the local-model and Apple
Intelligence prompts so completion length is governed solely by the shared
token budget (request.maxPredictionTokens). Bump suggestedPredictionTokenBudget
50% (11/18/30 -> 17/27/45) so the cap has room to land on a natural stopping
point instead of hard-truncating mid-thought. The completionLengthInstruction
parameter stays wired for a one-line revert.
Ghost font size is derived from the resolved caret height, but AX caret geometry is eventually consistent: the same field yields a tight line-height caret on one poll and the full field-height AXFrame fallback on the next. That made ghost text balloon whenever the coarse fallback won a poll.

Track the smallest caret height seen during a focus session (keyed by FocusTracker's focusChangeSequence) and clamp larger readings down to it, so the suggestion stays the size of the real text line. The baseline resets on field switch or focus loss. The existing font-size floor bounds how small a spurious low reading can make the text; positioning is intentionally unchanged.

Collapse presentOverlay's loose geometry parameters into the FocusedInputContext they already came from, which also threads focusChangeSequence through to the overlay.
The token budget for .twelveToTwenty was bumped to 45, but this test still expected the old 30 and was failing on main. Update it to match the intended budget.
…gth cue

- Model display names back to tabby-fast-1 / tabby-balanced-1; drop the
  Qwen3.5 entry (unrecognized series), prefer gemma-4-E2B then Qwen3-0.6B
- Add a Reset-to-default (backtick) button to the full-accept keybind in
  settings and onboarding, so it can't get stuck disabled
- Re-add the completion-length cue to the Foundation Model prompt while the
  llama path stays token-budget only
- Stop tracking .writing/, remove the old Tabby->Cotabby rename docs
@FuJacob FuJacob merged commit e15e4da into main May 25, 2026
3 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.

1 participant