Skip to content

Commit 3d1134b

Browse files
committed
fix: add .gitignore, remove node_modules from tracking, improve UI
- CONNECT flow: API key now hides behind a connect button with neon status dot - Status bar updates dynamically (LIVE / SCORE X/10 / FIX state) - FIX IT (SELECT) now generates and downloads real bloop_fix.py via Groq - Score visual hierarchy: neon red/amber/green on giant score and progress bar - node_modules/ removed from git tracking via .gitignore
1 parent 756e2ce commit 3d1134b

16,538 files changed

Lines changed: 194 additions & 1909692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules/
2+
.env
3+
.env.local
4+
reports/
5+
*.log
6+
.DS_Store
7+
Thumbs.db
8+
.gitagent/audit.jsonl
9+
memory/runtime/context.md

docs/index.html

Lines changed: 185 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,60 @@
493493
::-webkit-scrollbar-track { background: transparent; border-left: 1px solid var(--border-color); }
494494
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 6px; }
495495
::-webkit-scrollbar-thumb:hover { background: #484f58; }
496+
497+
/* API Key Connect Panel */
498+
#connect-panel {
499+
display: flex;
500+
gap: 8px;
501+
align-items: center;
502+
padding: 10px 12px;
503+
border: 1px solid var(--border-color);
504+
border-radius: 6px;
505+
background: #0d1117;
506+
margin-bottom: 10px;
507+
transition: all 0.3s;
508+
}
509+
#connect-panel.connected {
510+
border-color: var(--neon-green);
511+
box-shadow: 0 0 8px rgba(57,211,83,0.15);
512+
}
513+
#api-key {
514+
flex: 1;
515+
background: transparent;
516+
border: none;
517+
padding: 4px 0;
518+
font-size: 1.2rem;
519+
}
520+
#api-key:focus { box-shadow: none; border: none; }
521+
#btn-connect {
522+
background: var(--panel-bg);
523+
border: 1px solid var(--border-color);
524+
color: var(--text-muted);
525+
font-family: 'VT323', monospace;
526+
font-size: 1.2rem;
527+
padding: 4px 12px;
528+
border-radius: 4px;
529+
cursor: pointer;
530+
transition: all 0.2s;
531+
white-space: nowrap;
532+
}
533+
#btn-connect:hover { border-color: var(--neon-green); color: var(--neon-green); }
534+
#btn-connect.connected { border-color: var(--neon-green); color: var(--neon-green); }
535+
#connect-status-dot {
536+
width: 8px; height: 8px;
537+
border-radius: 50%;
538+
background: #333;
539+
flex-shrink: 0;
540+
transition: all 0.3s;
541+
}
542+
#connect-status-dot.on { background: var(--neon-green); box-shadow: var(--neon-green-glow); }
543+
544+
/* Score color variants */
545+
.score-critical { color: var(--neon-red) !important; text-shadow: var(--neon-red-glow) !important; }
546+
.score-warn { color: var(--neon-amber) !important; text-shadow: var(--neon-amber-glow) !important; }
547+
.score-good { color: var(--neon-green) !important; text-shadow: var(--neon-green-glow) !important; }
548+
.bar-critical { background-color: var(--neon-red) !important; box-shadow: var(--neon-red-glow) !important; }
549+
.bar-warn { background-color: var(--neon-amber) !important; box-shadow: var(--neon-amber-glow) !important; }
496550
</style>
497551
</head>
498552
<body>
@@ -511,7 +565,7 @@
511565

512566
<div class="ui-header">
513567
<span class="title">BLOOP v1.0 GB</span>
514-
<span class="status-line">SYS: ON MDL: GROQ</span>
568+
<span class="status-line" id="status-bar">SYS: ON &nbsp; MDL: &mdash;</span>
515569
</div>
516570

517571
<div class="main-content">
@@ -521,9 +575,10 @@
521575
</div>
522576

523577
<div class="input-panel">
524-
<div>
525-
<label for="api-key">API KEY</label>
526-
<input type="password" id="api-key" placeholder="gsk_****************">
578+
<div id="connect-panel">
579+
<div id="connect-status-dot"></div>
580+
<input type="password" id="api-key" placeholder="GROQ API KEY gsk_***...">
581+
<button id="btn-connect" onclick="toggleConnect()">CONNECT</button>
527582
</div>
528583

529584
<div id="drop-zone">>> DROP CSV HERE <<</div>
@@ -822,5 +877,131 @@
822877

823878
function howToFix() { alert(">> INITIATING FIX PROTOCOL\\n>> AUTO-FIX REQUIRES PREMIUM AGENT (CARTRIDGE EXPANSION)."); }
824879
</script>
880+
881+
<script>
882+
// ── CONNECT toggle ────────────────────────────────────────────────────────
883+
let apiConnected = false;
884+
let _realApiKey = '';
885+
const statusBar = document.getElementById('status-bar');
886+
const connectDot = document.getElementById('connect-status-dot');
887+
const connectPanel = document.getElementById('connect-panel');
888+
const connectBtn = document.getElementById('btn-connect');
889+
890+
function setStatus(text, color) {
891+
statusBar.textContent = text;
892+
statusBar.style.color = color || 'var(--neon-cyan)';
893+
statusBar.style.textShadow = color ? '0 0 8px ' + color + '88' : 'var(--neon-cyan-glow)';
894+
}
895+
896+
function toggleConnect() {
897+
const key = document.getElementById('api-key').value.trim();
898+
if (!apiConnected) {
899+
if (!key) { setStatus('ERR: KEY REQUIRED', 'var(--neon-red)'); return; }
900+
_realApiKey = key;
901+
apiConnected = true;
902+
connectDot.classList.add('on');
903+
connectPanel.classList.add('connected');
904+
connectBtn.textContent = 'DISCONNECT';
905+
connectBtn.classList.add('connected');
906+
const keyInput = document.getElementById('api-key');
907+
keyInput.type = 'text';
908+
keyInput.value = key.slice(0, 8) + '••••••••••••••••';
909+
keyInput.disabled = true;
910+
setStatus('SYS: ON MDL: GROQ ● LIVE', 'var(--neon-green)');
911+
quipEl.textContent = 'CONNECTED. DROP A CSV TO BEGIN.';
912+
} else {
913+
_realApiKey = '';
914+
apiConnected = false;
915+
connectDot.classList.remove('on');
916+
connectPanel.classList.remove('connected');
917+
connectBtn.textContent = 'CONNECT';
918+
connectBtn.classList.remove('connected');
919+
const keyInput = document.getElementById('api-key');
920+
keyInput.type = 'password';
921+
keyInput.value = '';
922+
keyInput.disabled = false;
923+
setStatus('SYS: ON MDL: —', 'var(--neon-cyan)');
924+
quipEl.textContent = 'WAITING FOR INPUT...';
925+
}
926+
}
927+
928+
// Patch initiateAudit to use stored key and require connect first
929+
const _origInitiateAudit = window.initiateAudit || initiateAudit;
930+
document.getElementById('btn-audit').onclick = async function() {
931+
if (!apiConnected) {
932+
termEl.innerHTML = '<span class="color-red">>> ERROR: NOT CONNECTED. ENTER KEY AND PRESS CONNECT.</span>';
933+
return;
934+
}
935+
// Temporarily restore real key for the fetch inside initiateAudit
936+
const keyEl = document.getElementById('api-key');
937+
const maskedVal = keyEl.value;
938+
keyEl.disabled = false;
939+
keyEl.value = _realApiKey;
940+
await initiateAudit();
941+
keyEl.value = maskedVal;
942+
keyEl.disabled = true;
943+
};
944+
945+
// ── FIX IT — generates and downloads a Python fix script ──────────────────
946+
// Override the original howToFix
947+
window.howToFix = async function() {
948+
if (!window.currentReport) {
949+
faceImg.src = 'assets/cat_worried.png';
950+
faceImg.className = 'face-warn';
951+
termEl.innerHTML = '<span class="color-amber">>> NO AUDIT TO FIX. RUN AUDIT FIRST.</span>';
952+
return;
953+
}
954+
if (!apiConnected) {
955+
termEl.innerHTML = '<span class="color-red">>> ERROR: NOT CONNECTED.</span>';
956+
return;
957+
}
958+
termEl.innerHTML += '\n\n<span class="color-cyan">>> GENERATING FIX SCRIPT...</span>\n';
959+
setStatus('SYS: ON MDL: GROQ ⟳ FIXING', 'var(--neon-amber)');
960+
try {
961+
const res = await fetch('https://api.groq.com/openai/v1/chat/completions', {
962+
method: 'POST',
963+
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + _realApiKey },
964+
body: JSON.stringify({
965+
model: 'llama-3.3-70b-versatile',
966+
max_tokens: 800,
967+
messages: [
968+
{ role: 'system', content: 'Output only runnable Python code. No explanation. Include sklearn imports.' },
969+
{ role: 'user', content: 'Write a fix script for this audit:\n\n' + window.currentReport }
970+
]
971+
})
972+
});
973+
const data = await res.json();
974+
const code = data.choices[0].message.content;
975+
const blob = new Blob([code], { type: 'text/x-python' });
976+
const a = document.createElement('a');
977+
a.href = URL.createObjectURL(blob);
978+
a.download = 'bloop_fix.py';
979+
document.body.appendChild(a); a.click(); document.body.removeChild(a);
980+
termEl.innerHTML += '<span class="color-green">>> FIX SCRIPT DOWNLOADED: bloop_fix.py</span>';
981+
setStatus('SYS: ON MDL: GROQ ● LIVE', 'var(--neon-green)');
982+
} catch(e) {
983+
termEl.innerHTML += `<span class="color-red">>> FIX SCRIPT ERROR: ${e.message}</span>`;
984+
setStatus('SYS: ON MDL: GROQ ● LIVE', 'var(--neon-green)');
985+
}
986+
};
987+
988+
// ── Score bar color update ─────────────────────────────────────────────────
989+
// Patch finishAudit to color the score and bar dynamically
990+
const _origFinishAudit = window.finishAudit;
991+
if (_origFinishAudit) {
992+
window.finishAudit = function(fullResponse) {
993+
_origFinishAudit(fullResponse);
994+
const scoreMatch = fullResponse.match(/BLOOP SCORE:\s*(\d+)/i);
995+
const score = scoreMatch ? parseInt(scoreMatch[1]) : 0;
996+
const giantScore = document.getElementById('giant-score');
997+
const pbFill = document.getElementById('progress-bar-fill');
998+
giantScore.className = 'giant-score ' + (score <= 3 ? 'score-critical' : score <= 6 ? 'score-warn' : 'score-good');
999+
pbFill.className = 'progress-bar-fill ' + (score <= 3 ? 'bar-critical' : score <= 6 ? 'bar-warn' : '');
1000+
const label = score <= 3 ? 'DO NOT SHIP' : score <= 6 ? 'NEEDS WORK' : score <= 9 ? 'SHIP WITH FIXES' : 'SHIP IT';
1001+
setStatus(`SYS: ON MDL: GROQ SCORE: ${score}/10 — ${label}`, score <= 3 ? 'var(--neon-red)' : score <= 6 ? 'var(--neon-amber)' : 'var(--neon-green)');
1002+
};
1003+
}
1004+
1005+
</script>
8251006
</body>
8261007
</html>

node_modules/.bin/anthropic-ai-sdk

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/.bin/anthropic-ai-sdk.cmd

Lines changed: 0 additions & 17 deletions
This file was deleted.

node_modules/.bin/anthropic-ai-sdk.ps1

Lines changed: 0 additions & 28 deletions
This file was deleted.

node_modules/.bin/escodegen

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/.bin/escodegen.cmd

Lines changed: 0 additions & 17 deletions
This file was deleted.

node_modules/.bin/escodegen.ps1

Lines changed: 0 additions & 28 deletions
This file was deleted.

node_modules/.bin/esgenerate

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/.bin/esgenerate.cmd

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)