UNPKG

git-contextor

Version:

A code context tool with vector search and real-time monitoring, with optional Git integration.

131 lines (123 loc) 7.17 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Git Contextor - Shared Session</title> <link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"> </head> <body> <div class="container"> <header> <h1>Git Contextor - Shared Session</h1> </header> <main> <section class="card"> <div class="share-info"> <p><strong>Description:</strong> <span id="share-description">Loading...</span></p> <p><strong>Expires:</strong> <span id="share-expires">Loading...</span></p> <div class="form-group" style="max-width: 500px;"> <label for="share-api-key">Your API Key:</label> <input type="password" id="share-api-key" placeholder="Enter your shared access key..."> </div> </div> </section> <div id="shared-content" style="display: none;"> <nav id="view-nav"> <a href="#chat" class="active">AI Chat</a> <a href="#search">Semantic Search</a> <a href="#files">File Browser</a> <a href="#usage">API Usage</a> </nav> <!-- Chat View --> <div id="view-chat"> <section id="chat-interface" class="card"> <form id="shared-chat-form"> <div class="search-input-group"> <textarea id="chat-query" placeholder="Ask the AI about the repository..." required rows="3"></textarea> <button type="submit">Ask</button> </div> </form> <div id="chat-results-container" style="display: none;"> <h3>🤖 AI Response</h3> <div id="chat-results" class="docs-content"></div> <div id="chat-context-container" style="display: none; margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 15px;"> <div style="display: flex; justify-content: space-between; align-items: center;"> <h4 style="margin: 0; font-size: 1.1em; color: var(--subtle-text-color);">Context Used (<span id="chat-context-count">0</span> chunks)</h4> <button id="toggle-context-btn" class="button-secondary">Show</button> </div> <div id="chat-context-details" style="display: none; margin-top: 15px;"></div> </div> </div> </section> </div> <!-- Semantic Search View --> <div id="view-search" class="hidden"> <section id="search-interface" class="card"> <h2>🔍 Semantic Search</h2> <p>Search through the repository using semantic similarity to find relevant code and documentation.</p> <form id="search-form"> <div class="search-input-group"> <textarea id="search-query" placeholder="Describe what you're looking for..." required rows="2"></textarea> <div class="search-options"> <label for="max-tokens">Max tokens:</label> <input type="number" id="max-tokens" value="1000" min="100" max="8000" step="100"> </div> <button type="submit">Search</button> </div> </form> <div id="search-results-container" style="display: none;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;"> <h3>Search Results</h3> <span id="search-stats" class="search-stats"></span> </div> <div id="search-results"></div> </div> </section> </div> <!-- File Browser View --> <div id="view-files" class="hidden"> <section id="file-browser" class="card"> <div class="file-browser-container"> <div id="file-tree-panel" class="file-tree-panel"><p>Loading files...</p></div> <div id="file-viewer-panel" class="file-viewer-panel" style="display: none;"> <div class="file-viewer-header"> <h3 id="file-viewer-filename"></h3> <div class="file-viewer-actions"> <button id="file-ask-ai-btn" class="button-secondary">Ask AI about this file</button> </div> </div> <div id="file-viewer-content" class="docs-content"></div> </div> </div> </section> </div> <!-- API Usage View --> <div id="view-usage" class="hidden"> <section id="api-usage" class="card"> <h2>API Usage Examples</h2> <div class="tabs"> <button class="tab-button active" data-lang="curl">cURL</button> </div> <div id="snippet-content"> <h4>Get Share Info</h4> <pre id="snippet-info-curl" class="snippet active"></pre> <h4>Invoke Chat</h4> <pre id="snippet-chat-curl" class="snippet active"></pre> <h4>Semantic Search</h4> <pre id="snippet-search-curl" class="snippet active"></pre> </div> </section> </div> </div> </main> <footer> <p>Powered by <a href="https://github.com/stromdao/git-contextor" target="_blank">Git Contextor</a> &copy; 2025 by <a href="https://stromdao.de/" target="_blank">STROMDAO GmbH</a></p> </footer> </div> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> <script src="js/shared.js"></script> </body> </html>