File size: 3,734 Bytes
0bcbcf1
7c31000
 
 
 
 
 
 
 
 
 
0bcbcf1
7c31000
 
 
 
 
 
 
0bcbcf1
7c31000
 
 
0bcbcf1
7c31000
 
0bcbcf1
7c31000
 
 
 
 
 
 
 
 
 
 
 
 
0bcbcf1
7c31000
 
 
 
0bcbcf1
7c31000
 
 
 
0bcbcf1
7c31000
 
 
0bcbcf1
7c31000
 
 
0bcbcf1
 
 
7c31000
 
0bcbcf1
7c31000
 
 
 
 
 
 
 
 
 
 
 
0bcbcf1
7c31000
 
 
 
 
 
 
 
 
 
 
0bcbcf1
7c31000
 
0bcbcf1
7c31000
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!-- static/index.html (FULL FILE) -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>AnyCoder AI Code Generator</title>
  <meta name="description"
        content="Generate, modify, and understand code with the most advanced AI models." />
  <link rel="stylesheet" href="/static/style.css" />
</head>

<body>
  <header>
    <h1>🚀 AnyCoder AI</h1>
    <p>Your AI partner for generating, modifying, and understanding code.</p>
  </header>

  <main>
    <!-- 1 ▸ Model -->
    <section aria-labelledby="model-selection">
      <h2 id="model-selection">1. Select Model</h2>
      <label for="model" class="visually-hidden">AI Model</label>
      <select id="model" name="model"></select>
    </section>

    <!-- 2 ▸ Context -->
    <section aria-labelledby="context-input">
      <h2 id="context-input">2. Provide Context</h2>

      <div class="tabs" role="tablist">
        <button role="tab" aria-selected="true"
                id="tab-prompt"  aria-controls="panel-prompt">Prompt</button>
        <button role="tab" aria-selected="false"
                id="tab-file"    aria-controls="panel-file">File</button>
        <button role="tab" aria-selected="false"
                id="tab-website" aria-controls="panel-website">Website</button>
      </div>

      <div role="tabpanel" id="panel-prompt">
        <textarea id="prompt" placeholder="Describe what you want to build…" aria-label="Prompt input"></textarea>
      </div>

      <div role="tabpanel" id="panel-file" hidden>
        <label for="reference-file">Reference File</label>
        <input type="file" id="reference-file" accept=".pdf,.docx,.txt"/>
      </div>

      <div role="tabpanel" id="panel-website" hidden>
        <label for="website-url">Website URL</label>
        <input type="url" id="website-url" placeholder="https://example.com"/>
      </div>
    </section>

    <!-- 3 ▸ Output -->
    <section aria-labelledby="output-config">
      <h2 id="output-config">3. Configure Output</h2>
      <label for="language">Target Language</label>
      <select id="language">
        <!-- Full list injected by JS so we remain DRY -->
      </select>

      <div class="search-toggle">
        <input type="checkbox" id="web-search"/>
        <label for="web-search">Enable Web Search</label>
      </div>
    </section>

    <!-- actions -->
    <section class="actions">
      <button id="clear"    type="button">Clear Session</button>
      <button id="generate" type="button">Generate Code</button>
    </section>

    <!-- output -->
    <section aria-labelledby="output-tabs">
      <h2 id="output-tabs" class="visually-hidden">Output</h2>

      <div class="tabs" role="tablist">
        <button role="tab" aria-selected="true"
                id="tab-code"    aria-controls="panel-code">Code</button>
        <button role="tab" aria-selected="false"
                id="tab-preview" aria-controls="panel-preview">Live Preview</button>
        <button role="tab" aria-selected="false"
                id="tab-history" aria-controls="panel-history">History</button>
      </div>

      <div role="tabpanel" id="panel-code">
        <pre><code id="code-output" class="language-none"></code></pre>
      </div>
      <div role="tabpanel" id="panel-preview" hidden>
        <iframe id="preview" title="Live preview"
                sandbox="allow-scripts allow-same-origin"></iframe>
      </div>
      <div role="tabpanel" id="panel-history" hidden>
        <ul id="history-list" aria-live="polite"></ul>
      </div>
    </section>
  </main>

  <script type="module" src="/static/index.js"></script>
</body>
</html>