-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
294 lines (289 loc) · 19.3 KB
/
Copy pathindex.html
File metadata and controls
294 lines (289 loc) · 19.3 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!doctype html>
<html lang="en" data-loading-animation="fireworks">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content" />
<title>pi web</title>
<meta name="theme-color" content="#1a1a1a" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="pi" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
</head>
<body>
<div id="tokenOverlay" class="tokenOverlay" hidden>
<form id="tokenForm" class="tokenForm">
<label for="tokenInput">Enter PI_WEB_TOKEN to continue</label>
<p class="tokenHint">Paste a token, open a token link, or scan a token QR code.</p>
<input id="tokenInput" type="password" placeholder="Token" autocomplete="current-password" />
<div class="tokenActions">
<button type="submit" class="primaryAction">Connect</button>
<button id="tokenScanButton" type="button">Scan QR</button>
</div>
<div id="tokenScanPanel" class="tokenScanPanel" hidden>
<video id="tokenScanVideo" autoplay playsinline muted></video>
<span id="tokenScanStatus" class="tokenScanStatus" aria-live="polite"></span>
<button id="tokenScanStopButton" type="button">Stop camera</button>
</div>
</form>
</div>
<div id="tokenShareFullscreen" class="tokenShareFullscreen" role="dialog" aria-modal="true" aria-label="Token QR code" hidden>
<button id="tokenShareFullscreenCloseButton" class="tokenShareFullscreenClose" type="button" aria-label="Close full-screen QR">×</button>
<div class="tokenShareFullscreenContent">
<h2>Scan to connect to pi web</h2>
<div id="tokenShareFullscreenQr" class="tokenShareFullscreenQr"></div>
<p>Only share this QR code with trusted devices.</p>
</div>
</div>
<main class="app">
<div id="statusBar" class="statusBar">
<button id="sessionButton" class="iconButton statusBarButton" type="button" aria-label="Sessions" title="Sessions">
<span data-icon="menu"></span>
</button>
<span id="statusTitle" class="statusTitle"></span>
<span id="statusPath" class="statusPath"></span>
<span id="activityStatus" class="activityStatus" hidden></span>
<span id="connectionStatus" class="connectionStatus" aria-live="polite" hidden></span>
<span id="headerActions" class="headerActions"></span>
<button id="newSessionHeaderButton" class="iconButton statusBarButton" type="button" aria-label="New session" title="New session">
<span data-icon="square-pen"></span>
</button>
<button id="conversationTreeButton" class="iconButton statusBarButton" type="button" aria-label="Conversation tree" title="Conversation tree">
<span data-icon="git-fork"></span>
</button>
<button id="gitButton" class="iconButton statusBarButton" type="button" aria-label="Git" title="Git">
<span data-icon="git-branch"></span>
</button>
<button id="currentSessionBucketButton" class="iconButton statusBarButton sessionBucketButton" type="button" aria-label="Set session bucket" title="Set session bucket" aria-haspopup="menu">
<span data-icon="flag"></span>
</button>
<button id="settingsButton" class="iconButton statusBarButton" type="button" aria-label="Settings" title="Settings">
<span data-icon="settings"></span>
</button>
</div>
<aside id="gitPanel" class="gitPanel" aria-label="Git" hidden>
<div class="gitPanelHeader">
<h2>Git</h2>
<div class="gitTabs" role="tablist" aria-label="Git views">
<button id="gitStatusTab" type="button" class="gitTab active">Status</button>
<button id="gitGraphTab" type="button" class="gitTab">Graph</button>
</div>
<button id="gitCloseButton" class="iconButton" type="button" aria-label="Close Git" title="Close Git">×</button>
</div>
<div class="gitPanelBody">
<div id="gitPrimaryPane" class="gitPrimaryPane"></div>
<div id="gitDetailPane" class="gitDetailPane"></div>
</div>
</aside>
<section id="messages" class="messages" aria-live="polite"></section>
<div id="emptyCwdChooser" class="emptyCwdChooser" hidden>
<video class="newChatLoadingAnimation" muted playsinline preload="auto" aria-hidden="true">
<source src="/new-chat-loading.mp4" type="video/mp4">
</video>
<div class="emptyCwdInner">
<span class="emptyCwdLabel">Working directory</span>
<div class="emptyWorkspaceControls">
<button type="button" class="emptyCwdButton" aria-label="Change working directory" title="Change working directory">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M3 6h6l2 2h10v10H3z"></path></svg>
<span class="emptyCwdPath"></span>
<span class="emptyControlChevron" aria-hidden="true">⌄</span>
</button>
</div>
</div>
</div>
<div id="sessionBackdrop" class="sessionBackdrop" hidden></div>
<aside id="sessionDrawer" class="sessionDrawer" aria-label="Sessions" hidden>
<div class="sessionDrawerHeader">
<h2>Sessions</h2>
<button id="sessionCloseButton" class="iconButton" type="button" aria-label="Close sessions" title="Close sessions">×</button>
</div>
<div id="sessionList" class="sessionList" aria-live="polite"></div>
<button id="sessionNewButton" class="sessionNewButton" type="button">+ New session</button>
</aside>
<div id="settingsBackdrop" class="settingsBackdrop" hidden></div>
<aside id="settingsPanel" class="settingsPanel" aria-label="Settings" hidden>
<div class="settingsHeader">
<h2>Settings</h2>
<button id="settingsCloseButton" class="iconButton" type="button" aria-label="Close settings" title="Close settings">×</button>
</div>
<section class="settingsSection">
<h3>Appearance</h3>
<label class="settingsField">
<span>Density</span>
<select id="settingDensitySelect">
<option value="comfortable">Comfortable</option>
<option value="compact">Compact</option>
</select>
</label>
<label class="settingsField">
<span>Loading animation</span>
<select id="settingLoadingAnimationSelect">
<option value="fireworks">Micro fireworks</option>
<option value="glow">Ember glow</option>
<option value="pulse">Pulse</option>
</select>
</label>
<div class="settingsField settingsAccentField">
<span>Accent color</span>
<div class="settingsAccentPicker">
<button id="settingAccentMenuButton" class="settingsAccentMenuButton" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="settingAccentPopover">
<span class="settingsAccentCurrentSwatch" aria-hidden="true"></span>
<span id="settingAccentMenuName">Antique Gold</span>
<span id="settingAccentMenuValue" class="settingsAccentMenuValue">#e2b15f</span>
<span class="settingsAccentMenuChevron" aria-hidden="true">▾</span>
</button>
<div id="settingAccentPopover" class="settingsAccentPopover" role="dialog" aria-label="Accent color picker" hidden>
<div class="settingsAccentPopoverHeader">
<span>Signature accents</span>
<span>Save to confirm</span>
</div>
<div class="settingsAccentSwatches" role="radiogroup" aria-label="Accent color presets">
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#e2b15f" data-accent-name="Antique Gold" style="--swatch-color: #e2b15f" aria-label="Antique Gold accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Antique Gold</span><span class="settingsAccentSwatchHex">#e2b15f</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#7dd3fc" data-accent-name="Nocturne Sky" style="--swatch-color: #7dd3fc" aria-label="Nocturne Sky accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Nocturne Sky</span><span class="settingsAccentSwatchHex">#7dd3fc</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#9db4ff" data-accent-name="Moonlit Lapis" style="--swatch-color: #9db4ff" aria-label="Moonlit Lapis accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Moonlit Lapis</span><span class="settingsAccentSwatchHex">#9db4ff</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#b69cff" data-accent-name="Imperial Iris" style="--swatch-color: #b69cff" aria-label="Imperial Iris accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Imperial Iris</span><span class="settingsAccentSwatchHex">#b69cff</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#d98adf" data-accent-name="Velvet Orchid" style="--swatch-color: #d98adf" aria-label="Velvet Orchid accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Velvet Orchid</span><span class="settingsAccentSwatchHex">#d98adf</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#f09bb3" data-accent-name="Rose Quartz" style="--swatch-color: #f09bb3" aria-label="Rose Quartz accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Rose Quartz</span><span class="settingsAccentSwatchHex">#f09bb3</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#b8b5ad" data-accent-name="Palladium" style="--swatch-color: #b8b5ad" aria-label="Palladium accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Palladium</span><span class="settingsAccentSwatchHex">#b8b5ad</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#5fd0c4" data-accent-name="Verdigris" style="--swatch-color: #5fd0c4" aria-label="Verdigris accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Verdigris</span><span class="settingsAccentSwatchHex">#5fd0c4</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#7bcf9e" data-accent-name="Jadeite" style="--swatch-color: #7bcf9e" aria-label="Jadeite accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Jadeite</span><span class="settingsAccentSwatchHex">#7bcf9e</span></span>
</button>
<button class="settingsAccentSwatch" type="button" role="radio" data-accent-color="#94a3b8" data-accent-name="Slate Smoke" style="--swatch-color: #94a3b8" aria-label="Slate Smoke accent">
<span class="settingsAccentSwatchPreview" aria-hidden="true"></span>
<span class="settingsAccentSwatchCopy"><span class="settingsAccentSwatchLabel">Slate Smoke</span><span class="settingsAccentSwatchHex">#94a3b8</span></span>
</button>
</div>
<div class="settingsAccentCustom">
<input id="settingAccentColorInput" type="text" value="#e2b15f" maxlength="7" spellcheck="false" aria-label="Custom accent hex color" />
<button id="settingAccentPreviewButton" type="button">Preview</button>
</div>
<div class="settingsAccentActions">
<button id="settingAccentCancelButton" type="button">Cancel</button>
<button id="settingAccentApplyButton" type="button">Save accent</button>
</div>
</div>
</div>
</div>
</section>
<section class="settingsSection">
<h3>Composer</h3>
<label class="settingsField">
<span>Default queue mode</span>
<select id="settingQueueModeSelect">
<option value="steer">Steer while running</option>
<option value="followUp">Follow up after running</option>
</select>
</label>
<label class="settingsCheckbox">
<input id="settingComposerExpandedCheckbox" type="checkbox" />
<span>Keep composer expanded</span>
</label>
</section>
<section class="settingsSection">
<h3>New sessions</h3>
<label class="settingsField">
<span>Default bucket</span>
<select id="settingDefaultBucketColorSelect" aria-label="Default session bucket color"></select>
</label>
<p class="settingsHint">Choose a bucket color and saved model defaults for sessions you start from now on. Existing sessions are unchanged.</p>
<div class="settingsValue" id="settingModelDefaultsValue">No default model saved</div>
<div class="settingsActions">
<button id="settingSaveModelDefaultsButton" type="button">Use current model</button>
<button id="settingClearModelDefaultsButton" type="button">Clear model</button>
</div>
</section>
<section id="tokenShareSection" class="settingsSection tokenShareSection" hidden>
<h3>Token sharing</h3>
<p class="settingsHint">Use Show QR or Copy link to open pi web on another trusted device with this browser’s saved token.</p>
<div id="tokenShareQr" class="tokenShareQr" aria-live="polite"></div>
<input id="tokenShareUrl" class="tokenShareUrl" type="text" readonly aria-label="Token share link" />
<div class="settingsActions">
<button id="tokenShareFullscreenButton" type="button">Show QR</button>
<button id="tokenShareCopyButton" type="button">Copy link</button>
</div>
</section>
<span id="settingsStatus" class="settingsStatus" aria-live="polite"></span>
</aside>
<form id="promptForm" class="composer">
<button id="contextMeter" class="contextMeter unknown" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="contextMeterPopover" title="Context usage unavailable">
<span class="contextMeterTrack" aria-hidden="true"><span id="contextMeterFill" class="contextMeterFill"></span></span>
<span id="runtimeStatus" class="runtimeStatus" hidden></span>
<span id="contextMeterLabel" class="contextMeterLabel">ctx —</span>
</button>
<div id="contextMeterPopover" class="contextMeterPopover" role="dialog" aria-label="Context usage" hidden></div>
<textarea id="prompt" rows="2" placeholder="Ask pi…" aria-controls="slashCommands" aria-expanded="false"></textarea>
<div id="slashCommands" class="slashCommandsPopover" role="listbox" aria-label="Slash commands" hidden></div>
<button id="expandButton" class="iconButton expandButton" type="button" aria-label="Expand editor" title="Expand editor">
<span data-icon="maximize-2"></span>
</button>
<div id="attachments" class="attachments" aria-live="polite"></div>
<input id="imageInput" type="file" accept="image/png,image/jpeg,image/gif,image/webp" multiple hidden />
<div class="composerFooter">
<div id="modelControl" class="modelControl">
<button id="modelSettingsButton" class="modelSettingsButton" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="modelSettingsPopover" title="Model and reasoning settings">
<span id="modelSettingsLabel" class="modelSettingsLabel">Loading models…</span>
<span id="modelSettingsThinking" class="modelSettingsThinking">off</span>
</button>
<div id="modelSettingsPopover" class="modelSettingsPopover" role="dialog" aria-label="Model and reasoning settings" hidden>
<label class="modelSettingsField">
<span>Model</span>
<select id="modelSelect" title="Select model" aria-label="Select model">
<option value="">Loading models…</option>
</select>
</label>
<label class="modelSettingsField">
<span>Reasoning</span>
<select id="thinkingSelect" title="Select reasoning level" aria-label="Select reasoning level">
<option value="off">off</option>
</select>
</label>
<p class="modelSettingsHint">Choose <strong>off</strong> to disable reasoning when the model supports it.</p>
</div>
</div>
<button id="queueToggle" class="iconButton" type="button" aria-pressed="true" aria-label="Queue mode: steer" title="Queue mode: steer">
<span data-icon="route"></span>
</button>
<button id="attachButton" class="iconButton" type="button" aria-label="Attach images" title="Attach images">
<span data-icon="paperclip"></span>
</button>
<button id="stopButton" class="iconButton dangerAction" type="button" aria-label="Stop streaming" title="Stop streaming" style="display:none">
<span data-icon="square"></span>
</button>
<button id="primaryButton" class="iconButton primaryAction" type="submit" aria-label="Send" title="Send">
<span data-icon="send-horizontal"></span>
</button>
</div>
</form>
<div id="extensionFooter" class="extensionFooter" aria-live="polite" hidden></div>
<div id="sessionBar" class="sessionBar" hidden></div>
</main>
<script type="module" src="/src/main.ts"></script>
</body>
</html>