Spaces:
Sleeping
Sleeping
File size: 8,276 Bytes
3e802a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>CodeScribe AI</title>
<link rel="stylesheet" href="/static/style.css"/>
<meta name="color-scheme" content="dark light"/>
</head>
<body>
<!-- Decorative Background -->
<div class="bg">
<div class="bg-gradient"></div>
<div class="bg-grid"></div>
<canvas id="bg-canvas" aria-hidden="true"></canvas>
</div>
<main class="shell">
<div class="container glass-card" data-animate>
<header class="app-header">
<div class="brand">
<div class="brand-mark" aria-hidden="true">
<span class="dot dot-1"></span>
<span class="dot dot-2"></span>
<span class="dot dot-3"></span>
</div>
<h1 class="title text-gradient">CodeScribe AI</h1>
</div>
<p class="subtitle">AI-powered project documentation, right in your browser.</p>
</header>
<!-- Auth -->
<section id="auth-section" class="panel" data-animate>
<button id="github-login-btn" class="btn btn-primary btn-glow" aria-label="Login with GitHub">
<span class="btn-inner">
<svg class="icon" width="20" height="20" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 .198a8 8 0 0 0-2.53 15.6c.4.073.547-.173.547-.385v-1.35c-2.226.483-2.695-1.073-2.695-1.073c-.364-.925-.89-1.172-.89-1.172c-.727-.497.055-.487.055-.487c.803.056 1.225.825 1.225.825c.715 1.224 1.874.87 2.33.665c.073-.518.28-.871.508-1.072C4.9 9.83 3 9.232 3 6.58c0-.87.31-1.58.824-2.136c-.083-.203-.357-1.02.078-2.127c0 0 .673-.215 2.206.817c.64-.18 1.325-.27 2.006-.273c.68.003 1.365.093 2.006.273c1.532-1.032 2.204-.817 2.204-.817c.437 1.107.163 1.924.08 2.127C12.69 5 13 5.71 13 6.58c0 2.66-1.902 3.248-3.714 3.419c.287.247.543.736.543 1.484v2.2c0 .214.145.462.55.384A8 8 0 0 0 8 .198"/></svg>
<span>Login with GitHub</span>
</span>
</button>
</section>
<!-- Main Content -->
<section id="main-content" class="hidden" data-animate>
<!-- Tabs -->
<div class="tabs">
<button id="select-zip-btn" class="tab-btn active" type="button">
<span>Upload Zip</span>
</button>
<button id="select-github-btn" class="tab-btn" type="button">
<span>Use GitHub Repo</span>
</button>
<span class="tab-indicator" aria-hidden="true"></span>
</div>
<!-- Form -->
<form id="doc-form" class="form">
GitHub Inputs
<div id="github-inputs" class="panel">
<div class="form-row">
<div class="form-group">
<label for="repo-select">Select a Repository</label>
<select id="repo-select" name="repo_full_name" required></select>
</div>
<div class="form-group">
<label for="base-branch-select">Base Branch</label>
<select id="base-branch-select" name="base_branch" required></select>
</div>
</div>
<div class="form-group">
<label for="new-branch-input">New Branch Name</label>
<input id="new-branch-input" type="text" name="new_branch_name" value="docs/codescribe-ai" required/>
<small id="branch-name-error" class="form-error" aria-live="polite" style="display:none;"></small>
</div>
</div>
<!-- ZIP Inputs -->
<div id="zip-inputs" class="panel hidden">
<div class="form-group">
<label for="zip-file">Upload Project as .zip</label>
<input id="zip-file" type="file" name="zip_file" accept=".zip" required/>
</div>
</div>
<div class="divider"></div>
<!-- Common Inputs -->
<div class="panel">
<div class="form-group">
<label for="description">Short Project Description</label>
<textarea id="description" name="description" rows="3" required placeholder="e.g., A Python library for advanced data analysis and visualization."></textarea>
</div>
<div class="form-group">
<label for="readme-note">Note for README (Optional)</label>
<textarea id="readme-note" name="readme_note" rows="2" placeholder="e.g., Emphasize the new data processing pipeline. Mention the v2.0 release."></textarea>
</div>
</div>
<div class="divider"></div>
<div class="panel">
<div class="form-group">
<label for="exclude-patterns">Exclude (Regex Patterns)</label>
<textarea id="exclude-patterns" name="exclude_patterns" rows="2" placeholder="e.g., tests/.*, .*/migrations/.*, specific_file.py"></textarea>
<small>One regex pattern per line. Matches relative paths like 'src/utils/helpers.py'.</small>
</div>
<div id="file-tree-container" class="form-group hidden">
<label>Exclude Specific Files/Folders</label>
<div id="file-tree" class="tree"></div>
</div>
</div>
<div class="form-actions">
<button id="submit-btn" type="submit" class="btn btn-primary btn-glow">
<span class="btn-inner">
<span class="loader" aria-hidden="true"></span>
<span>Generate Documentation</span>
</span>
</button>
</div>
</form>
</section>
<!-- Live Progress -->
<section id="live-progress-view" class="hidden" data-animate>
<h2 class="section-title">Processing Your Project...</h2>
<div class="progress-layout">
<ul id="phase-list" class="timeline">
<li id="phase-scan" class="phase-item" data-status="pending">
<span class="status-icon" aria-hidden="true"></span>
<div class="phase-details">
<span class="phase-title">1. Scan Project Files</span>
<ul class="subtask-list" id="scan-file-list"></ul>
</div>
</li>
<li id="phase-docstrings" class="phase-item" data-status="pending">
<span class="status-icon" aria-hidden="true"></span>
<div class="phase-details">
<span class="phase-title">2. Generate Docstrings</span>
<ul class="subtask-list" id="docstring-file-list"></ul>
<ul class="subtask-list" id="docstring-module-list"></ul>
<ul class="subtask-list" id="docstring-package-list"></ul>
</div>
</li>
<li id="phase-readmes" class="phase-item" data-status="pending">
<span class="status-icon" aria-hidden="true"></span>
<div class="phase-details">
<span class="phase-title">3. Generate READMEs</span>
<ul class="subtask-list" id="readme-dir-list"></ul>
</div>
</li>
<li id="phase-output" class="phase-item" data-status="pending">
<span class="status-icon" aria-hidden="true"></span>
<div class="phase-details">
<span class="phase-title">4. Finalize and Push</span>
<ul class="subtask-list" id="output-step-list"></ul>
</div>
</li>
</ul>
<div id="raw-log-container" class="terminal">
<div class="terminal-head">
<span class="dot red" aria-hidden="true"></span>
<span class="dot yellow" aria-hidden="true"></span>
<span class="dot green" aria-hidden="true"></span>
<h4>Live Log Details</h4>
</div>
<pre id="log-output" class="terminal-body" aria-live="polite"></pre>
</div>
</div>
</section>
<!-- Result -->
<section id="result-section" class="hidden" data-animate>
<h2 class="section-title success">Complete!</h2>
<div id="result-link" class="result-card"></div>
</section>
</div>
</main>
<script src="/static/script.js" defer></script>
</body>
</html>
|