clementbowe14 / clementbowe14/JobAppsAgentified
EXT-03: Secure AI Integration Service Layer
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Objective
Establish a secure connection service layer to handle communication with the Gemini API (using a user settings-defined API key) and gracefully fallback to Chrome's built-in window.ai Prompt API if available.
Description
Develop a shared class/wrapper that reads the API configuration from storage. Create a simple settings panel to input and validate the user's Gemini API key. Implement robust response parsing, connection checks, and error boundaries.
Acceptance Criteria (Subtasks)
- Settings page allows saving an API key into
chrome.storage.localwith visual masking (password field type) - The service layer detects native Chrome
window.aiPrompt API parameters first, falling back to Gemini API via HTTP fetch if unavailable - Standardized function signature for prompts:
async generateResponse(systemPrompt, userPrompt, options) - Rate limiting, empty key, or network disconnection scenarios show clean inline notifications instead of breaking the UI
Files to Create
src/common/api.jssrc/settings/settings.htmlsrc/settings/settings.js
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the planned entry points in src/common/api.js, src/settings/settings.html, and src/settings/settings.js. Define the shared generateResponse(systemPrompt, userPrompt, options) flow around the Chrome window.ai fallback and Gemini HTTP path, then verify the listed storage, masking, validation, parsing, rate-limit, empty-key, and disconnection behaviors are handled with inline notifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100