Skip to content

SquaredPiano/idlemind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

100 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Autonomous Copilot πŸ€–

AI-powered autonomous code analysis for VSCode. Built with a frontend-first architecture that makes backend integration trivial β€” perfect for hackathons!

⚑ Quick Start

Run Demos (CLI)

See all available demos:

npm run demo

Run specific demos:

npm run demo:gemini      # AI code analysis
npm run demo:voice       # Voice synthesis
npm run demo:git         # Git logs tracking
npm run demo:orchestrator # Full pipeline
npm run demo:idle        # Idle detection

For full demo guide: See DEMO_SETUP.md

Run Extension (VSCode)

Try it now (2 minutes):

npm run compile

Press F5 β†’ Extension loads with fully functional UI using mock data!

For detailed instructions: See QUICKSTART.md


🎯 What Is This?

An intelligent VSCode extension that:

  • πŸ“Š Collects developer context (files, edits, git history, cursor position)
  • πŸ€– Analyzes code with AI (using Gemini API)
  • πŸ” Finds issues automatically (errors, warnings, suggestions)
  • 🎀 Speaks results (using ElevenLabs voice synthesis)
  • ⚑ Runs autonomously (analyzes code when you're idle)

Key Innovation: Frontend-First Architecture

The entire UI is built and working with mock services. When your backend is ready:

// Change this line:
const aiService = new MockAIService();

// To this:
const aiService = new AIService();

That's it! The UI automatically uses real data. Perfect for parallel development in hackathons.


✨ Features

Status Bar Integration

  • Real-time state display (Idle β†’ Analyzing β†’ Complete)
  • Click to open dashboard
  • Visual feedback with icons and colors

Dashboard (Sidebar)

  • Developer Context: Files, edits, git info, session stats
  • AI Analysis: Issues found, risk level, confidence score
  • Issue List: Top issues with severity badges
  • Action Buttons: Analyze, Toggle Autonomous, Refresh

Issues Tree View

  • Hierarchical display (files β†’ issues)
  • Click to navigate to code location
  • Severity icons and tooltips
  • Real-time updates

Smart Analysis

  • Considers edit frequency to identify "risky" files
  • Uses developer context for better suggestions
  • Progressive updates with status messages
  • Categorizes by severity (error/warning/info)

Autonomous Mode

  • Triggers analysis after idle timeout
  • Voice notification when complete
  • Configurable timeout period
  • Toggle on/off easily

πŸ“š Documentation

πŸš€ Getting Started

πŸ‘¨β€πŸ’» For Backend Developers

🎬 For Demos


πŸ—οΈ Architecture

Extension Entry Point (extension.ts)
    β”‚
    β”œβ”€ Mock Services (Current - Demo Ready!)
    β”‚   β”œβ”€ MockContextService
    β”‚   β”œβ”€ MockAIService
    β”‚   β”œβ”€ MockGitService
    β”‚   └─ MockVoiceService
    β”‚
    └─ Real Services (Your Backend - Easy Swap!)
        β”œβ”€ ContextService (VSCode API + simple-git)
        β”œβ”€ AIService (Gemini API)
        β”œβ”€ GitService (Git operations)
        └─ VoiceService (ElevenLabs API)
                β”‚
                β–Ό
        Same Events β†’ Same UI β†’ Zero Changes!

See ARCHITECTURE.md for detailed diagrams.


πŸ”§ Project Status

βœ… Complete (Day 1)

  • Service interfaces defined
  • Mock services implemented with realistic data
  • UI components built and functional
  • Dashboard with full styling
  • Issues tree view
  • Status bar integration
  • Notifications and progress indicators
  • Commands registered
  • Settings configured
  • Comprehensive documentation

πŸ”¨ In Progress (Day 2-3)

  • Real service implementations
  • Backend integration
  • API connections (Gemini, ElevenLabs)
  • Testing with real data

Current Progress: 40% (Frontend Complete, Backend Pending)


πŸ“¦ What's Included

Files Created (18 total)

Service Layer:

  • src/services/interfaces.ts - Service contracts (THE CONTRACT)
  • src/services/mock/*.ts - 4 mock services
  • src/services/real/*.template.ts - 2 starter templates

UI Layer:

  • src/ui/StatusBarManager.ts - Status bar component
  • src/ui/SidebarWebviewProvider.ts - Dashboard manager
  • src/ui/IssuesTreeProvider.ts - Tree view component
  • src/ui/NotificationManager.ts - Notification utility
  • src/ui/webview/dashboard.html - Dashboard UI

Documentation:

  • QUICKSTART.md, SUMMARY.md, ARCHITECTURE.md
  • INTEGRATION.md, DEMO.md, FRONTEND_README.md
  • CHECKLIST.md, README_DOCS.md

βš™οΈ Configuration

Users configure via VSCode settings (Cmd+, β†’ search "copilot"):

{
  "copilot.autonomous.enabled": false,
  "copilot.autonomous.idleTimeout": 300,
  "copilot.gemini.apiKey": "your-key-here",
  "copilot.elevenlabs.apiKey": "your-key-here",
  "copilot.voice.enabled": true
}

🎯 Commands

  • Copilot: Analyze Code - Trigger analysis manually
  • Copilot: Toggle Autonomous Mode - Enable/disable auto-analysis
  • Copilot: Show Dashboard - Open sidebar panel
  • Copilot: Refresh Context - Reload developer context
  • Copilot: Go to Issue - Navigate to issue location

πŸš€ Backend Integration (3 Steps)

Step 1: Implement Services

Create real service classes in src/services/real/ that implement the interfaces in src/services/interfaces.ts.

Step 2: Swap in extension.ts

Change 4 lines: import statements and instantiation.

Step 3: Test

Press F5 and verify real data flows through the UI!

For detailed guide: INTEGRATION.md


πŸ“Š Statistics

  • Lines of Code: ~2,050
  • Files Created: 18
  • Time to Build UI: 1 day
  • Time to Integrate Backend: 1-2 days (estimated)
  • Integration Complexity: 4 lines to change

🎬 Demo

Quick CLI Demos

Run module demos from the command line:

# Show demo menu
npm run demo

# Run specific demos
npm run demo:gemini       # AI code analysis demo
npm run demo:voice        # Voice synthesis demo
npm run demo:git          # Git logs demo
npm run demo:orchestrator # Full pipeline demo
npm run demo:idle         # Idle detection demo

# Run all demos
npm run demo:all

πŸ“š Full Demo Guide: DEMO_SETUP.md

VSCode Extension Demo

Press F5 to launch the extension in debug mode. You'll see:

  1. Status bar: "πŸ€– Copilot: Ready"
  2. Activity bar: Robot icon (click it)
  3. Dashboard: Context + Analysis panels
  4. Click "Analyze Now" β†’ Watch the magic!

For full demo script: DEMO.md


πŸ’‘ Why This Architecture?

For Hackathons:

  • βœ… Parallel development - Frontend and backend work independently
  • βœ… Fast iteration - UI changes don't break backend
  • βœ… Early demo - Show working UI from day one
  • βœ… Low risk - Clear contracts prevent surprises

For Production:

  • βœ… Testability - Mock services enable UI testing
  • βœ… Maintainability - Clean separation of concerns
  • βœ… Extensibility - Easy to add features
  • βœ… Reliability - Event-based architecture

πŸ§ͺ Development

# Compile TypeScript
npm run compile

# Watch mode (auto-recompile)
npm run watch

# Run extension (or press F5)
code --extensionDevelopmentPath=$PWD

# Run tests
npm test

πŸ“ Requirements

Current (for UI):

  • VSCode ^1.106.1
  • Node.js 22.x
  • TypeScript 5.x

Needed for Backend:

  • simple-git - Git operations
  • @google/generative-ai - Gemini API
  • ElevenLabs SDK - Voice synthesis

πŸ› Known Issues

  • Existing test files have compilation errors (pre-existing, not critical)
  • Mock data is static (by design, until backend integrated)
  • Voice shows notifications instead of speaking (until ElevenLabs integrated)

🀝 Contributing

To Add Features:

  1. Define interface in interfaces.ts
  2. Implement mock version
  3. Build UI component
  4. Wire up in extension.ts
  5. Document in INTEGRATION.md

To Integrate Backend:

See INTEGRATION.md for step-by-step guide.


πŸ“ž Support


πŸ† Credits

Built with ❀️ for hackathons. Frontend-first architecture makes backend integration trivial!

  • Frontend: Complete and functional βœ…
  • Backend: Ready for your implementation πŸ”§
  • Integration: 4 lines to change 🎯

πŸ“„ License

[Your license here]


Ready to integrate? Start with INTEGRATION.md!

Want to try it? See QUICKSTART.md!

Need to demo? Check DEMO.md!

πŸš€ Happy hacking! πŸš€

About

context keeper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors