A Chrome extension that generates intelligent, context-aware autocomplete suggestions as you type β powered by Groq's free LLM API.
Thanks to everyone who has helped improve SuggestPilot!
|
@Shantanugupta43 14 PRs merged |
@raido5 1 PR merged |
@mira-craft 1 PR merged |
@Utkarsh-rwt 1 PR merged |
Video.Project.12.2.1.mp4
Most autocomplete tools look at the word you're typing. This one looks at you β what you've been researching for the last 30 minutes, what tabs you have open, what page you're on everything locally on your browser, never sharing with any third parties.
Sign up at console.groq.com/keys β no credit card required. Groq's free tier is generous and more than enough for personal use.
From source (Chrome):
git clone https://github.com/Shantanugupta43/SuggestPilot.git
cd SuggestPilot- Open Chrome and go to
chrome://extensions - Enable Developer mode (top right toggle)
- Click Load unpacked and select the cloned folder
- The extension icon appears in your toolbar
Click the extension icon β Configure Settings β paste your Groq API key β Save Settings.
Hit Test Connection after save settings to confirm everything's working.
When you pause typing (500ms debounce), the content script sends a message to the service worker with:
- The current input value
- The page type (AI chat / coding / search / general)
- Form field metadata (field type, nearby label text, local candidates)
The service worker assembles a context object from:
- Session intent β the extracted research thread from
session-tracker.js - Open tabs β titles of other tabs in the current window (excluding sensitive domains)
- Recent history β last 2 hours of browsing, filtered for useful titles
This gets packed into a tight token-efficient prompt and sent to Groq's llama-3.1-8b-instant model. The response is parsed and returned as 3 ranked suggestions.
session-tracker.js maintains a rolling window of up to 20 recent queries in chrome.storage.local. After each generation, it:
- Pushes the new query into the session
- Extracts dominant topics via word/bigram frequency (filtering stopwords)
- Builds a short summary string like
"Researching: python async, asyncio, concurrency"
This summary is prepended to every subsequent prompt as SESSION: and THREAD: context. Sessions expire after 30 minutes of inactivity.
form-detector.js classifies the focused input by combining name, id, placeholder, autocomplete, aria-label, and type attributes against 18 semantic field patterns. For deterministic fields (OS, browser, issue description), it builds candidates locally from navigator.userAgent β no API call. For professional fields (job title, company, LinkedIn URL), it scans open tabs for matching domains and extracts values from page titles.
If local candidates are available, they're returned directly without hitting the API. If the field type is recognised but no local candidates exist, the field type is included in the Groq prompt so the model can generate context-appropriate suggestions.
The prompt is deliberately minimal to stay within token budget and maximise inference speed:
Q:"python async"
SESSION:Researching: python async, asyncio, concurrency
THREAD:python performance β asyncio event loop β python async
TABS:"Asyncio β Python 3.12 docs", "Stack Overflow: asyncio vs threads"
HIST:"Real Python β Async IO", "Python concurrency guide"
The system prompt instructs the model to produce 3 completions as structured JSON β suggestion[0] continuing the session thread, suggestion[1] from tabs/history context, suggestion[2] flexible.
The extension is silently disabled on certain sites. Currently:
// content-script.js
const BLOCKED_DOMAINS = [
'linkedin.com'
];To add more, edit this array. The extension still reads LinkedIn tabs as context when you're on other sites (e.g. to pull your job title for form filling) β it just won't show suggestions while you're on LinkedIn.
If you have a suggestion or want to blacklist more domains. Flag it on issues tab with the reason of blacklist and why?
- No data leaves your browser except the minimal prompt sent to Groq for inference
- No analytics, no tracking, no external servers beyond the Groq API
- Browsing history is read locally and never stored outside
chrome.storage.local - Sensitive fields (password, credit card, CVV, SSN, bank, PIN, OTP, tokens) are silently skipped β the overlay never appears on them
- Session data is stored locally and auto-expires after 30 minutes of inactivity
- All data is cleared when you click Clear All Data in settings
The Groq API prompt contains tab titles and recent page titles from your browser. If you're concerned about this, you can disable Tab Analysis and History Tracking in settings β suggestions will still work but will be less contextual.
Pull requests are welcome. A few areas that would make a meaningful difference:
- More form field types β
form-detector.jscurrently handles 18 patterns. Expanding coverage for more field types (education, languages, pronouns, timezone) would improve the form-fill feature significantly. - Blocked domains list β a community-maintained list of sites where suggestions are unwanted or intrusive would be useful.
- Better LinkedIn tab parsing β job title and company extraction from LinkedIn page titles is heuristic and fragile. Better selectors or a more robust parsing strategy would help.
- Firefox support β the extension uses Chrome-specific APIs (
chrome.history,chrome.tabs). A Firefox-compatible manifest v2 port would broaden reach. - Tests β there are none. Unit tests for
session-tracker.js,form-detector.js, andgroq-service.jsparsing logic would be a good place to start.
If you'd like to contribute code, please follow this workflow.
Click Fork on GitHub to create your own copy of the repository.
git clone https://github.com/YOUR-USERNAME/SuggestPilot.git
cd SuggestPilotAlways create a new branch from main.
Never commit directly to main.
git checkout -b feature/short-descriptionExamples:
feature/add-timezone-fieldfix/session-expiry-logicrefactor/prompt-builderdocs/improve-readme
Keep branches small and focused on one change.
Before submitting:
- Test locally via
chrome://extensions - Ensure there are no console errors
- Confirm suggestions still return valid JSON
- Make sure typing latency is not degraded
- Verify no sensitive fields are exposed
Use clear, descriptive commit messages
git push origin feature/short-descriptionGo to your fork on GitHub and click Compare & pull request.
If changes are requested, update your branch and push again β the PR will update automatically.
- Groq for the free, fast inference API
- Meta / Llama for the open-weight model powering suggestions