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
3715380 verified Download index.html from sadasdadasdasdad/github-chatbot-companion: direct link, hf CLI and curl.
- Browser
- Download file 11 kB
-
https://huggingface.co/spaces/sadasdadasdasdad/github-chatbot-companion/resolve/main/index.html
- Command line
-
hf download hf://spaces/sadasdadasdasdad/github-chatbot-companion/index.html
-
curl -L -o index.html https://huggingface.co/spaces/sadasdadasdasdad/github-chatbot-companion/resolve/main/index.html
11 kB
| <html lang="en" class="dark"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>GitHub ChatBot Companion</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 500: '#6e5494', // GitHub purple | |
| }, | |
| secondary: { | |
| 500: '#58a6ff', // GitHub blue | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body class="bg-gray-900 text-gray-100 min-h-screen"> | |
| <div id="app" class="container mx-auto px-4 py-8 max-w-4xl"> | |
| <!-- Header --> | |
| <header class="flex items-center justify-between mb-8"> | |
| <div class="flex items-center space-x-3"> | |
| <i data-feather="github" class="text-primary-500 w-8 h-8"></i> | |
| <h1 class="text-2xl font-bold">GitHub ChatBot</h1> | |
| </div> | |
| <button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-800 transition"> | |
| <i data-feather="moon" class="w-5 h-5"></i> | |
| </button> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="grid grid-cols-1 lg:grid-cols-3 gap-6"> | |
| <!-- Chat Window --> | |
| <div class="lg:col-span-2 bg-gray-800 rounded-xl p-6 shadow-lg"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-xl font-semibold">Bot Conversation</h2> | |
| <div class="flex space-x-2"> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="refresh-cw" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="settings" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Messages Container --> | |
| <div id="messages" class="h-96 overflow-y-auto mb-4 space-y-4 pr-2"> | |
| <!-- Bot welcome message --> | |
| <div class="flex"> | |
| <div class="flex-shrink-0 mr-3"> | |
| <div class="w-8 h-8 rounded-full bg-primary-500 flex items-center justify-center"> | |
| <i data-feather="github" class="w-4 h-4 text-white"></i> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 px-4 py-3 rounded-lg max-w-xs lg:max-w-md"> | |
| <p class="text-sm">Hello! I'm your GitHub assistant. Ask me anything about GitHub Marketplace APIs, repositories, or developer tools!</p> | |
| <p class="text-xs text-gray-400 mt-1">Just now</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Input Area --> | |
| <div class="flex space-x-2"> | |
| <input | |
| type="text" | |
| id="user-input" | |
| placeholder="Ask about GitHub Marketplace..." | |
| class="flex-1 bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500" | |
| > | |
| <button | |
| id="send-btn" | |
| class="bg-primary-500 hover:bg-primary-600 text-white rounded-lg px-4 py-2 transition flex items-center" | |
| > | |
| <i data-feather="send" class="w-4 h-4 mr-2"></i> | |
| Send | |
| </button> | |
| </div> | |
| </div> | |
| <!-- API Info Sidebar --> | |
| <div class="bg-gray-800 rounded-xl p-6 shadow-lg"> | |
| <h2 class="text-xl font-semibold mb-4">GitHub Marketplace</h2> | |
| <div class="space-y-4"> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center mb-2"> | |
| <i data-feather="zap" class="text-secondary-500 w-4 h-4 mr-2"></i> | |
| <h3 class="font-medium">API Status</h3> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <span class="text-sm">Connected</span> | |
| <div class="w-3 h-3 rounded-full bg-green-500"></div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center mb-2"> | |
| <i data-feather="info" class="text-secondary-500 w-4 h-4 mr-2"></i> | |
| <h3 class="font-medium">Available Actions</h3> | |
| </div> | |
| <ul class="text-sm space-y-2"> | |
| <li class="flex items-center"> | |
| <i data-feather="check-circle" class="w-3 h-3 mr-2 text-green-500"></i> | |
| Search marketplace listings | |
| </li> | |
| <li class="flex items-center"> | |
| <i data-feather="check-circle" class="w-3 h-3 mr-2 text-green-500"></i> | |
| Get pricing plans | |
| </li> | |
| <li class="flex items-center"> | |
| <i data-feather="check-circle" class="w-3 h-3 mr-2 text-green-500"></i> | |
| Check account info | |
| </li> | |
| <li class="flex items-center"> | |
| <i data-feather="check-circle" class="w-3 h-3 mr-2 text-green-500"></i> | |
| View purchase history | |
| </li> | |
| </ul> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center mb-2"> | |
| <i data-feather="code" class="text-secondary-500 w-4 h-4 mr-2"></i> | |
| <h3 class="font-medium">API Documentation</h3> | |
| </div> | |
| <p class="text-xs text-gray-400 mb-2">Use this token for authentication:</p> | |
| <div class="flex items-center justify-between bg-gray-800 p-2 rounded text-xs font-mono overflow-x-auto"> | |
| <span class="text-gray-300">github_pat_11BOSD64Q0...</span> | |
| <button class="text-secondary-500 hover:text-secondary-400"> | |
| <i data-feather="copy" class="w-3 h-3"></i> | |
| </button> | |
| </div> | |
| <a href="#" class="text-secondary-500 text-xs mt-2 inline-block hover:underline">View full docs →</a> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Theme toggle functionality | |
| document.getElementById('theme-toggle').addEventListener('click', function() { | |
| document.documentElement.classList.toggle('dark'); | |
| const icon = this.querySelector('i'); | |
| if (document.documentElement.classList.contains('dark')) { | |
| icon.setAttribute('data-feather', 'moon'); | |
| } else { | |
| icon.setAttribute('data-feather', 'sun'); | |
| } | |
| feather.replace(); | |
| }); | |
| // Chat functionality | |
| document.getElementById('send-btn').addEventListener('click', sendMessage); | |
| document.getElementById('user-input').addEventListener('keypress', function(e) { | |
| if (e.key === 'Enter') sendMessage(); | |
| }); | |
| function sendMessage() { | |
| const input = document.getElementById('user-input'); | |
| const message = input.value.trim(); | |
| if (!message) return; | |
| // Add user message to chat | |
| addMessage(message, 'user'); | |
| input.value = ''; | |
| // Simulate bot response | |
| setTimeout(() => { | |
| const responses = [ | |
| "I found several marketplace listings matching your query.", | |
| "The GitHub Marketplace API allows you to...", | |
| "For that action, you'll need to authenticate with your personal access token.", | |
| "Here are the pricing plans available for that integration:", | |
| "I can help you with GitHub Marketplace queries. Try asking about specific categories like CI/CD or project management tools." | |
| ]; | |
| const randomResponse = responses[Math.floor(Math.random() * responses.length)]; | |
| addMessage(randomResponse, 'bot'); | |
| }, 1000); | |
| } | |
| function addMessage(text, sender) { | |
| const messagesContainer = document.getElementById('messages'); | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = 'flex'; | |
| if (sender === 'user') { | |
| messageDiv.className += ' justify-end'; | |
| messageDiv.innerHTML = ` | |
| <div class="flex flex-col items-end"> | |
| <div class="bg-secondary-500 px-4 py-3 rounded-lg max-w-xs lg:max-w-md"> | |
| <p class="text-sm">${text}</p> | |
| <p class="text-xs text-gray-400 mt-1">Just now</p> | |
| </div> | |
| </div> | |
| `; | |
| } else { | |
| messageDiv.innerHTML = ` | |
| <div class="flex-shrink-0 mr-3"> | |
| <div class="w-8 h-8 rounded-full bg-primary-500 flex items-center justify-center"> | |
| <i data-feather="github" class="w-4 h-4 text-white"></i> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 px-4 py-3 rounded-lg max-w-xs lg:max-w-md"> | |
| <p class="text-sm">${text}</p> | |
| <p class="text-xs text-gray-400 mt-1">Just now</p> | |
| </div> | |
| `; | |
| } | |
| messagesContainer.appendChild(messageDiv); | |
| messagesContainer.scrollTop = messagesContainer.scrollHeight; | |
| feather.replace(); | |
| } | |
| </script> | |
| </body> | |
| </html> | |