From 6109c1e8fed4bb0c2f17077ac3b8824848fffb45 Mon Sep 17 00:00:00 2001 From: AhmedV20 <160046016+AhmedV20@users.noreply.github.com> Date: Sat, 24 Jan 2026 16:05:09 +0200 Subject: [PATCH] feat(v1.2.0): OpenAI support, analyzed files dropdown, DOM scraping Features: - Add OpenAI provider (GPT-4o) with streaming support - Add Analyzed Files Dropdown with glow animation - Implement client-side DOM scraping strategy - Add smart file prioritization with 80k token budget - Enhance cache management with repo-specific delete Improvements: - Redesign Analyze button with status colors - Add request throttling (30s cooldown) - Remove GitHub token requirement for public repos - Update README.md (remove Firefox, add Chrome manual) - Update PRIVACY.md with OpenAI provider Removed: - ChatInterface.tsx (consolidated into HomeTab) - GitHubTokenModal.tsx (no longer needed) --- .github/workflows/deploy-edge.yml | 7 - PRIVACY.md | 7 +- README.md | 54 +- package.json | 2 +- public/manifest.json | 3 +- src/background/api/ai-provider.ts | 31 +- src/background/api/github.ts | 157 +++- src/background/api/provider-factory.ts | 14 + src/background/api/providers/openai.ts | 235 ++++++ src/background/index.ts | 23 + src/background/services/analysis.ts | 146 +++- src/background/services/cache.ts | 86 +- .../services/strategies/client-strategy.ts | 200 +++++ src/background/services/strategies/factory.ts | 41 + .../services/strategies/file-prioritizer.ts | 148 ++++ .../services/strategies/prompt-optimizer.ts | 231 ++++++ src/background/services/strategies/types.ts | 52 ++ src/content/components/AnalysisPanel.tsx | 2 +- src/content/components/AnalyzeButton.tsx | 176 ++-- .../components/AnalyzedFilesDropdown.tsx | 161 ++++ src/content/components/ChatInterface.tsx | 366 --------- src/content/components/GitHubTokenModal.tsx | 308 ------- src/content/components/HomeTab.tsx | 597 +++++++++++--- src/content/components/SettingsTab.tsx | 749 +++++++++++++++--- src/content/components/ThinkingBox.tsx | 20 +- src/content/hooks/useAnalysis.ts | 90 ++- src/content/index.tsx | 15 +- src/content/utils/domScraper.ts | 190 +++++ src/content/utils/fileTreeScraper.ts | 111 +++ src/content/utils/thinkingParser.ts | 59 +- src/shared/constants.ts | 35 +- src/shared/types/index.ts | 73 ++ 32 files changed, 3266 insertions(+), 1123 deletions(-) create mode 100644 src/background/api/providers/openai.ts create mode 100644 src/background/services/strategies/client-strategy.ts create mode 100644 src/background/services/strategies/factory.ts create mode 100644 src/background/services/strategies/file-prioritizer.ts create mode 100644 src/background/services/strategies/prompt-optimizer.ts create mode 100644 src/background/services/strategies/types.ts create mode 100644 src/content/components/AnalyzedFilesDropdown.tsx delete mode 100644 src/content/components/ChatInterface.tsx delete mode 100644 src/content/components/GitHubTokenModal.tsx create mode 100644 src/content/utils/domScraper.ts create mode 100644 src/content/utils/fileTreeScraper.ts diff --git a/.github/workflows/deploy-edge.yml b/.github/workflows/deploy-edge.yml index 40f77a9..813ccef 100644 --- a/.github/workflows/deploy-edge.yml +++ b/.github/workflows/deploy-edge.yml @@ -189,13 +189,6 @@ jobs: api-key: ${{ secrets.EDGE_API_KEY }} client-id: ${{ secrets.EDGE_CLIENT_ID }} upload-only: true - notes-for-certification: | - v${{ needs.validate.outputs.version }} release - - Bug fixes and performance improvements - - CSS isolation fixes - - GitHub API optimization - - GitHub: https://github.com/AhmedV20/codemind - name: โ Upload success if: success() diff --git a/PRIVACY.md b/PRIVACY.md index 0ed9cd5..4fc8d54 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -10,8 +10,8 @@ CodeMind is a browser extension that provides AI-powered analysis of GitHub repo ### What We Collect - **API Keys:** Stored locally in your browser using Chrome's storage API. Never transmitted to our servers. -- **Repository Data:** Temporarily fetched from GitHub's public API for analysis. Not stored permanently. -- **GitHub Token (Optional):** If you add a GitHub token for rate limit handling, it's stored locally only. +- **Repository Data:** Temporarily fetched from GitHub for analysis. Not stored permanently. +- **Cached Analyses:** Stored locally and automatically expire after 24 hours. ### What We Don't Collect - Personal information @@ -28,9 +28,10 @@ All data is stored **locally on your device**: ## Third-Party Services CodeMind connects to: -1. **GitHub API** - To fetch public repository information +1. **GitHub** - To fetch public repository information (no authentication required) 2. **AI Providers** (user-selected): - Google Gemini API + - OpenAI API - Anthropic Claude API - HuggingFace Inference API - OpenRouter API diff --git a/README.md b/README.md index 486b778..4b343bf 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
+
๐ In Progress
-Firefox submission is underway. We'll notify you once it's available!
+๐ง Developer Mode
+Install manually via instructions below