Skip to content

Commit 5c9e541

Browse files
committed
Initial commit
0 parents  commit 5c9e541

21 files changed

+18955
-0
lines changed

‎.gitignore‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
/dist
14+
15+
# misc
16+
.DS_Store
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# Editor directories and files
27+
.idea
28+
.vscode
29+
*.suo
30+
*.ntvs*
31+
*.njsproj
32+
*.sln
33+
*.sw?

‎.prettierrc‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80,
7+
"bracketSpacing": true,
8+
"arrowParens": "avoid"
9+
}

‎README.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# AutoTab: Chrome Extension for Text Completions
2+
3+
A Chrome extension that provides AI-powered text completion for any text field on the web. As you type in any input field, text area, or contenteditable element, AutoTab will suggest completions that you can accept by simply pressing the Tab key.
4+
5+
## Features
6+
7+
- Works on any website and in any text input field
8+
- Provides real-time AI-powered text suggestions as you type
9+
- Accept suggestions with a simple Tab key press
10+
- Seamlessly integrates with existing text inputs without disrupting your workflow
11+
- Supports both standard text inputs and contenteditable elements
12+
- Intelligent debouncing to minimize API calls and improve performance
13+
14+
## Installation
15+
16+
1. Clone this repository or download the source code
17+
2. Run `npm install` to install all dependencies
18+
3. Run `npm run build` to create the distribution files (creates a new "dist" folder)
19+
4. Open Chrome and navigate to `chrome://extensions/`
20+
5. Enable "Developer mode" using the toggle in the top right corner
21+
6. Click "Load unpacked" and select the "dist" folder from this project
22+
7. The extension icon should appear in your browser toolbar - click and pin it for easy access
23+
24+
## Usage
25+
26+
1. Navigate to any website with text input fields
27+
2. Start typing in any text field
28+
3. As you type, AI suggestions will appear in light gray
29+
4. Press the Tab key to accept a suggestion
30+
5. Continue typing and accepting suggestions as needed
31+
32+
## How It Works
33+
34+
The extension uses a content script that injects into web pages and attaches event listeners to track user input. When you type, the extension sends your text to a local API server that returns AI-generated completions. These completions are displayed as an overlay that perfectly matches the styling of the input field you're typing in.
35+
36+
## Development
37+
38+
- `npm install` - Install dependencies
39+
- `npm run build` - Build the extension for production
40+
- `npm run format` - Format code using Prettier
41+
42+
## Customization
43+
44+
The extension's appearance and behavior can be customized by modifying the appropriate CSS and JavaScript files.

‎manifest.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "1.0.0",
3+
"manifest_version": 3,
4+
"name": "AI Text Completion Tutorial",
5+
"description": "AI text completion for any text field",
6+
"permissions": ["storage", "activeTab"],
7+
"content_scripts": [
8+
{
9+
"matches": ["<all_urls>"],
10+
"js": ["content.js"],
11+
"css": ["content.css"]
12+
}
13+
],
14+
"background": {
15+
"service_worker": "background.js"
16+
},
17+
"action": {
18+
"default_title": "AI Text Completion"
19+
}
20+
}

0 commit comments

Comments
 (0)