Files
s41r4j-coocom/public/index.html
T
2026-03-12 23:36:52 +05:30

210 lines
8.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CooCom Agentic Chat</title>
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<main class="app">
<section class="top-shell">
<header class="topbar">
<div class="topbar-head">
<div class="topbar-title">
<h1>CooCom Decision Room</h1>
<p class="topbar-subtitle">4 cooperative agents vs 4 competitive agents</p>
</div>
<div class="topbar-actions">
<div class="topbar-button-row">
<button
id="settingsToggle"
class="judge-toggle icon-only"
type="button"
aria-controls="settingsPanel"
aria-expanded="false"
aria-label="Open provider settings"
title="Open provider settings"
>
<svg class="judge-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M4 6h8"></path>
<path d="M18 6h2"></path>
<circle cx="14" cy="6" r="2"></circle>
<path d="M4 12h4"></path>
<path d="M14 12h6"></path>
<circle cx="10" cy="12" r="2"></circle>
<path d="M4 18h10"></path>
<path d="M18 18h2"></path>
<circle cx="16" cy="18" r="2"></circle>
</svg>
</button>
<button
id="judgeToggle"
class="judge-toggle icon-only"
type="button"
aria-controls="judgePanel"
aria-expanded="false"
aria-label="Show scoreboard"
title="Show scoreboard"
>
<svg class="judge-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<rect x="3" y="3" width="7" height="7" rx="1"></rect>
<rect x="14" y="3" width="7" height="7" rx="1"></rect>
<rect x="3" y="14" width="7" height="7" rx="1"></rect>
<rect x="14" y="14" width="7" height="7" rx="1"></rect>
</svg>
</button>
<button
id="csvToggle"
class="judge-toggle icon-only"
type="button"
aria-controls="csvPanel"
aria-expanded="false"
aria-label="Open CSV test runner"
title="Open CSV test runner"
>
<svg class="judge-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M12 5v14"></path>
<path d="M5 12h14"></path>
</svg>
</button>
<button id="startBtn">Start Discussion</button>
</div>
<div class="timer-row">
<button id="stopBtn" type="button" disabled>Stop</button>
<div id="timer">00:30</div>
</div>
</div>
</div>
</header>
<section class="controls">
<label for="topic">Your Question / Topic</label>
<textarea id="topic" rows="3" placeholder="Example: Should I build this as a mobile app or a web app first?"></textarea>
<p id="status" class="status">Idle</p>
</section>
</section>
<section class="panes">
<article class="pane cooperative">
<div class="pane-head">
<h2>Cooperative</h2>
<p>Builds aligned solutions and practical synthesis.</p>
</div>
<div id="coopLog" class="log"></div>
</article>
<article class="pane competitive">
<div class="pane-head">
<h2>Competitive</h2>
<p>Challenges assumptions and pressure-tests ideas.</p>
</div>
<div id="compLog" class="log"></div>
</article>
</section>
<section class="conclusions-bar">
<article class="conclusion-card cooperative">
<h3>Cooperative Conclusion</h3>
<pre id="coopConclusion" class="conclusion"></pre>
</article>
<article class="conclusion-card competitive">
<h3>Competitive Conclusion</h3>
<pre id="compConclusion" class="conclusion"></pre>
</article>
</section>
</main>
<div id="judgeBackdrop" class="judge-backdrop is-hidden" aria-hidden="true"></div>
<div id="csvBackdrop" class="judge-backdrop is-hidden" aria-hidden="true"></div>
<div id="settingsBackdrop" class="judge-backdrop is-hidden" aria-hidden="true"></div>
<aside id="settingsPanel" class="settings-panel is-collapsed" aria-hidden="true" aria-live="polite">
<div class="settings-panel-top">
<div class="settings-head">
<h3>Provider Settings</h3>
<p class="settings-subtitle">Choose OpenAI or Gemini and store the key locally in this browser.</p>
</div>
<button id="settingsCloseBtn" class="judge-clear-btn" type="button">Close</button>
</div>
<div class="settings-form">
<label class="settings-field-label" for="providerSelect">Provider</label>
<select id="providerSelect" class="settings-select">
<option value="openai">OpenAI</option>
<option value="gemini">Gemini</option>
</select>
<label class="settings-field-label" for="apiKeyInput">API Key</label>
<input
id="apiKeyInput"
class="settings-key"
type="password"
autocomplete="off"
spellcheck="false"
placeholder="Enter API key for selected provider"
/>
<p class="settings-help">
Saved only in this browser. Leave the field blank to fall back to the matching server environment variable.
</p>
<p id="settingsHint" class="settings-hint">OpenAI is selected by default.</p>
<div class="settings-actions">
<button id="settingsSaveBtn" class="settings-save-btn" type="button">Save Settings</button>
</div>
</div>
</aside>
<aside id="judgePanel" class="judge-sidepanel is-collapsed" aria-hidden="true" aria-live="polite">
<div class="judge-panel-top">
<div class="judge-head">
<h3>Round Scoreboard</h3>
<p id="judgeTally" class="judge-tally">Session: Cooperative 0 | Competitive 0 | Ties 0</p>
</div>
<button id="clearHistoryBtn" class="judge-clear-btn" type="button">Clear History</button>
</div>
<div class="judge-grid">
<div class="judge-row">
<span class="judge-label cooperative">Cooperative</span>
<span id="scoreCoop" class="judge-score">C - | P - | U - | R - | O -</span>
</div>
<div class="judge-row">
<span class="judge-label competitive">Competitive</span>
<span id="scoreComp" class="judge-score">C - | P - | U - | R - | O -</span>
</div>
</div>
<p id="judgeWinner" class="judge-winner">Winner: Pending</p>
<p id="judgeRationale" class="judge-rationale">Scoring will appear after both final conclusions.</p>
<section class="judge-history">
<h4>Saved Rounds</h4>
<div id="judgeHistory" class="judge-history-list">
<p class="history-empty">No rounds scored yet.</p>
</div>
</section>
</aside>
<aside id="csvPanel" class="csv-panel is-collapsed" aria-hidden="true" aria-live="polite">
<div class="csv-panel-top">
<div class="csv-head">
<h3>CSV Test Runner</h3>
<p class="csv-subtitle">Paste CSV with columns: id,question</p>
</div>
<button id="csvCloseBtn" class="judge-clear-btn" type="button">Close</button>
</div>
<textarea
id="csvInput"
class="csv-input"
rows="11"
placeholder='id,question&#10;1,"Should I build a web app first?"&#10;2,"Is remote-first better than hybrid?"'
></textarea>
<p id="csvHint" class="csv-hint">Each row runs one full 30-second round and appends to saved scoreboard history.</p>
<div class="csv-actions">
<button id="csvRunBtn" class="csv-run-btn" type="button">Run CSV Tests</button>
</div>
</aside>
<script src="/app.js" type="module"></script>
</body>
</html>