File size: 2,872 Bytes
3b6ceae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>MiniCPM5 Pi Web Agent</title>
    <script type="module" crossorigin src="/assets/index-BCicI0Zo.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index-CRS_ZGq-.css">
  </head>
  <body>
    <main id="app">
      <section class="shell">
        <header class="topbar">
          <div>
            <h1>Pi Web Agent</h1>
            <p id="model-label"></p>
          </div>
          <div class="status-stack" aria-label="Runtime status">
            <span class="status" id="status">Idle</span>
            <span class="status" id="model-status">Model idle</span>
            <span class="status" id="sandbox-status">Sandbox idle</span>
          </div>
        </header>

        <section class="controls" aria-label="Agent controls">
          <label>
            Model
            <select id="mode">
              <option value="local">MiniCPM5 q4</option>
              <option value="mock">Deterministic test</option>
            </select>
          </label>
          <label>
            Device
            <select id="device">
              <option value="webgpu">WebGPU</option>
              <option value="wasm">WASM</option>
            </select>
          </label>
          <label>
            Max tokens
            <input id="max-new-tokens" type="number" min="16" max="512" step="1" value="160" />
          </label>
          <label>
            Temperature
            <input id="temperature" type="number" min="0" max="1.5" step="0.05" value="0" />
          </label>
        </section>

        <section class="command-row" aria-label="Sandbox actions">
          <button id="boot-sandbox" type="button">Boot Sandbox</button>
          <button id="reset-sandbox" type="button">Reset</button>
          <button id="demo-prompt" type="button">Demo Prompt</button>
        </section>

        <section class="workspace">
          <div class="prompt-pane">
            <label class="prompt-label" for="prompt">Task</label>
            <textarea id="prompt" spellcheck="true">Create hello.js that prints the result of 21 * 2, run it with Node, and tell me the command output.</textarea>
            <button id="run" type="button">Run Agent</button>
          </div>

          <div class="panes">
            <section class="pane">
              <h2>Transcript</h2>
              <pre id="transcript"></pre>
            </section>
            <section class="pane">
              <h2>Sandbox Files</h2>
              <pre id="files"></pre>
            </section>
            <section class="pane wide">
              <h2>Events</h2>
              <pre id="event-log"></pre>
            </section>
          </div>
        </section>
      </section>
    </main>
  </body>
</html>