pi-tinychat 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +139 -139
- package/bin/pi-tinychat.js +111 -111
- package/extension/plan.ts +281 -240
- package/package.json +68 -68
- package/public/app.js +3749 -3614
- package/public/favicon.svg +15 -15
- package/public/i18n.js +197 -169
- package/public/index.html +226 -226
- package/public/markdown.js +244 -244
- package/public/style.css +2814 -2762
- package/public/theme-init.js +18 -18
- package/src/compaction.js +139 -139
- package/src/errors.js +13 -13
- package/src/live.js +133 -133
- package/src/pi-path.js +70 -70
- package/src/pi-types.d.ts +85 -85
- package/src/pi.js +196 -196
- package/src/plan.js +91 -90
- package/src/server.js +910 -910
- package/src/sessions.js +256 -256
package/public/index.html
CHANGED
|
@@ -1,226 +1,226 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="color-scheme" content="light dark" />
|
|
7
|
-
<title>Pi TinyChat</title>
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
9
|
-
<script src="/theme-init.js"></script>
|
|
10
|
-
<link rel="stylesheet" href="/style.css" />
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<svg class="sprite" aria-hidden="true" focusable="false">
|
|
14
|
-
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" /></symbol>
|
|
15
|
-
<symbol id="i-history" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 3-6.7M3 4v5h5" /><path d="M12 8v4l2.5 2" /></symbol>
|
|
16
|
-
<symbol id="i-settings" viewBox="0 0 24 24"><path d="M4 7h10M18 7h2M4 17h2M10 17h10" /><circle cx="16" cy="7" r="2" /><circle cx="8" cy="17" r="2" /></symbol>
|
|
17
|
-
<symbol id="i-send" viewBox="0 0 24 24"><path d="M12 19V5M6 11l6-6 6 6" /></symbol>
|
|
18
|
-
<symbol id="i-stop" viewBox="0 0 24 24"><rect x="6.5" y="6.5" width="11" height="11" rx="2.2" fill="currentColor" stroke="none" /></symbol>
|
|
19
|
-
<symbol id="i-chevron" viewBox="0 0 24 24"><path d="m8 10 4 4 4-4" /></symbol>
|
|
20
|
-
<symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 4.5c.6 3.6 2.4 5.4 6 6-3.6.6-5.4 2.4-6 6-.6-3.6-2.4-5.4-6-6 3.6-.6 5.4-2.4 6-6Z" /><path d="M18.5 16.5c.25 1.5 1 2.25 2.5 2.5-1.5.25-2.25 1-2.5 2.5-.25-1.5-1-2.25-2.5-2.5 1.5-.25 2.25-1 2.5-2.5Z" /></symbol>
|
|
21
|
-
<symbol id="i-tool" viewBox="0 0 24 24"><path d="m5 8 4 4-4 4M12 17h7" /></symbol>
|
|
22
|
-
<symbol id="i-read" viewBox="0 0 24 24"><path d="M4 5.5A2.5 2.5 0 0 1 6.5 3H11v16H6.5A2.5 2.5 0 0 0 4 21.5Z" /><path d="M20 5.5A2.5 2.5 0 0 0 17.5 3H13v16h4.5a2.5 2.5 0 0 1 2.5 2.5Z" /></symbol>
|
|
23
|
-
<symbol id="i-edit" viewBox="0 0 24 24"><path d="M4 20h4L20 8l-4-4L4 16v4Z" /><path d="m14 6 4 4" /></symbol>
|
|
24
|
-
<symbol id="i-write" viewBox="0 0 24 24"><path d="M6 3h7l5 5v13H6z" /><path d="M13 3v5h5M12 12v5M9.5 14.5h5" /></symbol>
|
|
25
|
-
<symbol id="i-command" viewBox="0 0 24 24"><path d="m5 7 4 5-4 5M12 17h7" /></symbol>
|
|
26
|
-
<symbol id="i-list" viewBox="0 0 24 24"><path d="M9 6h11M9 12h11M9 18h11" /><path d="M4.5 6h.01M4.5 12h.01M4.5 18h.01" /></symbol>
|
|
27
|
-
<symbol id="i-globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" /><path d="M4 12h16M12 4c2.5 2.4 2.5 13.6 0 16-2.5-2.4-2.5-13.6 0-16Z" /></symbol>
|
|
28
|
-
<symbol id="i-agent" viewBox="0 0 24 24"><circle cx="12" cy="8" r="3" /><path d="M5.5 20a6.5 6.5 0 0 1 13 0" /></symbol>
|
|
29
|
-
<symbol id="i-copy" viewBox="0 0 24 24"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V6a2 2 0 0 1 2-2h9" /></symbol>
|
|
30
|
-
<symbol id="i-check" viewBox="0 0 24 24"><path d="m5 13 4 4L19 7" /></symbol>
|
|
31
|
-
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18" /></symbol>
|
|
32
|
-
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6" /><path d="m16 16 4 4" /></symbol>
|
|
33
|
-
<symbol id="i-model" viewBox="0 0 24 24"><rect x="7" y="7" width="10" height="10" rx="2.5" /><path d="M10 3v4M14 3v4M10 17v4M14 17v4M3 10h4M3 14h4M17 10h4M17 14h4" /></symbol>
|
|
34
|
-
<symbol id="i-prompt" viewBox="0 0 24 24"><path d="M7 4h7l4 4v12H7z" /><path d="M14 4v4h4M10 12h5M10 16h5" /></symbol>
|
|
35
|
-
<symbol id="i-extension" viewBox="0 0 24 24"><path d="M9 4h6v3a2 2 0 1 0 4 0V4h1v6h-3a2 2 0 1 0 0 4h3v6h-6v-3a2 2 0 1 0-4 0v3H4v-6h3a2 2 0 1 0 0-4H4V4h5Z" /></symbol>
|
|
36
|
-
<symbol id="i-down" viewBox="0 0 24 24"><path d="M12 5v14M6 13l6 6 6-6" /></symbol>
|
|
37
|
-
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 4 3 20h18L12 4Z" /><path d="M12 10v4M12 17h.01" /></symbol>
|
|
38
|
-
<symbol id="i-tinychat" viewBox="0 0 24 24">
|
|
39
|
-
<path
|
|
40
|
-
d="M6.5 3.2H17.5Q21 3.2 21 6.7V15.3Q21 18.8 17.5 18.8H10L5.2 21V18Q3 17.2 3 14.8V6.7Q3 3.2 6.5 3.2Z"
|
|
41
|
-
fill="var(--accent)"
|
|
42
|
-
stroke="none"
|
|
43
|
-
/>
|
|
44
|
-
<path
|
|
45
|
-
d="M8 9L11 12L8 15M13 15H16.5"
|
|
46
|
-
fill="none"
|
|
47
|
-
stroke="var(--accent-ink)"
|
|
48
|
-
stroke-width="2"
|
|
49
|
-
stroke-linecap="round"
|
|
50
|
-
stroke-linejoin="round"
|
|
51
|
-
/>
|
|
52
|
-
</symbol>
|
|
53
|
-
<symbol id="i-folder" viewBox="0 0 24 24"><path d="M3.5 7.5a2 2 0 0 1 2-2H10l2 2.5h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2Z" /></symbol>
|
|
54
|
-
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" /><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" /></symbol>
|
|
55
|
-
<symbol id="i-moon" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5Z" /></symbol>
|
|
56
|
-
<symbol id="i-monitor" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="12" rx="2" /><path d="M8 21h8M12 17v4" /></symbol>
|
|
57
|
-
<symbol id="i-arrow-in" viewBox="0 0 24 24"><path d="M14 5h5v14h-5M4 12h11M11 8l4 4-4 4" /></symbol>
|
|
58
|
-
<symbol id="i-image" viewBox="0 0 24 24"><rect x="3" y="4.5" width="18" height="15" rx="2.5" /><circle cx="8.5" cy="9.5" r="1.4" /><path d="m4 17 5-5 3.5 3.5 2.5-2.5 5 5" /></symbol>
|
|
59
|
-
<symbol id="i-plan" viewBox="0 0 24 24"><path d="M5 6h14M5 12h14M5 18h9" /><path d="m17.5 16.5 1.5 1.5 3-3" /></symbol>
|
|
60
|
-
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M9 7V5h6v2M7 7l1 13h8l1-13M10 11v5M14 11v5" /></symbol>
|
|
61
|
-
</svg>
|
|
62
|
-
|
|
63
|
-
<div class="app">
|
|
64
|
-
<header class="topbar">
|
|
65
|
-
<div class="brand" title="Pi TinyChat">
|
|
66
|
-
<svg class="mark" aria-hidden="true"><use href="#i-tinychat" /></svg>
|
|
67
|
-
<span class="app-name">Pi TinyChat</span>
|
|
68
|
-
<span class="session" id="sessionName"></span>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="top-actions">
|
|
71
|
-
<span class="project" id="projectName" hidden>
|
|
72
|
-
<svg class="icon" aria-hidden="true"><use href="#i-folder" /></svg>
|
|
73
|
-
<span id="projectLabel"></span>
|
|
74
|
-
</span>
|
|
75
|
-
<div class="model-group" id="modelGroup" role="group" aria-label="Model and reasoning effort">
|
|
76
|
-
<button class="chip" id="modelButton" type="button" title="Model" aria-haspopup="menu" aria-controls="modelMenu" aria-expanded="false">
|
|
77
|
-
<svg class="icon" aria-hidden="true"><use href="#i-model" /></svg>
|
|
78
|
-
<span id="modelLabel">—</span>
|
|
79
|
-
<svg class="icon chev" aria-hidden="true"><use href="#i-chevron" /></svg>
|
|
80
|
-
</button>
|
|
81
|
-
<button class="chip" id="thinkingButton" type="button" title="Reasoning effort" aria-haspopup="menu" aria-controls="thinkingMenu" aria-expanded="false">
|
|
82
|
-
<svg class="icon" aria-hidden="true"><use href="#i-spark" /></svg>
|
|
83
|
-
<span id="thinkingLabel">off</span>
|
|
84
|
-
<svg class="icon chev" aria-hidden="true"><use href="#i-chevron" /></svg>
|
|
85
|
-
</button>
|
|
86
|
-
</div>
|
|
87
|
-
<button class="ring-button" id="contextButton" type="button" title="Context" aria-haspopup="menu" aria-controls="contextMenu" aria-expanded="false">
|
|
88
|
-
<svg class="ring" viewBox="0 0 20 20" aria-hidden="true">
|
|
89
|
-
<circle class="ring-bg" cx="10" cy="10" r="7.5" />
|
|
90
|
-
<circle class="ring-limit" id="ringLimit" cx="10" cy="10" r="7.5" />
|
|
91
|
-
<circle class="ring-fg" id="ringFg" cx="10" cy="10" r="7.5" />
|
|
92
|
-
</svg>
|
|
93
|
-
</button>
|
|
94
|
-
<button class="icon-btn plan-toggle" id="planToggle" type="button" title="Plan panel" aria-label="Plan panel" aria-expanded="true" aria-pressed="true">
|
|
95
|
-
<svg class="icon"><use href="#i-plan" /></svg>
|
|
96
|
-
</button>
|
|
97
|
-
<span class="top-sep" aria-hidden="true"></span>
|
|
98
|
-
<button class="icon-btn" id="historyButton" type="button" title="History" aria-label="History">
|
|
99
|
-
<svg class="icon"><use href="#i-history" /></svg>
|
|
100
|
-
</button>
|
|
101
|
-
<button class="icon-btn" id="settingsButton" type="button" title="Settings" aria-label="Settings" aria-haspopup="menu" aria-controls="settingsMenu" aria-expanded="false">
|
|
102
|
-
<svg class="icon"><use href="#i-settings" /></svg>
|
|
103
|
-
</button>
|
|
104
|
-
</div>
|
|
105
|
-
</header>
|
|
106
|
-
|
|
107
|
-
<div class="banner" id="banner" role="alert" hidden>
|
|
108
|
-
<svg class="icon" aria-hidden="true"><use href="#i-alert" /></svg>
|
|
109
|
-
<span id="bannerText"></span>
|
|
110
|
-
<button class="text-btn" id="bannerAction" type="button" hidden></button>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div class="workspace">
|
|
114
|
-
<section class="chat" aria-label="Chat">
|
|
115
|
-
<main class="scroller" id="scroller">
|
|
116
|
-
<div class="messages" id="messages">
|
|
117
|
-
<div class="message-list" id="messageList" aria-live="polite" aria-relevant="additions text"></div>
|
|
118
|
-
<div id="liveMount"></div>
|
|
119
|
-
<div class="run-status" id="runStatus" role="status" hidden></div>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="empty" id="empty">
|
|
122
|
-
<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-tinychat" /></svg>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="scroll-tail" aria-hidden="true"></div>
|
|
125
|
-
</main>
|
|
126
|
-
|
|
127
|
-
<button class="jump-button" id="jumpButton" type="button" aria-label="Jump to latest" hidden>
|
|
128
|
-
<svg class="icon"><use href="#i-down" /></svg>
|
|
129
|
-
</button>
|
|
130
|
-
|
|
131
|
-
<footer class="composer-area">
|
|
132
|
-
<div class="composer-wrap">
|
|
133
|
-
<div class="widgets" id="widgets" hidden></div>
|
|
134
|
-
<div class="composer" id="composer">
|
|
135
|
-
<label class="sr-only" for="input">Message</label>
|
|
136
|
-
<textarea id="input" rows="1" placeholder="Message" autocomplete="off" spellcheck="false"></textarea>
|
|
137
|
-
<div class="attachments" id="attachments" hidden></div>
|
|
138
|
-
<div class="composer-bar">
|
|
139
|
-
<div class="composer-left">
|
|
140
|
-
<div class="composer-tools">
|
|
141
|
-
<button class="composer-tool" id="commandButton" type="button" title="Commands" aria-label="Commands" aria-haspopup="dialog" aria-controls="commandMenu" aria-expanded="false">
|
|
142
|
-
<svg class="icon"><use href="#i-plus" /></svg>
|
|
143
|
-
</button>
|
|
144
|
-
<button class="composer-tool" id="imageButton" type="button" title="Attach image" aria-label="Attach image">
|
|
145
|
-
<svg class="icon"><use href="#i-image" /></svg>
|
|
146
|
-
</button>
|
|
147
|
-
<input id="imageInput" type="file" accept="image/*" multiple hidden />
|
|
148
|
-
</div>
|
|
149
|
-
<div class="composer-statuses" id="composerLeft"></div>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="composer-right">
|
|
152
|
-
<div class="send-mode" id="sendMode" role="group" aria-label="Send mode" hidden>
|
|
153
|
-
<button type="button" data-send-mode="steer" aria-pressed="true" title="Interrupt the running turn">Steer</button>
|
|
154
|
-
<button type="button" data-send-mode="followUp" aria-pressed="false" title="Send after the run finishes">Follow-up</button>
|
|
155
|
-
</div>
|
|
156
|
-
<span class="queue-badge" id="queueBadge" hidden></span>
|
|
157
|
-
<button class="send-button" id="sendButton" type="button" title="Send (Ctrl+Enter)" aria-label="Send (Ctrl+Enter)" disabled>
|
|
158
|
-
<svg class="icon"><use href="#i-send" /></svg>
|
|
159
|
-
</button>
|
|
160
|
-
<button class="stop-button" id="stopButton" type="button" title="Stop (Esc)" aria-label="Stop (Esc)" hidden>
|
|
161
|
-
<svg class="icon"><use href="#i-stop" /></svg>
|
|
162
|
-
</button>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
<div class="popover command-menu" id="commandMenu" hidden></div>
|
|
167
|
-
<div class="popover slash-menu" id="slashMenu" hidden></div>
|
|
168
|
-
</div>
|
|
169
|
-
</footer>
|
|
170
|
-
</section>
|
|
171
|
-
|
|
172
|
-
<div class="plan-resizer" id="planResizer" role="separator" tabindex="0" aria-orientation="vertical" aria-label="Plan panel width" aria-valuemin="220" aria-valuemax="640" aria-valuenow="284"></div>
|
|
173
|
-
|
|
174
|
-
<aside class="plan-panel" id="planPanel" aria-label="Plan">
|
|
175
|
-
<div class="plan-head">
|
|
176
|
-
<svg class="icon" aria-hidden="true"><use href="#i-plan" /></svg>
|
|
177
|
-
<span class="plan-title" id="planTitle">Plan</span>
|
|
178
|
-
<button class="ghost-icon plan-close" id="planClose" type="button" aria-label="Close">
|
|
179
|
-
<svg class="icon"><use href="#i-x" /></svg>
|
|
180
|
-
</button>
|
|
181
|
-
</div>
|
|
182
|
-
<ol class="plan-items" id="planItems" data-testid="plan-list"></ol>
|
|
183
|
-
<div class="plan-empty" id="planEmpty" aria-hidden="true">
|
|
184
|
-
<span></span><span></span><span></span>
|
|
185
|
-
</div>
|
|
186
|
-
</aside>
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div class="popover menu" id="modelMenu" hidden></div>
|
|
190
|
-
<div class="popover menu" id="thinkingMenu" hidden></div>
|
|
191
|
-
<div class="popover menu" id="settingsMenu" hidden></div>
|
|
192
|
-
<div class="popover menu" id="contextMenu" hidden></div>
|
|
193
|
-
|
|
194
|
-
<div class="drawer-backdrop" id="drawerBackdrop" hidden></div>
|
|
195
|
-
<div class="drawer-backdrop" id="planBackdrop" hidden></div>
|
|
196
|
-
<aside class="drawer" id="historyPanel" aria-label="History" hidden>
|
|
197
|
-
<div class="drawer-head">
|
|
198
|
-
<svg class="icon" aria-hidden="true"><use href="#i-history" /></svg>
|
|
199
|
-
<span class="drawer-grow" aria-hidden="true"></span>
|
|
200
|
-
<button class="select-toggle" id="historySelect" type="button" aria-pressed="false">Select</button>
|
|
201
|
-
<button class="ghost-icon" id="newChatButton" type="button" title="New chat" aria-label="New chat">
|
|
202
|
-
<svg class="icon"><use href="#i-plus" /></svg>
|
|
203
|
-
</button>
|
|
204
|
-
<button class="ghost-icon" id="historyClose" type="button" aria-label="Close">
|
|
205
|
-
<svg class="icon"><use href="#i-x" /></svg>
|
|
206
|
-
</button>
|
|
207
|
-
</div>
|
|
208
|
-
<div class="selection-bar" id="historyActions" hidden>
|
|
209
|
-
<button class="text-btn" id="historySelectAll" type="button">Select all</button>
|
|
210
|
-
<span class="selection-count" id="historyCount"></span>
|
|
211
|
-
<button class="danger-btn" id="historyDelete" type="button" disabled>Delete</button>
|
|
212
|
-
<button class="text-btn" id="historyCancel" type="button">Cancel</button>
|
|
213
|
-
</div>
|
|
214
|
-
<div class="session-list" id="sessionList"></div>
|
|
215
|
-
</aside>
|
|
216
|
-
|
|
217
|
-
<div class="dialog-layer" id="dialogLayer" hidden>
|
|
218
|
-
<div class="dialog" id="dialog" role="dialog" aria-modal="true"></div>
|
|
219
|
-
</div>
|
|
220
|
-
|
|
221
|
-
<div class="toasts" id="toasts" aria-live="polite"></div>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
<script type="module" src="/app.js"></script>
|
|
225
|
-
</body>
|
|
226
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="color-scheme" content="light dark" />
|
|
7
|
+
<title>Pi TinyChat</title>
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
9
|
+
<script src="/theme-init.js"></script>
|
|
10
|
+
<link rel="stylesheet" href="/style.css" />
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<svg class="sprite" aria-hidden="true" focusable="false">
|
|
14
|
+
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" /></symbol>
|
|
15
|
+
<symbol id="i-history" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 3-6.7M3 4v5h5" /><path d="M12 8v4l2.5 2" /></symbol>
|
|
16
|
+
<symbol id="i-settings" viewBox="0 0 24 24"><path d="M4 7h10M18 7h2M4 17h2M10 17h10" /><circle cx="16" cy="7" r="2" /><circle cx="8" cy="17" r="2" /></symbol>
|
|
17
|
+
<symbol id="i-send" viewBox="0 0 24 24"><path d="M12 19V5M6 11l6-6 6 6" /></symbol>
|
|
18
|
+
<symbol id="i-stop" viewBox="0 0 24 24"><rect x="6.5" y="6.5" width="11" height="11" rx="2.2" fill="currentColor" stroke="none" /></symbol>
|
|
19
|
+
<symbol id="i-chevron" viewBox="0 0 24 24"><path d="m8 10 4 4 4-4" /></symbol>
|
|
20
|
+
<symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 4.5c.6 3.6 2.4 5.4 6 6-3.6.6-5.4 2.4-6 6-.6-3.6-2.4-5.4-6-6 3.6-.6 5.4-2.4 6-6Z" /><path d="M18.5 16.5c.25 1.5 1 2.25 2.5 2.5-1.5.25-2.25 1-2.5 2.5-.25-1.5-1-2.25-2.5-2.5 1.5-.25 2.25-1 2.5-2.5Z" /></symbol>
|
|
21
|
+
<symbol id="i-tool" viewBox="0 0 24 24"><path d="m5 8 4 4-4 4M12 17h7" /></symbol>
|
|
22
|
+
<symbol id="i-read" viewBox="0 0 24 24"><path d="M4 5.5A2.5 2.5 0 0 1 6.5 3H11v16H6.5A2.5 2.5 0 0 0 4 21.5Z" /><path d="M20 5.5A2.5 2.5 0 0 0 17.5 3H13v16h4.5a2.5 2.5 0 0 1 2.5 2.5Z" /></symbol>
|
|
23
|
+
<symbol id="i-edit" viewBox="0 0 24 24"><path d="M4 20h4L20 8l-4-4L4 16v4Z" /><path d="m14 6 4 4" /></symbol>
|
|
24
|
+
<symbol id="i-write" viewBox="0 0 24 24"><path d="M6 3h7l5 5v13H6z" /><path d="M13 3v5h5M12 12v5M9.5 14.5h5" /></symbol>
|
|
25
|
+
<symbol id="i-command" viewBox="0 0 24 24"><path d="m5 7 4 5-4 5M12 17h7" /></symbol>
|
|
26
|
+
<symbol id="i-list" viewBox="0 0 24 24"><path d="M9 6h11M9 12h11M9 18h11" /><path d="M4.5 6h.01M4.5 12h.01M4.5 18h.01" /></symbol>
|
|
27
|
+
<symbol id="i-globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" /><path d="M4 12h16M12 4c2.5 2.4 2.5 13.6 0 16-2.5-2.4-2.5-13.6 0-16Z" /></symbol>
|
|
28
|
+
<symbol id="i-agent" viewBox="0 0 24 24"><circle cx="12" cy="8" r="3" /><path d="M5.5 20a6.5 6.5 0 0 1 13 0" /></symbol>
|
|
29
|
+
<symbol id="i-copy" viewBox="0 0 24 24"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V6a2 2 0 0 1 2-2h9" /></symbol>
|
|
30
|
+
<symbol id="i-check" viewBox="0 0 24 24"><path d="m5 13 4 4L19 7" /></symbol>
|
|
31
|
+
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18" /></symbol>
|
|
32
|
+
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6" /><path d="m16 16 4 4" /></symbol>
|
|
33
|
+
<symbol id="i-model" viewBox="0 0 24 24"><rect x="7" y="7" width="10" height="10" rx="2.5" /><path d="M10 3v4M14 3v4M10 17v4M14 17v4M3 10h4M3 14h4M17 10h4M17 14h4" /></symbol>
|
|
34
|
+
<symbol id="i-prompt" viewBox="0 0 24 24"><path d="M7 4h7l4 4v12H7z" /><path d="M14 4v4h4M10 12h5M10 16h5" /></symbol>
|
|
35
|
+
<symbol id="i-extension" viewBox="0 0 24 24"><path d="M9 4h6v3a2 2 0 1 0 4 0V4h1v6h-3a2 2 0 1 0 0 4h3v6h-6v-3a2 2 0 1 0-4 0v3H4v-6h3a2 2 0 1 0 0-4H4V4h5Z" /></symbol>
|
|
36
|
+
<symbol id="i-down" viewBox="0 0 24 24"><path d="M12 5v14M6 13l6 6 6-6" /></symbol>
|
|
37
|
+
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 4 3 20h18L12 4Z" /><path d="M12 10v4M12 17h.01" /></symbol>
|
|
38
|
+
<symbol id="i-tinychat" viewBox="0 0 24 24">
|
|
39
|
+
<path
|
|
40
|
+
d="M6.5 3.2H17.5Q21 3.2 21 6.7V15.3Q21 18.8 17.5 18.8H10L5.2 21V18Q3 17.2 3 14.8V6.7Q3 3.2 6.5 3.2Z"
|
|
41
|
+
fill="var(--accent)"
|
|
42
|
+
stroke="none"
|
|
43
|
+
/>
|
|
44
|
+
<path
|
|
45
|
+
d="M8 9L11 12L8 15M13 15H16.5"
|
|
46
|
+
fill="none"
|
|
47
|
+
stroke="var(--accent-ink)"
|
|
48
|
+
stroke-width="2"
|
|
49
|
+
stroke-linecap="round"
|
|
50
|
+
stroke-linejoin="round"
|
|
51
|
+
/>
|
|
52
|
+
</symbol>
|
|
53
|
+
<symbol id="i-folder" viewBox="0 0 24 24"><path d="M3.5 7.5a2 2 0 0 1 2-2H10l2 2.5h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2Z" /></symbol>
|
|
54
|
+
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" /><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" /></symbol>
|
|
55
|
+
<symbol id="i-moon" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5Z" /></symbol>
|
|
56
|
+
<symbol id="i-monitor" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="12" rx="2" /><path d="M8 21h8M12 17v4" /></symbol>
|
|
57
|
+
<symbol id="i-arrow-in" viewBox="0 0 24 24"><path d="M14 5h5v14h-5M4 12h11M11 8l4 4-4 4" /></symbol>
|
|
58
|
+
<symbol id="i-image" viewBox="0 0 24 24"><rect x="3" y="4.5" width="18" height="15" rx="2.5" /><circle cx="8.5" cy="9.5" r="1.4" /><path d="m4 17 5-5 3.5 3.5 2.5-2.5 5 5" /></symbol>
|
|
59
|
+
<symbol id="i-plan" viewBox="0 0 24 24"><path d="M5 6h14M5 12h14M5 18h9" /><path d="m17.5 16.5 1.5 1.5 3-3" /></symbol>
|
|
60
|
+
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M9 7V5h6v2M7 7l1 13h8l1-13M10 11v5M14 11v5" /></symbol>
|
|
61
|
+
</svg>
|
|
62
|
+
|
|
63
|
+
<div class="app">
|
|
64
|
+
<header class="topbar">
|
|
65
|
+
<div class="brand" title="Pi TinyChat">
|
|
66
|
+
<svg class="mark" aria-hidden="true"><use href="#i-tinychat" /></svg>
|
|
67
|
+
<span class="app-name">Pi TinyChat</span>
|
|
68
|
+
<span class="session" id="sessionName"></span>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="top-actions">
|
|
71
|
+
<span class="project" id="projectName" hidden>
|
|
72
|
+
<svg class="icon" aria-hidden="true"><use href="#i-folder" /></svg>
|
|
73
|
+
<span id="projectLabel"></span>
|
|
74
|
+
</span>
|
|
75
|
+
<div class="model-group" id="modelGroup" role="group" aria-label="Model and reasoning effort">
|
|
76
|
+
<button class="chip" id="modelButton" type="button" title="Model" aria-haspopup="menu" aria-controls="modelMenu" aria-expanded="false">
|
|
77
|
+
<svg class="icon" aria-hidden="true"><use href="#i-model" /></svg>
|
|
78
|
+
<span id="modelLabel">—</span>
|
|
79
|
+
<svg class="icon chev" aria-hidden="true"><use href="#i-chevron" /></svg>
|
|
80
|
+
</button>
|
|
81
|
+
<button class="chip" id="thinkingButton" type="button" title="Reasoning effort" aria-haspopup="menu" aria-controls="thinkingMenu" aria-expanded="false">
|
|
82
|
+
<svg class="icon" aria-hidden="true"><use href="#i-spark" /></svg>
|
|
83
|
+
<span id="thinkingLabel">off</span>
|
|
84
|
+
<svg class="icon chev" aria-hidden="true"><use href="#i-chevron" /></svg>
|
|
85
|
+
</button>
|
|
86
|
+
</div>
|
|
87
|
+
<button class="ring-button" id="contextButton" type="button" title="Context" aria-haspopup="menu" aria-controls="contextMenu" aria-expanded="false">
|
|
88
|
+
<svg class="ring" viewBox="0 0 20 20" aria-hidden="true">
|
|
89
|
+
<circle class="ring-bg" cx="10" cy="10" r="7.5" />
|
|
90
|
+
<circle class="ring-limit" id="ringLimit" cx="10" cy="10" r="7.5" />
|
|
91
|
+
<circle class="ring-fg" id="ringFg" cx="10" cy="10" r="7.5" />
|
|
92
|
+
</svg>
|
|
93
|
+
</button>
|
|
94
|
+
<button class="icon-btn plan-toggle" id="planToggle" type="button" title="Plan panel" aria-label="Plan panel" aria-expanded="true" aria-pressed="true">
|
|
95
|
+
<svg class="icon"><use href="#i-plan" /></svg>
|
|
96
|
+
</button>
|
|
97
|
+
<span class="top-sep" aria-hidden="true"></span>
|
|
98
|
+
<button class="icon-btn" id="historyButton" type="button" title="History" aria-label="History">
|
|
99
|
+
<svg class="icon"><use href="#i-history" /></svg>
|
|
100
|
+
</button>
|
|
101
|
+
<button class="icon-btn" id="settingsButton" type="button" title="Settings" aria-label="Settings" aria-haspopup="menu" aria-controls="settingsMenu" aria-expanded="false">
|
|
102
|
+
<svg class="icon"><use href="#i-settings" /></svg>
|
|
103
|
+
</button>
|
|
104
|
+
</div>
|
|
105
|
+
</header>
|
|
106
|
+
|
|
107
|
+
<div class="banner" id="banner" role="alert" hidden>
|
|
108
|
+
<svg class="icon" aria-hidden="true"><use href="#i-alert" /></svg>
|
|
109
|
+
<span id="bannerText"></span>
|
|
110
|
+
<button class="text-btn" id="bannerAction" type="button" hidden></button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div class="workspace">
|
|
114
|
+
<section class="chat" aria-label="Chat">
|
|
115
|
+
<main class="scroller" id="scroller">
|
|
116
|
+
<div class="messages" id="messages">
|
|
117
|
+
<div class="message-list" id="messageList" aria-live="polite" aria-relevant="additions text"></div>
|
|
118
|
+
<div id="liveMount"></div>
|
|
119
|
+
<div class="run-status" id="runStatus" role="status" hidden></div>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="empty" id="empty">
|
|
122
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-tinychat" /></svg>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="scroll-tail" aria-hidden="true"></div>
|
|
125
|
+
</main>
|
|
126
|
+
|
|
127
|
+
<button class="jump-button" id="jumpButton" type="button" aria-label="Jump to latest" hidden>
|
|
128
|
+
<svg class="icon"><use href="#i-down" /></svg>
|
|
129
|
+
</button>
|
|
130
|
+
|
|
131
|
+
<footer class="composer-area">
|
|
132
|
+
<div class="composer-wrap">
|
|
133
|
+
<div class="widgets" id="widgets" hidden></div>
|
|
134
|
+
<div class="composer" id="composer">
|
|
135
|
+
<label class="sr-only" for="input">Message</label>
|
|
136
|
+
<textarea id="input" rows="1" placeholder="Message" autocomplete="off" spellcheck="false"></textarea>
|
|
137
|
+
<div class="attachments" id="attachments" hidden></div>
|
|
138
|
+
<div class="composer-bar">
|
|
139
|
+
<div class="composer-left">
|
|
140
|
+
<div class="composer-tools">
|
|
141
|
+
<button class="composer-tool" id="commandButton" type="button" title="Commands" aria-label="Commands" aria-haspopup="dialog" aria-controls="commandMenu" aria-expanded="false">
|
|
142
|
+
<svg class="icon"><use href="#i-plus" /></svg>
|
|
143
|
+
</button>
|
|
144
|
+
<button class="composer-tool" id="imageButton" type="button" title="Attach image" aria-label="Attach image">
|
|
145
|
+
<svg class="icon"><use href="#i-image" /></svg>
|
|
146
|
+
</button>
|
|
147
|
+
<input id="imageInput" type="file" accept="image/*" multiple hidden />
|
|
148
|
+
</div>
|
|
149
|
+
<div class="composer-statuses" id="composerLeft"></div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="composer-right">
|
|
152
|
+
<div class="send-mode" id="sendMode" role="group" aria-label="Send mode" hidden>
|
|
153
|
+
<button type="button" data-send-mode="steer" aria-pressed="true" title="Interrupt the running turn">Steer</button>
|
|
154
|
+
<button type="button" data-send-mode="followUp" aria-pressed="false" title="Send after the run finishes">Follow-up</button>
|
|
155
|
+
</div>
|
|
156
|
+
<span class="queue-badge" id="queueBadge" hidden></span>
|
|
157
|
+
<button class="send-button" id="sendButton" type="button" title="Send (Ctrl+Enter)" aria-label="Send (Ctrl+Enter)" disabled>
|
|
158
|
+
<svg class="icon"><use href="#i-send" /></svg>
|
|
159
|
+
</button>
|
|
160
|
+
<button class="stop-button" id="stopButton" type="button" title="Stop (Esc)" aria-label="Stop (Esc)" hidden>
|
|
161
|
+
<svg class="icon"><use href="#i-stop" /></svg>
|
|
162
|
+
</button>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="popover command-menu" id="commandMenu" hidden></div>
|
|
167
|
+
<div class="popover slash-menu" id="slashMenu" hidden></div>
|
|
168
|
+
</div>
|
|
169
|
+
</footer>
|
|
170
|
+
</section>
|
|
171
|
+
|
|
172
|
+
<div class="plan-resizer" id="planResizer" role="separator" tabindex="0" aria-orientation="vertical" aria-label="Plan panel width" aria-valuemin="220" aria-valuemax="640" aria-valuenow="284"></div>
|
|
173
|
+
|
|
174
|
+
<aside class="plan-panel" id="planPanel" aria-label="Plan">
|
|
175
|
+
<div class="plan-head">
|
|
176
|
+
<svg class="icon" aria-hidden="true"><use href="#i-plan" /></svg>
|
|
177
|
+
<span class="plan-title" id="planTitle">Plan</span>
|
|
178
|
+
<button class="ghost-icon plan-close" id="planClose" type="button" aria-label="Close">
|
|
179
|
+
<svg class="icon"><use href="#i-x" /></svg>
|
|
180
|
+
</button>
|
|
181
|
+
</div>
|
|
182
|
+
<ol class="plan-items" id="planItems" data-testid="plan-list"></ol>
|
|
183
|
+
<div class="plan-empty" id="planEmpty" aria-hidden="true">
|
|
184
|
+
<span></span><span></span><span></span>
|
|
185
|
+
</div>
|
|
186
|
+
</aside>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div class="popover menu" id="modelMenu" hidden></div>
|
|
190
|
+
<div class="popover menu" id="thinkingMenu" hidden></div>
|
|
191
|
+
<div class="popover menu" id="settingsMenu" hidden></div>
|
|
192
|
+
<div class="popover menu" id="contextMenu" hidden></div>
|
|
193
|
+
|
|
194
|
+
<div class="drawer-backdrop" id="drawerBackdrop" hidden></div>
|
|
195
|
+
<div class="drawer-backdrop" id="planBackdrop" hidden></div>
|
|
196
|
+
<aside class="drawer" id="historyPanel" aria-label="History" hidden>
|
|
197
|
+
<div class="drawer-head">
|
|
198
|
+
<svg class="icon" aria-hidden="true"><use href="#i-history" /></svg>
|
|
199
|
+
<span class="drawer-grow" aria-hidden="true"></span>
|
|
200
|
+
<button class="select-toggle" id="historySelect" type="button" aria-pressed="false">Select</button>
|
|
201
|
+
<button class="ghost-icon" id="newChatButton" type="button" title="New chat" aria-label="New chat">
|
|
202
|
+
<svg class="icon"><use href="#i-plus" /></svg>
|
|
203
|
+
</button>
|
|
204
|
+
<button class="ghost-icon" id="historyClose" type="button" aria-label="Close">
|
|
205
|
+
<svg class="icon"><use href="#i-x" /></svg>
|
|
206
|
+
</button>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="selection-bar" id="historyActions" hidden>
|
|
209
|
+
<button class="text-btn" id="historySelectAll" type="button">Select all</button>
|
|
210
|
+
<span class="selection-count" id="historyCount"></span>
|
|
211
|
+
<button class="danger-btn" id="historyDelete" type="button" disabled>Delete</button>
|
|
212
|
+
<button class="text-btn" id="historyCancel" type="button">Cancel</button>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="session-list" id="sessionList"></div>
|
|
215
|
+
</aside>
|
|
216
|
+
|
|
217
|
+
<div class="dialog-layer" id="dialogLayer" hidden>
|
|
218
|
+
<div class="dialog" id="dialog" role="dialog" aria-modal="true"></div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<div class="toasts" id="toasts" aria-live="polite"></div>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<script type="module" src="/app.js"></script>
|
|
225
|
+
</body>
|
|
226
|
+
</html>
|