commits) async {
+ final response = await http.post(
+ Uri.parse(endpoint),
+ headers: {
+ 'Authorization': 'Bearer $token',
+ 'Content-Type': 'application/json',
+ },
+ body: jsonEncode({
+ 'model': ApiConfig.aiModel,
+ 'prompt': _formatCommitsPrompt(commits),
+ 'temperature': 0.7,
+ }),
+ );
+
+ return jsonDecode(response.body);
+ }
+}
+````
+
+## Benefits
+
+1. **Natural Language Understanding**
+ - Understands commit message context
+ - Detects mood and sentiment
+ - Maps development activity to music
+
+2. **Intelligent Playlist Generation**
+ - Creates contextual song recommendations
+ - Provides reasoning for each song choice
+ - Adapts to different coding activities
+
+3. **Fallback Support**
+ - Local sentiment analysis as backup
+ - Continues working when API is unavailable
+ - Maintains core functionality offline
+
diff --git a/workshop/models-feature-prompts.md b/workshop/models-feature-prompts.md
new file mode 100644
index 0000000..ad64838
--- /dev/null
+++ b/workshop/models-feature-prompts.md
@@ -0,0 +1,86 @@
+# Breaking Down GitBey Components into Focused Prompts
+
+## 1. API Configuration Setup
+
+```markdown
+I need help creating a secure configuration system for my Flutter app that handles multiple API integrations.
+
+Requirements:
+- Separate sensitive credentials from public config
+- Support GitHub Models API integration
+- Support Spotify API integration
+- Include model settings
+- Follow Flutter best practices for config management
+
+Please create the configuration files with proper documentation.
+```
+
+## 2. GitHub Models Integration
+
+```markdown
+I need to implement the GitHub Models API integration for sentiment analysis.
+
+Requirements:
+- Create a service class for API communication
+- Handle authentication with GitHub Models API
+- Process commit messages into AI-friendly prompts
+- Support retry mechanisms
+- Return structured playlist data
+- Include error handling
+- Add proper logging
+
+The response should match this format:
+```json
+{
+ "mood": "string",
+ "songs": [{
+ "title": "string",
+ "reasoning": "string"
+ }]
+}
+```
+
+## 3. Fallback Sentiment Analyzer
+
+```markdown
+I need a local sentiment analyzer as a fallback system when the AI service is unavailable.
+
+Requirements:
+- Create a lightweight sentiment detection system
+- Define mood categories relevant to BeyoncΓ©'s discography
+- Map commit keywords to moods
+- Create a curated song list for each mood
+- Ensure fast response times
+- Include unit tests
+- Add documentation for the sentiment rules
+```
+
+## 4. State Management and UI Integration
+
+```markdown
+I need help integrating the playlist generation system into the Flutter UI.
+
+Requirements:
+- Handle loading states
+- Show error messages
+- Display playlist results
+- Support offline mode
+- Add retry functionality
+- Include pull-to-refresh
+- Add animations for state transitions
+```
+
+## 5. Error Handling and Network Management
+
+```markdown
+I need comprehensive error handling for the API integration.
+
+Requirements:
+- Handle network timeouts
+- Manage API rate limits
+- Support offline detection
+- Add retry mechanisms
+- Show user-friendly error messages
+- Include logging for debugging
+- Support graceful degradation to local analysis
+```
diff --git a/workshop/mpc-setup.md b/workshop/mpc-setup.md
new file mode 100644
index 0000000..f2390fe
--- /dev/null
+++ b/workshop/mpc-setup.md
@@ -0,0 +1,111 @@
+# Setting up Perplexity and GitHub MCP Servers
+
+## Prerequisites
+- Docker installed on your machine
+- VS Code with MCP extension
+- GitHub Personal Access Token
+- Perplexity API Key
+
+## Setup Instructions
+
+### 1. Create Required Tokens
+
+**Get GitHub Token:**
+1. Go to GitHub Settings β Developer Settings β Personal Access Tokens
+2. Create a new token with required permissions
+3. Copy the token for later use
+
+**Get Perplexity API Key:**
+1. Visit [Perplexity AI](https://www.perplexity.ai/)
+2. Get your API key from account settings
+3. Copy the key for later use
+
+### 2. Configure VS Code Settings
+
+1. Create or update mcp.json:
+
+````jsonc
+{
+ "inputs": [
+ {
+ "type": "promptString",
+ "id": "perplexity-key",
+ "description": "Perplexity API Key",
+ "password": true
+ },
+ {
+ "type": "promptString",
+ "id": "github_token",
+ "description": "GitHub Personal Access Token",
+ "password": true
+ }
+ ],
+ "servers": {
+ "github": {
+ "command": "docker",
+ "args": [
+ "run",
+ "-i",
+ "--rm",
+ "-e",
+ "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "ghcr.io/github/github-mcp-server"
+ ],
+ "env": {
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
+ }
+ },
+ "perplexity-ask": {
+ "command": "docker",
+ "args": [
+ "run",
+ "-i",
+ "--rm",
+ "-e",
+ "PERPLEXITY_API_KEY",
+ "mcp/perplexity-ask"
+ ],
+ "env": {
+ "PERPLEXITY_API_KEY": "${input:perplexity-key}"
+ }
+ }
+ }
+}
+````
+
+### 3. Start the Servers
+
+1. Open VS Code Command Palette (`Cmd + Shift + P`)
+2. Type "MCP: Start Servers"
+3. VS Code will prompt for:
+ - Perplexity API Key
+ - GitHub Personal Access Token
+
+### 4. Verify Setup
+
+Check if servers are running:
+````bash
+docker ps
+````
+
+You should see containers for:
+- `github-mcp-server`
+- `perplexity-ask`
+
+### 5. Troubleshooting
+
+If servers don't start:
+1. Check Docker is running:
+````bash
+docker --version
+````
+
+2. Verify token permissions:
+````bash
+curl -H "Authorization: token YOUR_GITHUB_TOKEN" https://api.github.com/user
+````
+
+3. Reset credentials:
+ - Open Command Palette
+ - Type "MCP: Clear Stored Inputs"
+ - Restart servers with new tokens
diff --git a/workshop/token-management-info.md b/workshop/token-management-info.md
new file mode 100644
index 0000000..f769e79
--- /dev/null
+++ b/workshop/token-management-info.md
@@ -0,0 +1,55 @@
+# Token Management in GitBey
+
+The app uses a two-file approach for managing API tokens securely:
+
+1. **Public Configuration** (api_config.dart):
+```markdown
+- Contains non-sensitive configuration
+- References tokens through getters
+- Includes API endpoints and model settings
+- Safe to commit to version control
+```
+
+2. **Secure Tokens** (`api_tokens.dart`):
+```markdown
+- Contains sensitive credentials
+- Gitignored to prevent accidental commits
+- Holds actual token values
+- Should be kept secure and not shared
+```
+
+## Implementation Structure
+
+Here's how the token management is set up:
+
+````dart
+// This file should be gitignored
+class ApiTokens {
+ static const String githubModelsToken = 'your-github-models-token';
+ static const String spotifyClientId = 'your-spotify-client-id';
+ static const String spotifyClientSecret = 'your-spotify-client-secret';
+ static const String spotifyRedirectUri = 'your-spotify-redirect-uri';
+}
+````
+
+## Best Practices Used
+
+1. **Separation of Concerns**
+ - Configuration logic separated from sensitive data
+ - Clean interface through getter methods
+ - Easy to modify tokens without changing app logic
+
+2. **Security Measures**
+ ```markdown
+ - .gitignore includes api_tokens.dart
+ - No hardcoded tokens in version control
+ - Tokens accessed through static getters
+ ```
+
+3. **Development Flow**
+ ```markdown
+ 1. Developer copies api_tokens_example.dart to api_tokens.dart
+ 2. Fills in real tokens locally
+ 3. .gitignore prevents committing real tokens
+ ```
+
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy