Skip to content

terminalchai/SuggestPilot

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SuggestPilot AI Context Assistant

A Chrome extension that generates intelligent, context-aware autocomplete suggestions as you type β€” powered by Groq's free LLM API.

πŸ™Œ Contributors

Thanks to everyone who has helped improve SuggestPilot!

Shantanugupta43
@Shantanugupta43
14 PRs merged
raido5
@raido5
1 PR merged
mira-craft
@mira-craft
1 PR merged
Utkarsh-rwt
@Utkarsh-rwt
1 PR merged
Video.Project.12.2.1.mp4

What It Does

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.

Getting Started

1. Get a Free Groq API Key

Sign up at console.groq.com/keys β€” no credit card required. Groq's free tier is generous and more than enough for personal use.

2. Install the Extension

From source (Chrome):

git clone https://github.com/Shantanugupta43/SuggestPilot.git
cd SuggestPilot
  1. Open Chrome and go to chrome://extensions
  2. Enable Developer mode (top right toggle)
  3. Click Load unpacked and select the cloned folder
  4. The extension icon appears in your toolbar

3. Configure

Click the extension icon β†’ Configure Settings β†’ paste your Groq API key β†’ Save Settings.

Hit Test Connection after save settings to confirm everything's working.

How It Works

Suggestion Generation

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 Tracking

session-tracker.js maintains a rolling window of up to 20 recent queries in chrome.storage.local. After each generation, it:

  1. Pushes the new query into the session
  2. Extracts dominant topics via word/bigram frequency (filtering stopwords)
  3. 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 Fill

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.

Prompt Design

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.

Blocked Domains

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?

Privacy

  • 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.

Contributing

Pull requests are welcome. A few areas that would make a meaningful difference:

  • More form field types β€” form-detector.js currently 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, and groq-service.js parsing logic would be a good place to start.

How to Contribute (Branch & Pull Request Workflow)

If you'd like to contribute code, please follow this workflow.

1. Fork the Repository

Click Fork on GitHub to create your own copy of the repository.

2. Clone Your Fork

git clone https://github.com/YOUR-USERNAME/SuggestPilot.git
cd SuggestPilot

3. Create a New Branch

Always create a new branch from main.
Never commit directly to main.

git checkout -b feature/short-description

Examples:

  • feature/add-timezone-field
  • fix/session-expiry-logic
  • refactor/prompt-builder
  • docs/improve-readme

Keep branches small and focused on one change.

4. Make Your Changes

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

5. Commit Clearly

Use clear, descriptive commit messages

6. Push Your Branch

git push origin feature/short-description

7. Open a Pull Request

Go 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.

Acknowledgements

  • Groq for the free, fast inference API
  • Meta / Llama for the open-weight model powering suggestions

About

An open-source Chrome extension that generates intelligent, context-aware autocomplete suggestions as you type - powered by Groq's free LLM API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 83.7%
  • CSS 9.3%
  • HTML 7.0%