| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Adds AI-powered autocomplete suggestions: - Real-time text completion in the block editor - Context-aware suggestions based on content - Keyboard shortcuts for accepting suggestions
The generate_suggestion() method was calling a non-existent get_model_preferences() method. Changed to use the shared get_preferred_models() helper function like other abilities.
- Prioritize gpt-5.1-nano, then claude-haiku-4-5 for faster responses - Lower ghost text z-index to avoid overlap with WordPress UI elements
Codecov Report❌ Patch coverage is 69.23077% with 68 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## develop #151 +/- ##
=============================================
- Coverage 76.71% 76.50% -0.21%
- Complexity 1828 1868 +40
=============================================
Files 87 89 +2
Lines 7764 7985 +221
=============================================
+ Hits 5956 6109 +153
- Misses 1808 1876 +68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adds an AI-powered type-ahead experiment that provides inline ghost text autocomplete suggestions in the WordPress block editor. Users can accept suggestions using keyboard shortcuts (Tab for full, Ctrl+Right for word/sentence, Escape to dismiss). The feature includes configurable completion modes and targets fast, low-cost AI models for responsive performance.
Key changes:
Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.
Show a summary per file| File | Description |
|---|---|
| webpack.config.js | Adds entry point for the type-ahead experiment bundle |
| src/utils/run-ability.ts | New utility for safe ability execution with REST API fallback |
| src/experiments/type-ahead/style.scss | Styles for ghost text overlay positioning and appearance |
| src/experiments/type-ahead/index.tsx | Main React component with DOM tracking, caret monitoring, and keyboard handlers |
| includes/Experiments/Type_Ahead/Type_Ahead.php | Experiment registration, settings, and asset enqueuing |
| includes/Experiment_Loader.php | Registers Type_Ahead experiment in default experiments list |
| includes/Abilities/Type_Ahead/system-instruction.php | AI prompt instruction for generating inline completions |
| includes/Abilities/Type_Ahead/Type_Ahead.php | Ability implementation with AI client integration and caching |
| docs/experiments/type-ahead.md | Documentation for hooks, data flow, and testing procedures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
@Jameswlepage can you add tests here like was done in https://github.com/WordPress/ai/pull/147/changes#diff-0cf348eda48cae411ad9d44a2e5b449603a971f2313b0a849893ff4cf8280c46? |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Would something like this have the ability to adhere to the defined content guidelines should someone have that implemented? |
Sorry, something went wrong.
|
Testing again via Playground, thinking we ignore the loading/cursor questions above and can funnel that off as a post-release issue to see what the community feedback is on the experiment and can adjust In the future. Otherwise, I think we should hide the options for the feature and just have the enable/disable toggle only. That would mean another top right elipses menu option for "Show/hide advanced options" sort of an option that would display these Type-ahead Text options and any other Features or Experiments that have similar advanced options (like Content Classification). |
Sorry, something went wrong.
Yeah, been on my mind on how we introduce more advanced settings while still keeping the interface clean. I think likely worth a larger conversation and not something I'd try and wrap into this PR personally. That said, looking at the settings we're adding here for Type Ahead, I'd suggest just removing those all together I think. These were added as part of the initial PR work and I just left them in place but these are all fairly advanced settings and not sure they provide much value here. @jeffpaul Any concerns if I just remove those settings all together and just have decent defaults (maybe with filters that can be used to change those?) |
Sorry, something went wrong.
|
@dkotter yes let's go ahead and remove those settings here, as I prefer to keep options in the AI settings as simple as possible (for now). I'll open a separate issue for the loading animation/cursor and the advanced settings topics so we can sort out approach on both separate from landing this Experiment. |
Sorry, something went wrong.
…sed through a filter. Fix a bug where types were incorrect
Okay, settings removed and merge conflicts resolved so I think this is good to go |
Sorry, something went wrong.
There was a problem hiding this comment.
Works well in testing via Playground, thanks!!!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What?
Adds a new type ahead experimental Feature. Automatically triggers at the end of a paragraph block and can be manually triggered within the block.
Why?
Type ahead / ghost text autocomplete is a fairly common AI pattern so this experimental Feature brings it into WordPress. Works on paragraph blocks and optionally heading blocks if turned on. Will send the surrounding content and asks the LLM to generate the next handful of words (could be a full sentence, could be a partial one).
How?
claude-haiku-4-5 → gemini-2.5-flash → gpt-4.1-nano
Use of AI Tools
Can't speak to the original code but in the cleanup, used Cursor running Codex 5.3 to refactor the typescript and debug a few issues
Testing Instructions
Screenshots