Upload 4 files
Browse files- templates/cognitive.html +353 -0
- templates/dashboard.html +382 -0
- templates/index.html +328 -0
- templates/quantum.html +373 -0
templates/cognitive.html
ADDED
|
@@ -0,0 +1,353 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Codette Cognitive Processing Interface</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 10 |
+
background: linear-gradient(135deg, #2c1810 0%, #8b4513 100%);
|
| 11 |
+
color: white;
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 2rem;
|
| 14 |
+
min-height: 100vh;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.container {
|
| 18 |
+
max-width: 1200px;
|
| 19 |
+
margin: 0 auto;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.header {
|
| 23 |
+
text-align: center;
|
| 24 |
+
margin-bottom: 2rem;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.header h1 {
|
| 28 |
+
font-size: 2.5rem;
|
| 29 |
+
background: linear-gradient(45deg, #ffd700, #ffb347);
|
| 30 |
+
-webkit-background-clip: text;
|
| 31 |
+
-webkit-text-fill-color: transparent;
|
| 32 |
+
background-clip: text;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.nav-bar {
|
| 36 |
+
background: rgba(255, 255, 255, 0.1);
|
| 37 |
+
backdrop-filter: blur(10px);
|
| 38 |
+
border-radius: 8px;
|
| 39 |
+
padding: 1rem;
|
| 40 |
+
margin-bottom: 2rem;
|
| 41 |
+
text-align: center;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.nav-bar a {
|
| 45 |
+
color: white;
|
| 46 |
+
text-decoration: none;
|
| 47 |
+
padding: 0.5rem 1rem;
|
| 48 |
+
margin: 0 0.5rem;
|
| 49 |
+
border-radius: 4px;
|
| 50 |
+
transition: background 0.3s ease;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.nav-bar a:hover {
|
| 54 |
+
background: rgba(255, 255, 255, 0.2);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.cognitive-interface {
|
| 58 |
+
display: grid;
|
| 59 |
+
grid-template-columns: 1fr 1fr;
|
| 60 |
+
gap: 2rem;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.input-panel {
|
| 64 |
+
background: rgba(255, 255, 255, 0.1);
|
| 65 |
+
backdrop-filter: blur(10px);
|
| 66 |
+
border-radius: 16px;
|
| 67 |
+
padding: 2rem;
|
| 68 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.output-panel {
|
| 72 |
+
background: rgba(255, 255, 255, 0.1);
|
| 73 |
+
backdrop-filter: blur(10px);
|
| 74 |
+
border-radius: 16px;
|
| 75 |
+
padding: 2rem;
|
| 76 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.query-textarea {
|
| 80 |
+
width: 100%;
|
| 81 |
+
height: 150px;
|
| 82 |
+
padding: 1rem;
|
| 83 |
+
border: none;
|
| 84 |
+
border-radius: 8px;
|
| 85 |
+
background: rgba(255, 255, 255, 0.9);
|
| 86 |
+
color: #333;
|
| 87 |
+
font-size: 1rem;
|
| 88 |
+
resize: vertical;
|
| 89 |
+
margin-bottom: 1rem;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.perspective-selector {
|
| 93 |
+
display: grid;
|
| 94 |
+
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
| 95 |
+
gap: 0.5rem;
|
| 96 |
+
margin: 1rem 0;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.perspective-option {
|
| 100 |
+
display: flex;
|
| 101 |
+
align-items: center;
|
| 102 |
+
padding: 0.5rem;
|
| 103 |
+
background: rgba(255, 255, 255, 0.1);
|
| 104 |
+
border-radius: 4px;
|
| 105 |
+
cursor: pointer;
|
| 106 |
+
transition: background 0.3s ease;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.perspective-option:hover {
|
| 110 |
+
background: rgba(255, 255, 255, 0.2);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.perspective-option input {
|
| 114 |
+
margin-right: 0.5rem;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.btn-cognitive {
|
| 118 |
+
background: linear-gradient(45deg, #ffd700, #ff8c00);
|
| 119 |
+
color: white;
|
| 120 |
+
padding: 1rem 2rem;
|
| 121 |
+
border: none;
|
| 122 |
+
border-radius: 8px;
|
| 123 |
+
font-size: 1rem;
|
| 124 |
+
cursor: pointer;
|
| 125 |
+
transition: all 0.3s ease;
|
| 126 |
+
width: 100%;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.btn-cognitive:hover {
|
| 130 |
+
transform: translateY(-2px);
|
| 131 |
+
box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.response-tabs {
|
| 135 |
+
display: flex;
|
| 136 |
+
margin-bottom: 1rem;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.tab {
|
| 140 |
+
padding: 0.8rem 1.5rem;
|
| 141 |
+
background: rgba(255, 255, 255, 0.1);
|
| 142 |
+
border: none;
|
| 143 |
+
color: white;
|
| 144 |
+
cursor: pointer;
|
| 145 |
+
border-radius: 8px 8px 0 0;
|
| 146 |
+
margin-right: 0.5rem;
|
| 147 |
+
transition: background 0.3s ease;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.tab.active {
|
| 151 |
+
background: rgba(255, 255, 255, 0.2);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.tab-content {
|
| 155 |
+
background: rgba(0, 0, 0, 0.3);
|
| 156 |
+
border-radius: 0 8px 8px 8px;
|
| 157 |
+
padding: 1.5rem;
|
| 158 |
+
min-height: 300px;
|
| 159 |
+
font-family: monospace;
|
| 160 |
+
white-space: pre-wrap;
|
| 161 |
+
overflow-y: auto;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.perspective-badge {
|
| 165 |
+
display: inline-block;
|
| 166 |
+
padding: 0.3rem 0.8rem;
|
| 167 |
+
background: rgba(255, 215, 0, 0.2);
|
| 168 |
+
border: 1px solid #ffd700;
|
| 169 |
+
border-radius: 20px;
|
| 170 |
+
font-size: 0.8rem;
|
| 171 |
+
margin: 0.2rem;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
@media (max-width: 768px) {
|
| 175 |
+
.cognitive-interface {
|
| 176 |
+
grid-template-columns: 1fr;
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
</style>
|
| 180 |
+
</head>
|
| 181 |
+
<body>
|
| 182 |
+
<div class="container">
|
| 183 |
+
<nav class="nav-bar">
|
| 184 |
+
<a href="/">π Home</a>
|
| 185 |
+
<a href="/dashboard">π Dashboard</a>
|
| 186 |
+
<a href="/quantum">βοΈ Quantum</a>
|
| 187 |
+
<a href="/cognitive">π§ Cognitive</a>
|
| 188 |
+
</nav>
|
| 189 |
+
|
| 190 |
+
<header class="header">
|
| 191 |
+
<h1>π§ Cognitive Processing Interface</h1>
|
| 192 |
+
<p>Multi-perspective AI reasoning with recursive thought loops and ethical analysis</p>
|
| 193 |
+
</header>
|
| 194 |
+
|
| 195 |
+
<div class="cognitive-interface">
|
| 196 |
+
<div class="input-panel">
|
| 197 |
+
<h2>π Query Input</h2>
|
| 198 |
+
|
| 199 |
+
<textarea
|
| 200 |
+
id="cognitiveQuery"
|
| 201 |
+
class="query-textarea"
|
| 202 |
+
placeholder="Enter your question or prompt for Codette's cognitive analysis...
|
| 203 |
+
|
| 204 |
+
Examples:
|
| 205 |
+
- What is the ethical implications of AGI?
|
| 206 |
+
- How should AI handle conflicting human values?
|
| 207 |
+
- Explain consciousness from multiple perspectives
|
| 208 |
+
- Design a solution for climate change"
|
| 209 |
+
></textarea>
|
| 210 |
+
|
| 211 |
+
<h3>π Perspective Agents</h3>
|
| 212 |
+
<div class="perspective-selector">
|
| 213 |
+
<div class="perspective-option">
|
| 214 |
+
<input type="checkbox" id="scientific" checked>
|
| 215 |
+
<label for="scientific">π¬ Scientific</label>
|
| 216 |
+
</div>
|
| 217 |
+
<div class="perspective-option">
|
| 218 |
+
<input type="checkbox" id="creative" checked>
|
| 219 |
+
<label for="creative">π¨ Creative</label>
|
| 220 |
+
</div>
|
| 221 |
+
<div class="perspective-option">
|
| 222 |
+
<input type="checkbox" id="emotional" checked>
|
| 223 |
+
<label for="emotional">β€οΈ Emotional</label>
|
| 224 |
+
</div>
|
| 225 |
+
<div class="perspective-option">
|
| 226 |
+
<input type="checkbox" id="ethical">
|
| 227 |
+
<label for="ethical">βοΈ Ethical</label>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="perspective-option">
|
| 230 |
+
<input type="checkbox" id="quantum">
|
| 231 |
+
<label for="quantum">βοΈ Quantum</label>
|
| 232 |
+
</div>
|
| 233 |
+
<div class="perspective-option">
|
| 234 |
+
<input type="checkbox" id="philosophical">
|
| 235 |
+
<label for="philosophical">π€ Philosophical</label>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<button onclick="processCognitiveQuery()" class="btn-cognitive">
|
| 240 |
+
π§ Process with Codette
|
| 241 |
+
</button>
|
| 242 |
+
</div>
|
| 243 |
+
|
| 244 |
+
<div class="output-panel">
|
| 245 |
+
<h2>π― Cognitive Analysis Results</h2>
|
| 246 |
+
|
| 247 |
+
<div class="response-tabs">
|
| 248 |
+
<button class="tab active" onclick="showTab('insights')">π‘ Insights</button>
|
| 249 |
+
<button class="tab" onclick="showTab('classic')">π§ Classic</button>
|
| 250 |
+
<button class="tab" onclick="showTab('cqure')">β‘ CQURE</button>
|
| 251 |
+
<button class="tab" onclick="showTab('sentiment')">π Sentiment</button>
|
| 252 |
+
</div>
|
| 253 |
+
|
| 254 |
+
<div id="insightsTab" class="tab-content">
|
| 255 |
+
Select perspectives and enter a query to see Codette's multi-perspective analysis...
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<div id="classicTab" class="tab-content" style="display: none;">
|
| 259 |
+
Classic Codette responses will appear here...
|
| 260 |
+
</div>
|
| 261 |
+
|
| 262 |
+
<div id="cqureTab" class="tab-content" style="display: none;">
|
| 263 |
+
CQURE system responses will appear here...
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<div id="sentimentTab" class="tab-content" style="display: none;">
|
| 267 |
+
Sentiment analysis results will appear here...
|
| 268 |
+
</div>
|
| 269 |
+
</div>
|
| 270 |
+
</div>
|
| 271 |
+
</div>
|
| 272 |
+
|
| 273 |
+
<script>
|
| 274 |
+
let currentTab = 'insights';
|
| 275 |
+
|
| 276 |
+
function showTab(tabName) {
|
| 277 |
+
// Hide all tabs
|
| 278 |
+
const tabs = ['insights', 'classic', 'cqure', 'sentiment'];
|
| 279 |
+
tabs.forEach(tab => {
|
| 280 |
+
document.getElementById(tab + 'Tab').style.display = 'none';
|
| 281 |
+
document.querySelector(`[onclick="showTab('${tab}')"]`).classList.remove('active');
|
| 282 |
+
});
|
| 283 |
+
|
| 284 |
+
// Show selected tab
|
| 285 |
+
document.getElementById(tabName + 'Tab').style.display = 'block';
|
| 286 |
+
document.querySelector(`[onclick="showTab('${tabName}')"]`).classList.add('active');
|
| 287 |
+
currentTab = tabName;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
async function processCognitiveQuery() {
|
| 291 |
+
const query = document.getElementById('cognitiveQuery').value;
|
| 292 |
+
|
| 293 |
+
if (!query.trim()) {
|
| 294 |
+
alert('Please enter a query for cognitive processing');
|
| 295 |
+
return;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
// Show processing state
|
| 299 |
+
const tabs = ['insights', 'classic', 'cqure', 'sentiment'];
|
| 300 |
+
tabs.forEach(tab => {
|
| 301 |
+
document.getElementById(tab + 'Tab').textContent = 'Processing cognitive analysis...';
|
| 302 |
+
});
|
| 303 |
+
|
| 304 |
+
try {
|
| 305 |
+
const response = await fetch('/api/query', {
|
| 306 |
+
method: 'POST',
|
| 307 |
+
headers: {
|
| 308 |
+
'Content-Type': 'application/json',
|
| 309 |
+
},
|
| 310 |
+
body: JSON.stringify({
|
| 311 |
+
query: query,
|
| 312 |
+
user_id: 'cognitive_user_' + Date.now()
|
| 313 |
+
})
|
| 314 |
+
});
|
| 315 |
+
|
| 316 |
+
const data = await response.json();
|
| 317 |
+
|
| 318 |
+
if (data.error) {
|
| 319 |
+
tabs.forEach(tab => {
|
| 320 |
+
document.getElementById(tab + 'Tab').textContent = `Error: ${data.error}`;
|
| 321 |
+
});
|
| 322 |
+
} else {
|
| 323 |
+
// Populate each tab with relevant data
|
| 324 |
+
document.getElementById('insightsTab').textContent =
|
| 325 |
+
data.insights ? data.insights.join('\n\n') : 'No insights generated';
|
| 326 |
+
|
| 327 |
+
document.getElementById('classicTab').textContent =
|
| 328 |
+
data.classic_response || 'No classic response generated';
|
| 329 |
+
|
| 330 |
+
document.getElementById('cqureTab').textContent =
|
| 331 |
+
data.cqure_response || 'No CQURE response generated';
|
| 332 |
+
|
| 333 |
+
document.getElementById('sentimentTab').textContent =
|
| 334 |
+
data.sentiment ? JSON.stringify(data.sentiment, null, 2) : 'No sentiment analysis';
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
} catch (error) {
|
| 338 |
+
tabs.forEach(tab => {
|
| 339 |
+
document.getElementById(tab + 'Tab').textContent = `Network Error: ${error.message}`;
|
| 340 |
+
});
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
// Allow Enter key to submit (with Shift+Enter for new line)
|
| 345 |
+
document.getElementById('cognitiveQuery').addEventListener('keydown', function(e) {
|
| 346 |
+
if (e.key === 'Enter' && !e.shiftKey) {
|
| 347 |
+
e.preventDefault();
|
| 348 |
+
processCognitiveQuery();
|
| 349 |
+
}
|
| 350 |
+
});
|
| 351 |
+
</script>
|
| 352 |
+
</body>
|
| 353 |
+
</html>
|
templates/dashboard.html
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Codette Dashboard - System Monitoring</title>
|
| 7 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 8 |
+
<style>
|
| 9 |
+
body {
|
| 10 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 11 |
+
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
|
| 12 |
+
color: white;
|
| 13 |
+
margin: 0;
|
| 14 |
+
padding: 2rem;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.dashboard-container {
|
| 18 |
+
max-width: 1400px;
|
| 19 |
+
margin: 0 auto;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.header {
|
| 23 |
+
text-align: center;
|
| 24 |
+
margin-bottom: 2rem;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.header h1 {
|
| 28 |
+
font-size: 2.5rem;
|
| 29 |
+
margin-bottom: 0.5rem;
|
| 30 |
+
background: linear-gradient(45deg, #fff, #a8e6cf);
|
| 31 |
+
-webkit-background-clip: text;
|
| 32 |
+
-webkit-text-fill-color: transparent;
|
| 33 |
+
background-clip: text;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.metrics-grid {
|
| 37 |
+
display: grid;
|
| 38 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 39 |
+
gap: 1.5rem;
|
| 40 |
+
margin-bottom: 2rem;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.metric-card {
|
| 44 |
+
background: rgba(255, 255, 255, 0.1);
|
| 45 |
+
backdrop-filter: blur(10px);
|
| 46 |
+
border-radius: 12px;
|
| 47 |
+
padding: 1.5rem;
|
| 48 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 49 |
+
text-align: center;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.metric-value {
|
| 53 |
+
font-size: 2.5rem;
|
| 54 |
+
font-weight: bold;
|
| 55 |
+
margin-bottom: 0.5rem;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.metric-label {
|
| 59 |
+
opacity: 0.8;
|
| 60 |
+
font-size: 0.9rem;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.charts-container {
|
| 64 |
+
display: grid;
|
| 65 |
+
grid-template-columns: 1fr 1fr;
|
| 66 |
+
gap: 2rem;
|
| 67 |
+
margin: 2rem 0;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.chart-card {
|
| 71 |
+
background: rgba(255, 255, 255, 0.1);
|
| 72 |
+
backdrop-filter: blur(10px);
|
| 73 |
+
border-radius: 12px;
|
| 74 |
+
padding: 1.5rem;
|
| 75 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.chart-card h3 {
|
| 79 |
+
margin-bottom: 1rem;
|
| 80 |
+
color: #a8e6cf;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.status-indicators {
|
| 84 |
+
display: flex;
|
| 85 |
+
justify-content: space-around;
|
| 86 |
+
margin: 2rem 0;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.status-indicator {
|
| 90 |
+
text-align: center;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.status-circle {
|
| 94 |
+
width: 60px;
|
| 95 |
+
height: 60px;
|
| 96 |
+
border-radius: 50%;
|
| 97 |
+
margin: 0 auto 0.5rem;
|
| 98 |
+
display: flex;
|
| 99 |
+
align-items: center;
|
| 100 |
+
justify-content: center;
|
| 101 |
+
font-size: 1.5rem;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.status-healthy {
|
| 105 |
+
background: #4caf50;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.status-warning {
|
| 109 |
+
background: #ff9800;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.status-critical {
|
| 113 |
+
background: #f44336;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.nav-bar {
|
| 117 |
+
background: rgba(255, 255, 255, 0.1);
|
| 118 |
+
backdrop-filter: blur(10px);
|
| 119 |
+
border-radius: 8px;
|
| 120 |
+
padding: 1rem;
|
| 121 |
+
margin-bottom: 2rem;
|
| 122 |
+
text-align: center;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.nav-bar a {
|
| 126 |
+
color: white;
|
| 127 |
+
text-decoration: none;
|
| 128 |
+
padding: 0.5rem 1rem;
|
| 129 |
+
margin: 0 0.5rem;
|
| 130 |
+
border-radius: 4px;
|
| 131 |
+
transition: background 0.3s ease;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.nav-bar a:hover {
|
| 135 |
+
background: rgba(255, 255, 255, 0.2);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.real-time-log {
|
| 139 |
+
background: rgba(0, 0, 0, 0.3);
|
| 140 |
+
border-radius: 8px;
|
| 141 |
+
padding: 1rem;
|
| 142 |
+
height: 200px;
|
| 143 |
+
overflow-y: auto;
|
| 144 |
+
font-family: monospace;
|
| 145 |
+
font-size: 0.8rem;
|
| 146 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
@media (max-width: 768px) {
|
| 150 |
+
.charts-container {
|
| 151 |
+
grid-template-columns: 1fr;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.header h1 {
|
| 155 |
+
font-size: 2rem;
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
</style>
|
| 159 |
+
</head>
|
| 160 |
+
<body>
|
| 161 |
+
<div class="dashboard-container">
|
| 162 |
+
<nav class="nav-bar">
|
| 163 |
+
<a href="/">π Home</a>
|
| 164 |
+
<a href="/dashboard">π Dashboard</a>
|
| 165 |
+
<a href="/quantum">βοΈ Quantum</a>
|
| 166 |
+
<a href="/cognitive">π§ Cognitive</a>
|
| 167 |
+
</nav>
|
| 168 |
+
|
| 169 |
+
<header class="header">
|
| 170 |
+
<h1>Codette System Dashboard</h1>
|
| 171 |
+
<p>Real-time monitoring of AI cognitive systems, quantum processing, and ethical governance</p>
|
| 172 |
+
</header>
|
| 173 |
+
|
| 174 |
+
<div class="metrics-grid">
|
| 175 |
+
<div class="metric-card">
|
| 176 |
+
<div class="metric-value" id="cpuMetric">--</div>
|
| 177 |
+
<div class="metric-label">CPU Usage</div>
|
| 178 |
+
</div>
|
| 179 |
+
|
| 180 |
+
<div class="metric-card">
|
| 181 |
+
<div class="metric-value" id="memoryMetric">--</div>
|
| 182 |
+
<div class="metric-label">Memory Usage</div>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<div class="metric-card">
|
| 186 |
+
<div class="metric-value" id="responseMetric">--</div>
|
| 187 |
+
<div class="metric-label">Response Time (ms)</div>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<div class="metric-card">
|
| 191 |
+
<div class="metric-value" id="queryCount">0</div>
|
| 192 |
+
<div class="metric-label">Queries Processed</div>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
|
| 196 |
+
<div class="status-indicators">
|
| 197 |
+
<div class="status-indicator">
|
| 198 |
+
<div class="status-circle status-healthy" id="aiStatus">π€</div>
|
| 199 |
+
<div>AI Core</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<div class="status-indicator">
|
| 203 |
+
<div class="status-circle status-healthy" id="quantumStatus">βοΈ</div>
|
| 204 |
+
<div>Quantum Engine</div>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<div class="status-indicator">
|
| 208 |
+
<div class="status-circle status-healthy" id="ethicsStatus">βοΈ</div>
|
| 209 |
+
<div>Ethics Module</div>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="status-indicator">
|
| 213 |
+
<div class="status-circle status-healthy" id="securityStatus">π‘οΈ</div>
|
| 214 |
+
<div>Security</div>
|
| 215 |
+
</div>
|
| 216 |
+
</div>
|
| 217 |
+
|
| 218 |
+
<div class="charts-container">
|
| 219 |
+
<div class="chart-card">
|
| 220 |
+
<h3>System Performance</h3>
|
| 221 |
+
<canvas id="performanceChart"></canvas>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<div class="chart-card">
|
| 225 |
+
<h3>Query Response Times</h3>
|
| 226 |
+
<canvas id="responseChart"></canvas>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
|
| 230 |
+
<div class="chart-card">
|
| 231 |
+
<h3>π Real-time System Log</h3>
|
| 232 |
+
<div class="real-time-log" id="systemLog">
|
| 233 |
+
[System initialized] Codette AI Dashboard online
|
| 234 |
+
[Health Monitor] All systems operational
|
| 235 |
+
[Quantum Engine] Ready for simulation tasks
|
| 236 |
+
[Ethics Module] Governance protocols active
|
| 237 |
+
[Security] Defense systems online
|
| 238 |
+
</div>
|
| 239 |
+
</div>
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<script>
|
| 243 |
+
// Initialize charts
|
| 244 |
+
const performanceCtx = document.getElementById('performanceChart').getContext('2d');
|
| 245 |
+
const responseCtx = document.getElementById('responseChart').getContext('2d');
|
| 246 |
+
|
| 247 |
+
let queryCount = 0;
|
| 248 |
+
let performanceData = {
|
| 249 |
+
labels: [],
|
| 250 |
+
datasets: [{
|
| 251 |
+
label: 'CPU %',
|
| 252 |
+
data: [],
|
| 253 |
+
borderColor: '#ff6b6b',
|
| 254 |
+
backgroundColor: 'rgba(255, 107, 107, 0.1)',
|
| 255 |
+
tension: 0.4
|
| 256 |
+
}, {
|
| 257 |
+
label: 'Memory %',
|
| 258 |
+
data: [],
|
| 259 |
+
borderColor: '#4ecdc4',
|
| 260 |
+
backgroundColor: 'rgba(78, 205, 196, 0.1)',
|
| 261 |
+
tension: 0.4
|
| 262 |
+
}]
|
| 263 |
+
};
|
| 264 |
+
|
| 265 |
+
let responseData = {
|
| 266 |
+
labels: [],
|
| 267 |
+
datasets: [{
|
| 268 |
+
label: 'Response Time (ms)',
|
| 269 |
+
data: [],
|
| 270 |
+
borderColor: '#45b7d1',
|
| 271 |
+
backgroundColor: 'rgba(69, 183, 209, 0.1)',
|
| 272 |
+
tension: 0.4
|
| 273 |
+
}]
|
| 274 |
+
};
|
| 275 |
+
|
| 276 |
+
const performanceChart = new Chart(performanceCtx, {
|
| 277 |
+
type: 'line',
|
| 278 |
+
data: performanceData,
|
| 279 |
+
options: {
|
| 280 |
+
responsive: true,
|
| 281 |
+
scales: {
|
| 282 |
+
y: {
|
| 283 |
+
beginAtZero: true,
|
| 284 |
+
max: 100,
|
| 285 |
+
ticks: { color: 'white' }
|
| 286 |
+
},
|
| 287 |
+
x: {
|
| 288 |
+
ticks: { color: 'white' }
|
| 289 |
+
}
|
| 290 |
+
},
|
| 291 |
+
plugins: {
|
| 292 |
+
legend: {
|
| 293 |
+
labels: { color: 'white' }
|
| 294 |
+
}
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
});
|
| 298 |
+
|
| 299 |
+
const responseChart = new Chart(responseCtx, {
|
| 300 |
+
type: 'line',
|
| 301 |
+
data: responseData,
|
| 302 |
+
options: {
|
| 303 |
+
responsive: true,
|
| 304 |
+
scales: {
|
| 305 |
+
y: {
|
| 306 |
+
beginAtZero: true,
|
| 307 |
+
ticks: { color: 'white' }
|
| 308 |
+
},
|
| 309 |
+
x: {
|
| 310 |
+
ticks: { color: 'white' }
|
| 311 |
+
}
|
| 312 |
+
},
|
| 313 |
+
plugins: {
|
| 314 |
+
legend: {
|
| 315 |
+
labels: { color: 'white' }
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
+
}
|
| 319 |
+
});
|
| 320 |
+
|
| 321 |
+
// Update system metrics
|
| 322 |
+
async function updateMetrics() {
|
| 323 |
+
try {
|
| 324 |
+
const response = await fetch('/api/health');
|
| 325 |
+
const data = await response.json();
|
| 326 |
+
|
| 327 |
+
if (data.metrics) {
|
| 328 |
+
document.getElementById('cpuMetric').textContent =
|
| 329 |
+
data.metrics.cpu ? `${data.metrics.cpu.toFixed(1)}%` : '--';
|
| 330 |
+
document.getElementById('memoryMetric').textContent =
|
| 331 |
+
data.metrics.memory ? `${data.metrics.memory.toFixed(1)}%` : '--';
|
| 332 |
+
document.getElementById('responseMetric').textContent =
|
| 333 |
+
data.metrics.response_time ? `${(data.metrics.response_time * 1000).toFixed(1)}` : '--';
|
| 334 |
+
|
| 335 |
+
// Update charts
|
| 336 |
+
const now = new Date().toLocaleTimeString();
|
| 337 |
+
|
| 338 |
+
if (performanceData.labels.length > 20) {
|
| 339 |
+
performanceData.labels.shift();
|
| 340 |
+
performanceData.datasets[0].data.shift();
|
| 341 |
+
performanceData.datasets[1].data.shift();
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
performanceData.labels.push(now);
|
| 345 |
+
performanceData.datasets[0].data.push(data.metrics.cpu || 0);
|
| 346 |
+
performanceData.datasets[1].data.push(data.metrics.memory || 0);
|
| 347 |
+
performanceChart.update();
|
| 348 |
+
|
| 349 |
+
if (responseData.labels.length > 20) {
|
| 350 |
+
responseData.labels.shift();
|
| 351 |
+
responseData.datasets[0].data.shift();
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
responseData.labels.push(now);
|
| 355 |
+
responseData.datasets[0].data.push((data.metrics.response_time || 0) * 1000);
|
| 356 |
+
responseChart.update();
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
} catch (error) {
|
| 360 |
+
console.error('Failed to update metrics:', error);
|
| 361 |
+
}
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
// Log system events
|
| 365 |
+
function addLogEntry(message) {
|
| 366 |
+
const log = document.getElementById('systemLog');
|
| 367 |
+
const timestamp = new Date().toLocaleTimeString();
|
| 368 |
+
log.textContent += `\n[${timestamp}] ${message}`;
|
| 369 |
+
log.scrollTop = log.scrollHeight;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
// Start real-time updates
|
| 373 |
+
setInterval(updateMetrics, 5000);
|
| 374 |
+
setInterval(() => {
|
| 375 |
+
addLogEntry(`Health check: All systems operational`);
|
| 376 |
+
}, 30000);
|
| 377 |
+
|
| 378 |
+
// Initial load
|
| 379 |
+
updateMetrics();
|
| 380 |
+
</script>
|
| 381 |
+
</body>
|
| 382 |
+
</html>
|
templates/index.html
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Codette AI Framework - Web Interface</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
body {
|
| 15 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 16 |
+
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
|
| 17 |
+
color: white;
|
| 18 |
+
min-height: 100vh;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.container {
|
| 22 |
+
max-width: 1200px;
|
| 23 |
+
margin: 0 auto;
|
| 24 |
+
padding: 2rem;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.header {
|
| 28 |
+
text-align: center;
|
| 29 |
+
margin-bottom: 3rem;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.header h1 {
|
| 33 |
+
font-size: 3rem;
|
| 34 |
+
margin-bottom: 1rem;
|
| 35 |
+
background: linear-gradient(45deg, #fff, #a8e6cf);
|
| 36 |
+
-webkit-background-clip: text;
|
| 37 |
+
-webkit-text-fill-color: transparent;
|
| 38 |
+
background-clip: text;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.header p {
|
| 42 |
+
font-size: 1.2rem;
|
| 43 |
+
opacity: 0.9;
|
| 44 |
+
max-width: 600px;
|
| 45 |
+
margin: 0 auto;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.modules-grid {
|
| 49 |
+
display: grid;
|
| 50 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 51 |
+
gap: 2rem;
|
| 52 |
+
margin: 3rem 0;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.module-card {
|
| 56 |
+
background: rgba(255, 255, 255, 0.1);
|
| 57 |
+
backdrop-filter: blur(10px);
|
| 58 |
+
border-radius: 16px;
|
| 59 |
+
padding: 2rem;
|
| 60 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 61 |
+
transition: all 0.3s ease;
|
| 62 |
+
cursor: pointer;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.module-card:hover {
|
| 66 |
+
transform: translateY(-5px);
|
| 67 |
+
background: rgba(255, 255, 255, 0.15);
|
| 68 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.module-card h3 {
|
| 72 |
+
font-size: 1.5rem;
|
| 73 |
+
margin-bottom: 1rem;
|
| 74 |
+
color: #a8e6cf;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.module-card p {
|
| 78 |
+
opacity: 0.9;
|
| 79 |
+
line-height: 1.6;
|
| 80 |
+
margin-bottom: 1rem;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.module-status {
|
| 84 |
+
display: inline-block;
|
| 85 |
+
padding: 0.3rem 0.8rem;
|
| 86 |
+
border-radius: 20px;
|
| 87 |
+
font-size: 0.8rem;
|
| 88 |
+
font-weight: bold;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.status-active {
|
| 92 |
+
background: #4caf50;
|
| 93 |
+
color: white;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.status-inactive {
|
| 97 |
+
background: #f44336;
|
| 98 |
+
color: white;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.query-interface {
|
| 102 |
+
background: rgba(255, 255, 255, 0.1);
|
| 103 |
+
backdrop-filter: blur(10px);
|
| 104 |
+
border-radius: 16px;
|
| 105 |
+
padding: 2rem;
|
| 106 |
+
margin: 3rem 0;
|
| 107 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.query-input {
|
| 111 |
+
width: 100%;
|
| 112 |
+
padding: 1rem;
|
| 113 |
+
border: none;
|
| 114 |
+
border-radius: 8px;
|
| 115 |
+
background: rgba(255, 255, 255, 0.9);
|
| 116 |
+
color: #333;
|
| 117 |
+
font-size: 1rem;
|
| 118 |
+
margin-bottom: 1rem;
|
| 119 |
+
resize: vertical;
|
| 120 |
+
min-height: 100px;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.btn-primary {
|
| 124 |
+
background: linear-gradient(45deg, #4caf50, #45a049);
|
| 125 |
+
color: white;
|
| 126 |
+
padding: 1rem 2rem;
|
| 127 |
+
border: none;
|
| 128 |
+
border-radius: 8px;
|
| 129 |
+
font-size: 1rem;
|
| 130 |
+
cursor: pointer;
|
| 131 |
+
transition: all 0.3s ease;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.btn-primary:hover {
|
| 135 |
+
transform: translateY(-2px);
|
| 136 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.response-area {
|
| 140 |
+
background: rgba(0, 0, 0, 0.3);
|
| 141 |
+
border-radius: 8px;
|
| 142 |
+
padding: 1rem;
|
| 143 |
+
margin-top: 1rem;
|
| 144 |
+
min-height: 200px;
|
| 145 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 146 |
+
font-family: monospace;
|
| 147 |
+
white-space: pre-wrap;
|
| 148 |
+
overflow-y: auto;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.loading {
|
| 152 |
+
display: none;
|
| 153 |
+
text-align: center;
|
| 154 |
+
padding: 2rem;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.spinner {
|
| 158 |
+
border: 4px solid rgba(255, 255, 255, 0.3);
|
| 159 |
+
border-radius: 50%;
|
| 160 |
+
border-top: 4px solid #a8e6cf;
|
| 161 |
+
width: 40px;
|
| 162 |
+
height: 40px;
|
| 163 |
+
animation: spin 1s linear infinite;
|
| 164 |
+
margin: 0 auto 1rem;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
@keyframes spin {
|
| 168 |
+
0% { transform: rotate(0deg); }
|
| 169 |
+
100% { transform: rotate(360deg); }
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
.footer {
|
| 173 |
+
text-align: center;
|
| 174 |
+
margin-top: 3rem;
|
| 175 |
+
padding: 2rem;
|
| 176 |
+
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
| 177 |
+
opacity: 0.7;
|
| 178 |
+
}
|
| 179 |
+
</style>
|
| 180 |
+
</head>
|
| 181 |
+
<body>
|
| 182 |
+
<div class="container">
|
| 183 |
+
<header class="header">
|
| 184 |
+
<h1>Codette AI Framework</h1>
|
| 185 |
+
<p>Advanced multi-perspective AI with quantum-inspired reasoning, ethical governance, and recursive cognition</p>
|
| 186 |
+
</header>
|
| 187 |
+
|
| 188 |
+
<div class="modules-grid">
|
| 189 |
+
<div class="module-card" onclick="window.location.href='/cognitive'">
|
| 190 |
+
<h3>π§ Cognitive Processing</h3>
|
| 191 |
+
<p>Multi-perspective analysis engine with scientific, creative, and emotional reasoning modes</p>
|
| 192 |
+
<span class="module-status status-active">Active</span>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="module-card" onclick="window.location.href='/quantum'">
|
| 196 |
+
<h3>βοΈ Quantum Simulation</h3>
|
| 197 |
+
<p>Quantum and chaos simulations with NASA exoplanet data integration and multi-core processing</p>
|
| 198 |
+
<span class="module-status status-active">Active</span>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<div class="module-card" onclick="window.location.href='/dashboard'">
|
| 202 |
+
<h3>π System Dashboard</h3>
|
| 203 |
+
<p>Real-time health monitoring, anomaly detection, and system performance metrics</p>
|
| 204 |
+
<span class="module-status status-active">Active</span>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<div class="module-card">
|
| 208 |
+
<h3>π‘οΈ Ethical Governance</h3>
|
| 209 |
+
<p>Ethical decision-making framework with transparency and bias mitigation</p>
|
| 210 |
+
<span class="module-status status-active">Active</span>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<div class="module-card">
|
| 214 |
+
<h3>π¨ Creative Intelligence</h3>
|
| 215 |
+
<p>AI-driven creativity for art, music, literature, and innovative problem-solving</p>
|
| 216 |
+
<span class="module-status status-active">Active</span>
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<div class="module-card">
|
| 220 |
+
<h3>π Recursive Reasoning</h3>
|
| 221 |
+
<p>Deep recursive thought loops with dynamic depth adjustment and self-reflection</p>
|
| 222 |
+
<span class="module-status status-active">Active</span>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
|
| 226 |
+
<div class="query-interface">
|
| 227 |
+
<h2>π€ Interactive Codette Query Interface</h2>
|
| 228 |
+
<textarea
|
| 229 |
+
id="queryInput"
|
| 230 |
+
class="query-input"
|
| 231 |
+
placeholder="Ask Codette anything... She will respond using multi-perspective reasoning, ethical analysis, and recursive thought loops."
|
| 232 |
+
></textarea>
|
| 233 |
+
|
| 234 |
+
<button onclick="processQuery()" class="btn-primary">
|
| 235 |
+
Process Query with Codette
|
| 236 |
+
</button>
|
| 237 |
+
|
| 238 |
+
<div class="loading" id="loading">
|
| 239 |
+
<div class="spinner"></div>
|
| 240 |
+
<p>Codette is thinking recursively...</p>
|
| 241 |
+
</div>
|
| 242 |
+
|
| 243 |
+
<div id="responseArea" class="response-area"></div>
|
| 244 |
+
</div>
|
| 245 |
+
|
| 246 |
+
<footer class="footer">
|
| 247 |
+
<p>Codette AI Framework v2.0 | Created by Jonathan Harrison | ORCID: 0009-0003-7005-8187</p>
|
| 248 |
+
<p>Powered by recursive reasoning, quantum-inspired optimization, and ethical AI governance</p>
|
| 249 |
+
</footer>
|
| 250 |
+
</div>
|
| 251 |
+
|
| 252 |
+
<script>
|
| 253 |
+
async function processQuery() {
|
| 254 |
+
const query = document.getElementById('queryInput').value;
|
| 255 |
+
const loading = document.getElementById('loading');
|
| 256 |
+
const responseArea = document.getElementById('responseArea');
|
| 257 |
+
|
| 258 |
+
if (!query.trim()) {
|
| 259 |
+
alert('Please enter a query for Codette to process');
|
| 260 |
+
return;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
// Show loading
|
| 264 |
+
loading.style.display = 'block';
|
| 265 |
+
responseArea.textContent = '';
|
| 266 |
+
|
| 267 |
+
try {
|
| 268 |
+
const response = await fetch('/api/query', {
|
| 269 |
+
method: 'POST',
|
| 270 |
+
headers: {
|
| 271 |
+
'Content-Type': 'application/json',
|
| 272 |
+
},
|
| 273 |
+
body: JSON.stringify({
|
| 274 |
+
query: query,
|
| 275 |
+
user_id: 'web_user_' + Date.now()
|
| 276 |
+
})
|
| 277 |
+
});
|
| 278 |
+
|
| 279 |
+
const data = await response.json();
|
| 280 |
+
|
| 281 |
+
// Hide loading
|
| 282 |
+
loading.style.display = 'none';
|
| 283 |
+
|
| 284 |
+
if (data.error) {
|
| 285 |
+
responseArea.textContent = `Error: ${data.error}`;
|
| 286 |
+
} else {
|
| 287 |
+
// Format the response nicely
|
| 288 |
+
let formattedResponse = `π€ Codette's Response:\n\n`;
|
| 289 |
+
|
| 290 |
+
if (data.insights) {
|
| 291 |
+
formattedResponse += `π‘ Cognitive Insights:\n${data.insights.join('\n')}\n\n`;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
if (data.classic_response) {
|
| 295 |
+
formattedResponse += `οΏ½οΏ½οΏ½οΏ½ Classic Codette:\n${data.classic_response}\n\n`;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
if (data.cqure_response) {
|
| 299 |
+
formattedResponse += `β‘ CQURE System:\n${data.cqure_response}\n\n`;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
if (data.sentiment) {
|
| 303 |
+
formattedResponse += `π Sentiment Analysis:\n${JSON.stringify(data.sentiment, null, 2)}\n\n`;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
if (data.health_status) {
|
| 307 |
+
formattedResponse += `π₯ System Health:\n${JSON.stringify(data.health_status, null, 2)}\n\n`;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
responseArea.textContent = formattedResponse;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
} catch (error) {
|
| 314 |
+
loading.style.display = 'none';
|
| 315 |
+
responseArea.textContent = `Network Error: ${error.message}`;
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
// Allow Enter key to submit (with Shift+Enter for new line)
|
| 320 |
+
document.getElementById('queryInput').addEventListener('keydown', function(e) {
|
| 321 |
+
if (e.key ===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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Codette Quantum Simulation Interface</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 10 |
+
background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
|
| 11 |
+
color: white;
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 2rem;
|
| 14 |
+
min-height: 100vh;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.container {
|
| 18 |
+
max-width: 1200px;
|
| 19 |
+
margin: 0 auto;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.header {
|
| 23 |
+
text-align: center;
|
| 24 |
+
margin-bottom: 2rem;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.header h1 {
|
| 28 |
+
font-size: 2.5rem;
|
| 29 |
+
background: linear-gradient(45deg, #00f5ff, #a8e6cf);
|
| 30 |
+
-webkit-background-clip: text;
|
| 31 |
+
-webkit-text-fill-color: transparent;
|
| 32 |
+
background-clip: text;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.nav-bar {
|
| 36 |
+
background: rgba(255, 255, 255, 0.1);
|
| 37 |
+
backdrop-filter: blur(10px);
|
| 38 |
+
border-radius: 8px;
|
| 39 |
+
padding: 1rem;
|
| 40 |
+
margin-bottom: 2rem;
|
| 41 |
+
text-align: center;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.nav-bar a {
|
| 45 |
+
color: white;
|
| 46 |
+
text-decoration: none;
|
| 47 |
+
padding: 0.5rem 1rem;
|
| 48 |
+
margin: 0 0.5rem;
|
| 49 |
+
border-radius: 4px;
|
| 50 |
+
transition: background 0.3s ease;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.nav-bar a:hover {
|
| 54 |
+
background: rgba(255, 255, 255, 0.2);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.simulation-controls {
|
| 58 |
+
background: rgba(255, 255, 255, 0.1);
|
| 59 |
+
backdrop-filter: blur(10px);
|
| 60 |
+
border-radius: 16px;
|
| 61 |
+
padding: 2rem;
|
| 62 |
+
margin-bottom: 2rem;
|
| 63 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.control-group {
|
| 67 |
+
margin-bottom: 1.5rem;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.control-group label {
|
| 71 |
+
display: block;
|
| 72 |
+
margin-bottom: 0.5rem;
|
| 73 |
+
font-weight: bold;
|
| 74 |
+
color: #a8e6cf;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.control-group input, .control-group select {
|
| 78 |
+
width: 100%;
|
| 79 |
+
padding: 0.8rem;
|
| 80 |
+
border: none;
|
| 81 |
+
border-radius: 8px;
|
| 82 |
+
background: rgba(255, 255, 255, 0.9);
|
| 83 |
+
color: #333;
|
| 84 |
+
font-size: 1rem;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.btn-quantum {
|
| 88 |
+
background: linear-gradient(45deg, #00f5ff, #0099cc);
|
| 89 |
+
color: white;
|
| 90 |
+
padding: 1rem 2rem;
|
| 91 |
+
border: none;
|
| 92 |
+
border-radius: 8px;
|
| 93 |
+
font-size: 1rem;
|
| 94 |
+
cursor: pointer;
|
| 95 |
+
transition: all 0.3s ease;
|
| 96 |
+
margin: 0.5rem;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.btn-quantum:hover {
|
| 100 |
+
transform: translateY(-2px);
|
| 101 |
+
box-shadow: 0 5px 15px rgba(0, 245, 255, 0.4);
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.simulation-results {
|
| 105 |
+
background: rgba(255, 255, 255, 0.1);
|
| 106 |
+
backdrop-filter: blur(10px);
|
| 107 |
+
border-radius: 16px;
|
| 108 |
+
padding: 2rem;
|
| 109 |
+
margin: 2rem 0;
|
| 110 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.results-grid {
|
| 114 |
+
display: grid;
|
| 115 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 116 |
+
gap: 1.5rem;
|
| 117 |
+
margin: 1rem 0;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.result-card {
|
| 121 |
+
background: rgba(0, 0, 0, 0.3);
|
| 122 |
+
border-radius: 8px;
|
| 123 |
+
padding: 1.5rem;
|
| 124 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.quantum-visualization {
|
| 128 |
+
background: rgba(255, 255, 255, 0.05);
|
| 129 |
+
border-radius: 12px;
|
| 130 |
+
padding: 1.5rem;
|
| 131 |
+
margin: 2rem 0;
|
| 132 |
+
text-align: center;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.quantum-state {
|
| 136 |
+
display: inline-block;
|
| 137 |
+
width: 80px;
|
| 138 |
+
height: 80px;
|
| 139 |
+
border-radius: 50%;
|
| 140 |
+
margin: 10px;
|
| 141 |
+
display: flex;
|
| 142 |
+
align-items: center;
|
| 143 |
+
justify-content: center;
|
| 144 |
+
color: white;
|
| 145 |
+
font-weight: bold;
|
| 146 |
+
animation: quantum-pulse 2s infinite;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
@keyframes quantum-pulse {
|
| 150 |
+
0%, 100% { transform: scale(1); opacity: 0.8; }
|
| 151 |
+
50% { transform: scale(1.1); opacity: 1; }
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.loading-quantum {
|
| 155 |
+
display: none;
|
| 156 |
+
text-align: center;
|
| 157 |
+
padding: 2rem;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.quantum-spinner {
|
| 161 |
+
border: 4px solid rgba(0, 245, 255, 0.3);
|
| 162 |
+
border-radius: 50%;
|
| 163 |
+
border-top: 4px solid #00f5ff;
|
| 164 |
+
width: 50px;
|
| 165 |
+
height: 50px;
|
| 166 |
+
animation: spin 1s linear infinite;
|
| 167 |
+
margin: 0 auto 1rem;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
@keyframes spin {
|
| 171 |
+
0% { transform: rotate(0deg); }
|
| 172 |
+
100% { transform: rotate(360deg); }
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.cocoon-list {
|
| 176 |
+
max-height: 300px;
|
| 177 |
+
overflow-y: auto;
|
| 178 |
+
background: rgba(0, 0, 0, 0.2);
|
| 179 |
+
border-radius: 8px;
|
| 180 |
+
padding: 1rem;
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
.cocoon-item {
|
| 184 |
+
background: rgba(255, 255, 255, 0.05);
|
| 185 |
+
border-radius: 4px;
|
| 186 |
+
padding: 0.8rem;
|
| 187 |
+
margin-bottom: 0.5rem;
|
| 188 |
+
border-left: 3px solid #00f5ff;
|
| 189 |
+
}
|
| 190 |
+
</style>
|
| 191 |
+
</head>
|
| 192 |
+
<body>
|
| 193 |
+
<div class="container">
|
| 194 |
+
<nav class="nav-bar">
|
| 195 |
+
<a href="/">π Home</a>
|
| 196 |
+
<a href="/dashboard">π Dashboard</a>
|
| 197 |
+
<a href="/quantum">βοΈ Quantum</a>
|
| 198 |
+
<a href="/cognitive">π§ Cognitive</a>
|
| 199 |
+
</nav>
|
| 200 |
+
|
| 201 |
+
<header class="header">
|
| 202 |
+
<h1>βοΈ Quantum Simulation Interface</h1>
|
| 203 |
+
<p>Citizen-science quantum and chaos simulations with AI meta-commentary</p>
|
| 204 |
+
</header>
|
| 205 |
+
|
| 206 |
+
<div class="simulation-controls">
|
| 207 |
+
<h2>π¬ Simulation Parameters</h2>
|
| 208 |
+
|
| 209 |
+
<div class="control-group">
|
| 210 |
+
<label for="coreCount">CPU Cores to Use:</label>
|
| 211 |
+
<input type="number" id="coreCount" value="4" min="1" max="16">
|
| 212 |
+
</div>
|
| 213 |
+
|
| 214 |
+
<div class="control-group">
|
| 215 |
+
<label for="simulationType">Simulation Type:</label>
|
| 216 |
+
<select id="simulationType">
|
| 217 |
+
<option value="quantum_chaos">Quantum + Chaos</option>
|
| 218 |
+
<option value="quantum_only">Quantum Only</option>
|
| 219 |
+
<option value="chaos_only">Chaos Only</option>
|
| 220 |
+
<option value="cosmic_entropy">Cosmic Entropy</option>
|
| 221 |
+
</select>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<div class="control-group">
|
| 225 |
+
<label for="perspectiveAgents">AI Perspective Agents:</label>
|
| 226 |
+
<select id="perspectiveAgents" multiple>
|
| 227 |
+
<option value="Quantum" selected>Quantum</option>
|
| 228 |
+
<option value="Newton" selected>Newtonian</option>
|
| 229 |
+
<option value="Stardust" selected>Stardust</option>
|
| 230 |
+
<option value="DaVinci">Da Vinci</option>
|
| 231 |
+
<option value="Ethical">Ethical</option>
|
| 232 |
+
</select>
|
| 233 |
+
</div>
|
| 234 |
+
|
| 235 |
+
<button onclick="runQuantumSimulation()" class="btn-quantum">
|
| 236 |
+
π Launch Quantum Simulation
|
| 237 |
+
</button>
|
| 238 |
+
|
| 239 |
+
<button onclick="analyzeCocoons()" class="btn-quantum">
|
| 240 |
+
π Analyze Cocoons
|
| 241 |
+
</button>
|
| 242 |
+
|
| 243 |
+
<button onclick="visualize3D()" class="btn-quantum">
|
| 244 |
+
π 3D Visualization
|
| 245 |
+
</button>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<div class="loading-quantum" id="quantumLoading">
|
| 249 |
+
<div class="quantum-spinner"></div>
|
| 250 |
+
<p>Running quantum simulation across multiple cores...</p>
|
| 251 |
+
<p>AI agents are analyzing each universe...</p>
|
| 252 |
+
</div>
|
| 253 |
+
|
| 254 |
+
<div class="simulation-results" id="resultsSection" style="display: none;">
|
| 255 |
+
<h2>π― Simulation Results</h2>
|
| 256 |
+
|
| 257 |
+
<div class="quantum-visualization" id="quantumViz">
|
| 258 |
+
<h3>Quantum State Visualization</h3>
|
| 259 |
+
<div id="quantumStates"></div>
|
| 260 |
+
</div>
|
| 261 |
+
|
| 262 |
+
<div class="results-grid" id="resultsGrid">
|
| 263 |
+
<!-- Results will be populated here -->
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<div>
|
| 267 |
+
<h3>π Generated Cocoons</h3>
|
| 268 |
+
<div class="cocoon-list" id="cocoonList">
|
| 269 |
+
<!-- Cocoon files will be listed here -->
|
| 270 |
+
</div>
|
| 271 |
+
</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
|
| 275 |
+
<script>
|
| 276 |
+
async function runQuantumSimulation() {
|
| 277 |
+
const cores = parseInt(document.getElementById('coreCount').value);
|
| 278 |
+
const loading = document.getElementById('quantumLoading');
|
| 279 |
+
const results = document.getElementById('resultsSection');
|
| 280 |
+
|
| 281 |
+
// Show loading
|
| 282 |
+
loading.style.display = 'block';
|
| 283 |
+
results.style.display = 'none';
|
| 284 |
+
|
| 285 |
+
try {
|
| 286 |
+
const response = await fetch('/api/quantum-simulation', {
|
| 287 |
+
method: 'POST',
|
| 288 |
+
headers: {
|
| 289 |
+
'Content-Type': 'application/json',
|
| 290 |
+
},
|
| 291 |
+
body: JSON.stringify({
|
| 292 |
+
cores: cores,
|
| 293 |
+
simulation_type: document.getElementById('simulationType').value
|
| 294 |
+
})
|
| 295 |
+
});
|
| 296 |
+
|
| 297 |
+
const data = await response.json();
|
| 298 |
+
|
| 299 |
+
// Hide loading
|
| 300 |
+
loading.style.display = 'none';
|
| 301 |
+
results.style.display = 'block';
|
| 302 |
+
|
| 303 |
+
if (data.error) {
|
| 304 |
+
alert(`Simulation Error: ${data.error}`);
|
| 305 |
+
} else {
|
| 306 |
+
displaySimulationResults(data);
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
} catch (error) {
|
| 310 |
+
loading.style.display = 'none';
|
| 311 |
+
alert(`Network Error: ${error.message}`);
|
| 312 |
+
}
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
function displaySimulationResults(data) {
|
| 316 |
+
const resultsGrid = document.getElementById('resultsGrid');
|
| 317 |
+
const cocoonList = document.getElementById('cocoonList');
|
| 318 |
+
const quantumStates = document.getElementById('quantumStates');
|
| 319 |
+
|
| 320 |
+
// Clear previous results
|
| 321 |
+
resultsGrid.innerHTML = '';
|
| 322 |
+
cocoonList.innerHTML = '';
|
| 323 |
+
quantumStates.innerHTML = '';
|
| 324 |
+
|
| 325 |
+
// Display quantum states visualization
|
| 326 |
+
for (let i = 0; i < data.cores_used; i++) {
|
| 327 |
+
const state = document.createElement('div');
|
| 328 |
+
state.className = 'quantum-state';
|
| 329 |
+
state.style.background = `hsl(${i * 360 / data.cores_used}, 70%, 50%)`;
|
| 330 |
+
state.textContent = `Core ${i + 1}`;
|
| 331 |
+
quantumStates.appendChild(state);
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
// Display results cards
|
| 335 |
+
data.results.forEach((result, index) => {
|
| 336 |
+
const card = document.createElement('div');
|
| 337 |
+
card.className = 'result-card';
|
| 338 |
+
card.innerHTML = `
|
| 339 |
+
<h4>π¬ Core ${index + 1} Results</h4>
|
| 340 |
+
<p><strong>File:</strong> ${result}</p>
|
| 341 |
+
<p><strong>Status:</strong> β
Simulation Complete</p>
|
| 342 |
+
<p><strong>AI Commentary:</strong> Generated</p>
|
| 343 |
+
`;
|
| 344 |
+
resultsGrid.appendChild(card);
|
| 345 |
+
});
|
| 346 |
+
|
| 347 |
+
// Display cocoon files
|
| 348 |
+
data.results.forEach(result => {
|
| 349 |
+
const cocoonItem = document.createElement('div');
|
| 350 |
+
cocoonItem.className = 'cocoon-item';
|
| 351 |
+
cocoonItem.innerHTML = `
|
| 352 |
+
<strong>π¦ ${result}</strong><br>
|
| 353 |
+
<small>Quantum state, chaos dynamics, and AI perspectives</small>
|
| 354 |
+
`;
|
| 355 |
+
cocoonList.appendChild(cocoonItem);
|
| 356 |
+
});
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
async function analyzeCocoons() {
|
| 360 |
+
alert('Cocoon analysis will be implemented in the next update!');
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
async function visualize3D() {
|
| 364 |
+
alert('3D visualization will be implemented in the next update!');
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// Initialize page
|
| 368 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 369 |
+
console.log('Quantum interface initialized');
|
| 370 |
+
});
|
| 371 |
+
</script>
|
| 372 |
+
</body>
|
| 373 |
+
</html>
|