Update static/index.html
Browse files- static/index.html +31 -340
static/index.html
CHANGED
@@ -5,211 +5,9 @@
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>AnyCoder AI Code Generator</title>
|
7 |
<meta name="description" content="Generate, modify, and understand code with the most advanced AI models." />
|
8 |
-
<style>
|
9 |
-
:root {
|
10 |
-
--bg: #0d1117;
|
11 |
-
--bg-secondary: #161b22;
|
12 |
-
--border: #30363d;
|
13 |
-
--text: #c9d1d9;
|
14 |
-
--text-muted: #8b949e;
|
15 |
-
--accent: #58a6ff;
|
16 |
-
--accent-hover: #79c0ff;
|
17 |
-
--danger: #f85149;
|
18 |
-
--success: #56d364;
|
19 |
-
--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
20 |
-
--radius: 8px;
|
21 |
-
--transition: 0.2s ease;
|
22 |
-
}
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
margin: 0;
|
27 |
-
padding: 0;
|
28 |
-
}
|
29 |
-
|
30 |
-
body {
|
31 |
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
|
32 |
-
background: var(--bg);
|
33 |
-
color: var(--text);
|
34 |
-
line-height: 1.6;
|
35 |
-
padding: 1rem;
|
36 |
-
}
|
37 |
-
|
38 |
-
header {
|
39 |
-
text-align: center;
|
40 |
-
margin-bottom: 2rem;
|
41 |
-
}
|
42 |
-
|
43 |
-
header h1 {
|
44 |
-
font-size: 2.5rem;
|
45 |
-
margin-bottom: 0.5rem;
|
46 |
-
}
|
47 |
-
|
48 |
-
header p {
|
49 |
-
color: var(--text-muted);
|
50 |
-
font-size: 1.1rem;
|
51 |
-
}
|
52 |
-
|
53 |
-
main {
|
54 |
-
max-width: 900px;
|
55 |
-
margin: 0 auto;
|
56 |
-
display: grid;
|
57 |
-
gap: 2rem;
|
58 |
-
}
|
59 |
-
|
60 |
-
section {
|
61 |
-
background: var(--bg-secondary);
|
62 |
-
border: 1px solid var(--border);
|
63 |
-
border-radius: var(--radius);
|
64 |
-
padding: 1.5rem;
|
65 |
-
}
|
66 |
-
|
67 |
-
h2 {
|
68 |
-
font-size: 1.25rem;
|
69 |
-
margin-bottom: 1rem;
|
70 |
-
}
|
71 |
-
|
72 |
-
label {
|
73 |
-
display: block;
|
74 |
-
margin-bottom: 0.5rem;
|
75 |
-
font-weight: 600;
|
76 |
-
}
|
77 |
-
|
78 |
-
select,
|
79 |
-
input[type="file"],
|
80 |
-
input[type="url"],
|
81 |
-
textarea {
|
82 |
-
width: 100%;
|
83 |
-
padding: 0.75rem;
|
84 |
-
border: 1px solid var(--border);
|
85 |
-
border-radius: var(--radius);
|
86 |
-
background: var(--bg);
|
87 |
-
color: var(--text);
|
88 |
-
font-size: 1rem;
|
89 |
-
transition: border-color var(--transition);
|
90 |
-
}
|
91 |
-
|
92 |
-
select:focus,
|
93 |
-
input:focus,
|
94 |
-
textarea:focus {
|
95 |
-
outline: none;
|
96 |
-
border-color: var(--accent);
|
97 |
-
}
|
98 |
-
|
99 |
-
textarea {
|
100 |
-
resize: vertical;
|
101 |
-
min-height: 120px;
|
102 |
-
font-family: var(--font-mono);
|
103 |
-
}
|
104 |
-
|
105 |
-
.tabs {
|
106 |
-
display: flex;
|
107 |
-
gap: 0.5rem;
|
108 |
-
margin-bottom: 1rem;
|
109 |
-
}
|
110 |
-
|
111 |
-
.tabs button {
|
112 |
-
background: transparent;
|
113 |
-
border: 1px solid var(--border);
|
114 |
-
border-radius: var(--radius);
|
115 |
-
padding: 0.5rem 1rem;
|
116 |
-
color: var(--text-muted);
|
117 |
-
cursor: pointer;
|
118 |
-
transition: background var(--transition), color var(--transition);
|
119 |
-
}
|
120 |
-
|
121 |
-
.tabs button[aria-selected="true"] {
|
122 |
-
background: var(--accent);
|
123 |
-
color: var(--bg);
|
124 |
-
border-color: var(--accent);
|
125 |
-
}
|
126 |
-
|
127 |
-
.tabs button:hover:not([aria-selected="true"]) {
|
128 |
-
background: var(--border);
|
129 |
-
color: var(--text);
|
130 |
-
}
|
131 |
-
|
132 |
-
.search-toggle {
|
133 |
-
display: flex;
|
134 |
-
align-items: center;
|
135 |
-
gap: 0.5rem;
|
136 |
-
margin-top: 1rem;
|
137 |
-
}
|
138 |
-
|
139 |
-
.actions {
|
140 |
-
display: flex;
|
141 |
-
gap: 1rem;
|
142 |
-
justify-content: flex-end;
|
143 |
-
}
|
144 |
-
|
145 |
-
button {
|
146 |
-
padding: 0.75rem 1.5rem;
|
147 |
-
border: none;
|
148 |
-
border-radius: var(--radius);
|
149 |
-
font-size: 1rem;
|
150 |
-
cursor: pointer;
|
151 |
-
transition: background var(--transition);
|
152 |
-
}
|
153 |
-
|
154 |
-
#clear {
|
155 |
-
background: var(--border);
|
156 |
-
color: var(--text);
|
157 |
-
}
|
158 |
-
|
159 |
-
#clear:hover {
|
160 |
-
background: var(--text-muted);
|
161 |
-
}
|
162 |
-
|
163 |
-
#generate {
|
164 |
-
background: var(--accent);
|
165 |
-
color: var(--bg);
|
166 |
-
}
|
167 |
-
|
168 |
-
#generate:hover {
|
169 |
-
background: var(--accent-hover);
|
170 |
-
}
|
171 |
-
|
172 |
-
pre {
|
173 |
-
background: var(--bg);
|
174 |
-
border: 1px solid var(--border);
|
175 |
-
border-radius: var(--radius);
|
176 |
-
padding: 1rem;
|
177 |
-
overflow-x: auto;
|
178 |
-
font-family: var(--font-mono);
|
179 |
-
font-size: 0.9rem;
|
180 |
-
}
|
181 |
-
|
182 |
-
iframe {
|
183 |
-
width: 100%;
|
184 |
-
height: 400px;
|
185 |
-
border: 1px solid var(--border);
|
186 |
-
border-radius: var(--radius);
|
187 |
-
background: #fff;
|
188 |
-
}
|
189 |
-
|
190 |
-
.visually-hidden {
|
191 |
-
position: absolute;
|
192 |
-
width: 1px;
|
193 |
-
height: 1px;
|
194 |
-
overflow: hidden;
|
195 |
-
clip: rect(0 0 0 0);
|
196 |
-
white-space: nowrap;
|
197 |
-
}
|
198 |
-
|
199 |
-
@media (max-width: 600px) {
|
200 |
-
body {
|
201 |
-
padding: 0.5rem;
|
202 |
-
}
|
203 |
-
|
204 |
-
header h1 {
|
205 |
-
font-size: 2rem;
|
206 |
-
}
|
207 |
-
|
208 |
-
.actions {
|
209 |
-
flex-direction: column;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
</style>
|
213 |
</head>
|
214 |
<body>
|
215 |
<header>
|
@@ -251,10 +49,34 @@
|
|
251 |
<h2 id="output-config">3. Configure Output</h2>
|
252 |
<label for="language">Target Language</label>
|
253 |
<select id="language">
|
254 |
-
<option value="html">HTML</option>
|
255 |
<option value="python">Python</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
<option value="javascript">JavaScript</option>
|
257 |
-
<option value="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
</select>
|
259 |
<div class="search-toggle">
|
260 |
<input type="checkbox" id="web-search" />
|
@@ -287,138 +109,7 @@
|
|
287 |
</section>
|
288 |
</main>
|
289 |
|
290 |
-
|
291 |
-
|
292 |
-
const AVAILABLE_MODELS = [
|
293 |
-
{
|
294 |
-
name: "Qwen/Qwen3-32B",
|
295 |
-
id: "Qwen/Qwen3-32B",
|
296 |
-
description: "Qwen3-32B model for code generation and general tasks"
|
297 |
-
},
|
298 |
-
{
|
299 |
-
name: "Moonshot Kimi-K2",
|
300 |
-
id: "moonshotai/Kimi-K2-Instruct",
|
301 |
-
description: "Moonshot AI Kimi-K2-Instruct model for code generation and general tasks",
|
302 |
-
default_provider: "groq"
|
303 |
-
},
|
304 |
-
{
|
305 |
-
name: "DeepSeek V3",
|
306 |
-
id: "deepseek-ai/DeepSeek-V3-0324",
|
307 |
-
description: "DeepSeek V3 model for code generation"
|
308 |
-
},
|
309 |
-
{
|
310 |
-
name: "DeepSeek R1",
|
311 |
-
id: "deepseek-ai/DeepSeek-R1-0528",
|
312 |
-
description: "DeepSeek R1 model for code generation"
|
313 |
-
},
|
314 |
-
{
|
315 |
-
name: "ERNIE-4.5-VL",
|
316 |
-
id: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
|
317 |
-
description: "ERNIE-4.5-VL model for multimodal code generation with image support"
|
318 |
-
},
|
319 |
-
{
|
320 |
-
name: "MiniMax M1",
|
321 |
-
id: "MiniMaxAI/MiniMax-M1-80k",
|
322 |
-
description: "MiniMax M1 model for code generation and general tasks"
|
323 |
-
},
|
324 |
-
{
|
325 |
-
name: "Qwen3-235B-A22B",
|
326 |
-
id: "Qwen/Qwen3-235B-A22B",
|
327 |
-
description: "Qwen3-235B-A22B model for code generation and general tasks"
|
328 |
-
},
|
329 |
-
{
|
330 |
-
name: "SmolLM3-3B",
|
331 |
-
id: "HuggingFaceTB/SmolLM3-3B",
|
332 |
-
description: "SmolLM3-3B model for code generation and general tasks"
|
333 |
-
},
|
334 |
-
{
|
335 |
-
name: "GLM-4.1V-9B-Thinking",
|
336 |
-
id: "THUDM/GLM-4.1V-9B-Thinking",
|
337 |
-
description: "GLM-4.1V-9B-Thinking model for multimodal code generation with image support"
|
338 |
-
},
|
339 |
-
{
|
340 |
-
name: "OpenAI GPT-4",
|
341 |
-
id: "openai/gpt-4",
|
342 |
-
description: "OpenAI GPT-4 model via HF Inference Providers",
|
343 |
-
default_provider: "openai"
|
344 |
-
},
|
345 |
-
{
|
346 |
-
name: "Gemini Pro",
|
347 |
-
id: "gemini/pro",
|
348 |
-
description: "Google Gemini Pro model via HF Inference Providers",
|
349 |
-
default_provider: "gemini"
|
350 |
-
},
|
351 |
-
{
|
352 |
-
name: "Fireworks AI",
|
353 |
-
id: "fireworks-ai/fireworks-v1",
|
354 |
-
description: "Fireworks AI model via HF Inference Providers",
|
355 |
-
default_provider: "fireworks"
|
356 |
-
}
|
357 |
-
];
|
358 |
-
|
359 |
-
// Populate model dropdown
|
360 |
-
const modelSelect = document.getElementById('model');
|
361 |
-
AVAILABLE_MODELS.forEach(model => {
|
362 |
-
const option = document.createElement('option');
|
363 |
-
option.value = model.id;
|
364 |
-
option.textContent = model.name;
|
365 |
-
option.title = model.description;
|
366 |
-
modelSelect.appendChild(option);
|
367 |
-
});
|
368 |
-
|
369 |
-
// Tab functionality
|
370 |
-
function setupTabs(tabContainerSelector) {
|
371 |
-
const tabContainer = document.querySelector(tabContainerSelector);
|
372 |
-
const tabs = tabContainer.querySelectorAll('[role="tab"]');
|
373 |
-
const panels = tabContainer.parentElement.querySelectorAll('[role="tabpanel"]');
|
374 |
-
|
375 |
-
tabs.forEach(tab => {
|
376 |
-
tab.addEventListener('click', () => {
|
377 |
-
tabs.forEach(t => {
|
378 |
-
t.setAttribute('aria-selected', 'false');
|
379 |
-
t.tabIndex = -1;
|
380 |
-
});
|
381 |
-
tab.setAttribute('aria-selected', 'true');
|
382 |
-
tab.tabIndex = 0;
|
383 |
-
|
384 |
-
panels.forEach(panel => {
|
385 |
-
panel.hidden = true;
|
386 |
-
if (panel.id === tab.getAttribute('aria-controls')) {
|
387 |
-
panel.hidden = false;
|
388 |
-
}
|
389 |
-
});
|
390 |
-
});
|
391 |
-
});
|
392 |
-
}
|
393 |
-
|
394 |
-
setupTabs('.tabs[role="tablist"]');
|
395 |
-
|
396 |
-
// Clear session
|
397 |
-
document.getElementById('clear').addEventListener('click', () => {
|
398 |
-
document.getElementById('prompt').value = '';
|
399 |
-
document.getElementById('reference-file').value = '';
|
400 |
-
document.getElementById('website-url').value = '';
|
401 |
-
document.getElementById('code-output').textContent = '</>';
|
402 |
-
document.getElementById('preview').srcdoc = '';
|
403 |
-
document.getElementById('history-list').innerHTML = '';
|
404 |
-
});
|
405 |
-
|
406 |
-
// Generate code (stub)
|
407 |
-
document.getElementById('generate').addEventListener('click', () => {
|
408 |
-
const prompt = document.getElementById('prompt').value.trim();
|
409 |
-
const language = document.getElementById('language').value;
|
410 |
-
if (!prompt) {
|
411 |
-
alert('Please provide a prompt.');
|
412 |
-
return;
|
413 |
-
}
|
414 |
-
// Simulate generation
|
415 |
-
const code = `// Generated ${language} code\n// Prompt: ${prompt}\n\nconsole.log('Hello, AnyCoder AI!');`;
|
416 |
-
document.getElementById('code-output').textContent = code;
|
417 |
-
document.getElementById('preview').srcdoc = `<pre>${code}</pre>`;
|
418 |
-
const li = document.createElement('li');
|
419 |
-
li.textContent = new Date().toLocaleTimeString() + ' - ' + prompt.substring(0, 30) + '...';
|
420 |
-
document.getElementById('history-list').prepend(li);
|
421 |
-
});
|
422 |
-
</script>
|
423 |
</body>
|
424 |
-
</html>
|
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>AnyCoder AI Code Generator</title>
|
7 |
<meta name="description" content="Generate, modify, and understand code with the most advanced AI models." />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
<!-- external stylesheet -->
|
10 |
+
<link rel="stylesheet" href="style.css" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
</head>
|
12 |
<body>
|
13 |
<header>
|
|
|
49 |
<h2 id="output-config">3. Configure Output</h2>
|
50 |
<label for="language">Target Language</label>
|
51 |
<select id="language">
|
|
|
52 |
<option value="python">Python</option>
|
53 |
+
<option value="c">C</option>
|
54 |
+
<option value="cpp">C++</option>
|
55 |
+
<option value="markdown">Markdown</option>
|
56 |
+
<option value="latex">LaTeX</option>
|
57 |
+
<option value="json">JSON</option>
|
58 |
+
<option value="html">HTML</option>
|
59 |
+
<option value="css">CSS</option>
|
60 |
<option value="javascript">JavaScript</option>
|
61 |
+
<option value="jinja2">Jinja2</option>
|
62 |
+
<option value="typescript">TypeScript</option>
|
63 |
+
<option value="yaml">YAML</option>
|
64 |
+
<option value="dockerfile">Dockerfile</option>
|
65 |
+
<option value="shell">Shell</option>
|
66 |
+
<option value="r">R</option>
|
67 |
+
<option value="sql">SQL (generic)</option>
|
68 |
+
<option value="sql-msSQL">SQL - MS SQL</option>
|
69 |
+
<option value="sql-mySQL">SQL - MySQL</option>
|
70 |
+
<option value="sql-mariaDB">SQL - MariaDB</option>
|
71 |
+
<option value="sql-sqlite">SQL - SQLite</option>
|
72 |
+
<option value="sql-cassandra">SQL - Cassandra</option>
|
73 |
+
<option value="sql-plSQL">SQL - PL/SQL</option>
|
74 |
+
<option value="sql-hive">SQL - Hive</option>
|
75 |
+
<option value="sql-pgSQL">SQL - PostgreSQL</option>
|
76 |
+
<option value="sql-gql">SQL - GraphQL</option>
|
77 |
+
<option value="sql-gpSQL">SQL - Greenplum</option>
|
78 |
+
<option value="sql-sparkSQL">SQL - SparkSQL</option>
|
79 |
+
<option value="sql-esper">SQL - Esper</option>
|
80 |
</select>
|
81 |
<div class="search-toggle">
|
82 |
<input type="checkbox" id="web-search" />
|
|
|
109 |
</section>
|
110 |
</main>
|
111 |
|
112 |
+
<!-- your existing model list and tab-logic unchanged -->
|
113 |
+
<script src="index.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
</body>
|
115 |
+
</html>
|