Update index.html
Browse files- index.html +43 -0
index.html
CHANGED
|
@@ -92,6 +92,8 @@ details.think summary{cursor:pointer;font-size:12px;font-style:italic}
|
|
| 92 |
details.think .t{white-space:pre-wrap;border-left:3px solid var(--border);padding-left:10px;margin-top:5px;font-size:12.5px}
|
| 93 |
|
| 94 |
#controls{padding:8px 12px;background:var(--surface);display:flex;gap:8px;align-items:center;border-top:none}
|
|
|
|
|
|
|
| 95 |
#topic{flex:1;min-width:0;background:var(--input);border:none;color:var(--text);
|
| 96 |
border-radius:8px;padding:11px 14px;font-size:15px;outline:none}
|
| 97 |
#topic::placeholder{color:var(--muted)}
|
|
@@ -186,6 +188,7 @@ footer a{color:var(--accent);text-decoration:none}
|
|
| 186 |
.msg .content{max-width:85%}
|
| 187 |
#settings{margin:0 8px 8px}
|
| 188 |
#history{display:none}
|
|
|
|
| 189 |
}
|
| 190 |
</style>
|
| 191 |
</head>
|
|
@@ -229,6 +232,7 @@ footer a{color:var(--accent);text-decoration:none}
|
|
| 229 |
<div id="chat"></div>
|
| 230 |
|
| 231 |
<div id="controls">
|
|
|
|
| 232 |
<input id="topic" placeholder="Prop贸n un tema y los agentes debaten…">
|
| 233 |
<button id="start-btn" disabled>Cargando modelo…</button>
|
| 234 |
<button id="stop-btn">Detener</button>
|
|
@@ -714,6 +718,45 @@ topicEl.addEventListener('keydown', e => {
|
|
| 714 |
if (e.key === 'Enter') { e.preventDefault(); startBtn.click(); }
|
| 715 |
});
|
| 716 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
// --- Settings ---
|
| 718 |
const settingsPanel = document.getElementById('settings');
|
| 719 |
document.getElementById('settings-btn').addEventListener('click', () => {
|
|
|
|
| 92 |
details.think .t{white-space:pre-wrap;border-left:3px solid var(--border);padding-left:10px;margin-top:5px;font-size:12.5px}
|
| 93 |
|
| 94 |
#controls{padding:8px 12px;background:var(--surface);display:flex;gap:8px;align-items:center;border-top:none}
|
| 95 |
+
#topic-sugg{flex:none;max-width:170px;background:var(--input);color:var(--muted);border:none;
|
| 96 |
+
border-radius:8px;padding:11px 8px;font-size:13px;cursor:pointer;outline:none}
|
| 97 |
#topic{flex:1;min-width:0;background:var(--input);border:none;color:var(--text);
|
| 98 |
border-radius:8px;padding:11px 14px;font-size:15px;outline:none}
|
| 99 |
#topic::placeholder{color:var(--muted)}
|
|
|
|
| 188 |
.msg .content{max-width:85%}
|
| 189 |
#settings{margin:0 8px 8px}
|
| 190 |
#history{display:none}
|
| 191 |
+
#topic-sugg{max-width:110px}
|
| 192 |
}
|
| 193 |
</style>
|
| 194 |
</head>
|
|
|
|
| 232 |
<div id="chat"></div>
|
| 233 |
|
| 234 |
<div id="controls">
|
| 235 |
+
<select id="topic-sugg" title="Temas sugeridos"></select>
|
| 236 |
<input id="topic" placeholder="Prop贸n un tema y los agentes debaten…">
|
| 237 |
<button id="start-btn" disabled>Cargando modelo…</button>
|
| 238 |
<button id="stop-btn">Detener</button>
|
|
|
|
| 718 |
if (e.key === 'Enter') { e.preventDefault(); startBtn.click(); }
|
| 719 |
});
|
| 720 |
|
| 721 |
+
// --- Temas sugeridos (10 al azar en cada carga) ---
|
| 722 |
+
const TOPIC_POOL = [
|
| 723 |
+
'\u00bfConviene ejecutar LLMs en el navegador con WebGPU?',
|
| 724 |
+
'\u00bfEs mejor el caf\u00e9 solo o con leche?',
|
| 725 |
+
'\u00bfDeber\u00edan los coches aut\u00f3nomos decidir en un accidente?',
|
| 726 |
+
'\u00bfEs el trabajo remoto m\u00e1s productivo que la oficina?',
|
| 727 |
+
'\u00bfHa mejorado la IA la programaci\u00f3n o solo la ha acelerado?',
|
| 728 |
+
'\u00bfMerece la pena aprender Harbour en 2026?',
|
| 729 |
+
'\u00bfDeber\u00eda durar un smartphone 7 a\u00f1os?',
|
| 730 |
+
'Pizza con pi\u00f1a: \u00bfgenialidad o sacrilegio?',
|
| 731 |
+
'\u00bfSuscripci\u00f3n mensual o licencia perpetua para el software?',
|
| 732 |
+
'\u00bfEs la privacidad m\u00e1s importante que la comodidad?',
|
| 733 |
+
'\u00bfDeben los ni\u00f1os aprender a programar antes de los 10 a\u00f1os?',
|
| 734 |
+
'\u00bfSobrevivir\u00e1 el open source a la IA?',
|
| 735 |
+
'\u00bfSQL o NoSQL para la tienda de un barrio?',
|
| 736 |
+
'\u00bfTienen sentido los coches el\u00e9ctricos sin red de carga?',
|
| 737 |
+
'\u00bfEs la bater\u00eda el cuello de botella de la tecnolog\u00eda?',
|
| 738 |
+
'\u00bfEl 5G fue revoluci\u00f3n o marketing?',
|
| 739 |
+
'\u00bfPC de sobremesa o port\u00e1til hoy?',
|
| 740 |
+
'\u00bfSon los videojuegos cultura o solo ocio?',
|
| 741 |
+
'\u00bfEs mejor vivir en la ciudad o en un pueblo?',
|
| 742 |
+
'\u00bfDeber\u00eda existir un derecho al olvido digital?',
|
| 743 |
+
];
|
| 744 |
+
const suggEl = document.getElementById('topic-sugg');
|
| 745 |
+
(function fillSuggestions() {
|
| 746 |
+
const ph = document.createElement('option');
|
| 747 |
+
ph.value = ''; ph.textContent = '\u{1F3B2} 10 temas al azar\u2026';
|
| 748 |
+
suggEl.appendChild(ph);
|
| 749 |
+
[...TOPIC_POOL].sort(() => Math.random() - .5).slice(0, 10).forEach(t => {
|
| 750 |
+
const o = document.createElement('option');
|
| 751 |
+
o.value = t; o.textContent = t;
|
| 752 |
+
suggEl.appendChild(o);
|
| 753 |
+
});
|
| 754 |
+
})();
|
| 755 |
+
suggEl.addEventListener('change', () => {
|
| 756 |
+
if (suggEl.value) { topicEl.value = suggEl.value; topicEl.focus(); }
|
| 757 |
+
suggEl.selectedIndex = 0;
|
| 758 |
+
});
|
| 759 |
+
|
| 760 |
// --- Settings ---
|
| 761 |
const settingsPanel = document.getElementById('settings');
|
| 762 |
document.getElementById('settings-btn').addEventListener('click', () => {
|