Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

persistent-chat.css

359 lines6.3 KB

1.pc-page {
2 --pc-bg: #0b0c10;
3 --pc-panel: #14161d;
4 --pc-panel-2: #1b1e27;
5 --pc-border: #262a36;
6 --pc-text: #e7e9ee;
7 --pc-muted: #9aa3b2;
8 --pc-accent: #6366f1;
9 --pc-user: #6366f1;
10 --pc-assistant: #1b1e27;
11 --pc-tool: #12261f;
12 --pc-tool-border: #1f5c45;
13​
14 width: 100%;
15 /* Fill the viewport below the app header (h-72px / p-4 logo bar). */
16 height: calc(100dvh - 72px);
17 margin: 0;
18 display: flex;
19 flex-direction: row;
20 color: var(--pc-text);
21 background: var(--pc-bg);
22 border: none;
23 border-radius: 0;
24 overflow: hidden;
25 font-family:
26 ui-sans-serif,
27 system-ui,
28 -apple-system,
29 'Segoe UI',
30 Roboto,
31 sans-serif;
33​
34.pc-sidebar {
35 width: 240px;
36 flex-shrink: 0;
37 display: flex;
38 flex-direction: column;
39 gap: 10px;
40 padding: 16px 12px;
41 border-right: 1px solid var(--pc-border);
42 background: var(--pc-panel);
43 overflow: hidden;
45​
46.pc-new {
47 padding: 10px 12px;
48 border-radius: 10px;
49 border: 1px solid var(--pc-border);
50 background: var(--pc-accent);
51 color: #fff;
52 font-size: 13px;
53 font-weight: 600;
54 cursor: pointer;
56.pc-new:hover {
57 filter: brightness(1.08);
59​
60.pc-threadlist {
61 display: flex;
62 flex-direction: column;
63 gap: 4px;
64 overflow-y: auto;
66​
67.pc-threaditem {
68 text-align: left;
69 padding: 9px 11px;
70 border-radius: 9px;
71 border: 1px solid transparent;
72 background: transparent;
73 color: var(--pc-muted);
74 font-size: 13px;
75 cursor: pointer;
76 white-space: nowrap;
77 overflow: hidden;
78 text-overflow: ellipsis;
80.pc-threaditem:hover {
81 background: var(--pc-panel-2);
82 color: var(--pc-text);
84.pc-threaditem.active {
85 background: var(--pc-panel-2);
86 border-color: var(--pc-accent);
87 color: var(--pc-text);
89​
90.pc-main {
91 flex: 1;
92 min-width: 0;
93 display: flex;
94 flex-direction: column;
95 padding: 22px 22px 0;
96 overflow: hidden;
98​
99.pc-header {
100 display: flex;
101 align-items: baseline;
102 justify-content: space-between;
103 gap: 12px;
104 flex-wrap: wrap;
106​
107.pc-header h1 {
108 margin: 0;
109 font-size: 20px;
110 font-weight: 650;
111 letter-spacing: -0.01em;
113​
114.pc-status {
115 display: inline-flex;
116 align-items: center;
117 gap: 6px;
118 font-size: 12px;
119 color: var(--pc-muted);
121​
122.pc-dot {
123 width: 8px;
124 height: 8px;
125 border-radius: 50%;
126 background: #f59e0b;
128.pc-dot.connected {
129 background: #22c55e;
131.pc-dot.error {
132 background: #ef4444;
134​
135.pc-blurb {
136 margin: 10px 0 16px;
137 font-size: 13px;
138 line-height: 1.55;
139 color: var(--pc-muted);
141.pc-blurb code {
142 background: var(--pc-panel-2);
143 border: 1px solid var(--pc-border);
144 border-radius: 5px;
145 padding: 1px 5px;
146 font-size: 12px;
147 color: var(--pc-text);
149​
150.pc-thread {
151 flex: 1;
152 display: flex;
153 flex-direction: column;
154 gap: 14px;
155 overflow-y: auto;
156 padding: 4px 2px 20px;
158​
159.pc-empty {
160 margin: auto;
161 color: var(--pc-muted);
162 font-size: 14px;
163 text-align: center;
165​
166.pc-row {
167 display: flex;
168 flex-direction: column;
169 gap: 6px;
170 max-width: 88%;
172.pc-row.user {
173 align-self: flex-end;
174 align-items: flex-end;
176.pc-row.assistant {
177 align-self: flex-start;
178 align-items: flex-start;
180​
181.pc-role {
182 font-size: 11px;
183 text-transform: uppercase;
184 letter-spacing: 0.06em;
185 color: var(--pc-muted);
187​
188.pc-bubble {
189 border-radius: 14px;
190 padding: 10px 14px;
191 font-size: 14.5px;
192 line-height: 1.55;
193 white-space: pre-wrap;
194 word-break: break-word;
196.pc-row.user .pc-bubble {
197 background: var(--pc-user);
198 color: #fff;
199 border-bottom-right-radius: 4px;
201.pc-row.assistant .pc-bubble {
202 background: var(--pc-assistant);
203 border: 1px solid var(--pc-border);
204 border-bottom-left-radius: 4px;
206​
207.pc-reasoning {
208 align-self: stretch;
209 border-left: 2px solid var(--pc-border);
210 padding: 4px 0 4px 12px;
211 font-size: 13px;
212 line-height: 1.5;
213 color: var(--pc-muted);
214 font-style: italic;
215 white-space: pre-wrap;
216 word-break: break-word;
218.pc-reasoning-label {
219 display: block;
220 font-size: 10.5px;
221 font-style: normal;
222 text-transform: uppercase;
223 letter-spacing: 0.07em;
224 color: var(--pc-muted);
225 opacity: 0.7;
226 margin-bottom: 3px;
228​
229.pc-tool {
230 background: var(--pc-tool);
231 border: 1px solid var(--pc-tool-border);
232 border-radius: 12px;
233 padding: 8px 12px;
234 font-size: 13px;
235 min-width: 220px;
237.pc-tool-head {
238 display: flex;
239 align-items: center;
240 gap: 7px;
241 font-weight: 600;
242 color: #7fe3b8;
244.pc-tool-io {
245 margin: 6px 0 0;
246 padding: 6px 8px;
247 background: rgba(0, 0, 0, 0.28);
248 border-radius: 7px;
249 font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
250 font-size: 12px;
251 color: var(--pc-text);
252 overflow-x: auto;
253 white-space: pre;
255.pc-tool-pending {
256 color: var(--pc-muted);
257 font-style: italic;
259​
260.pc-approval {
261 margin: 0 2px 12px;
262 padding: 12px 14px;
263 border: 1px solid var(--pc-accent);
264 border-radius: 12px;
265 background: rgba(99, 102, 241, 0.08);
267.pc-approval-head {
268 font-size: 14px;
269 margin-bottom: 8px;
271.pc-approval-actions {
272 display: flex;
273 gap: 8px;
274 margin-top: 10px;
276.pc-approve,
277.pc-reject {
278 padding: 7px 16px;
279 border-radius: 9px;
280 border: 1px solid var(--pc-border);
281 font-size: 13px;
282 font-weight: 600;
283 cursor: pointer;
285.pc-approve {
286 background: #22c55e;
287 color: #05240f;
288 border-color: #22c55e;
290.pc-reject {
291 background: transparent;
292 color: var(--pc-text);
294.pc-approve:disabled,
295.pc-reject:disabled {
296 opacity: 0.5;
297 cursor: not-allowed;
299​
300.pc-composer {
301 position: sticky;
302 bottom: 0;
303 display: flex;
304 gap: 10px;
305 padding: 14px 0 22px;
306 background: linear-gradient(to top, var(--pc-bg) 72%, transparent);
308​
309.pc-input {
310 flex: 1;
311 padding: 12px 14px;
312 border-radius: 12px;
313 border: 1px solid var(--pc-border);
314 background: var(--pc-panel);
315 color: var(--pc-text);
316 font-size: 14.5px;
317 outline: none;
319.pc-input:focus {
320 border-color: var(--pc-accent);
322.pc-input::placeholder {
323 color: var(--pc-muted);
325​
326.pc-send {
327 padding: 0 18px;
328 border-radius: 12px;
329 border: none;
330 background: var(--pc-accent);
331 color: #fff;
332 font-size: 14px;
333 font-weight: 600;
334 cursor: pointer;
336.pc-send:disabled {
337 opacity: 0.5;
338 cursor: not-allowed;
340​
341.pc-suggestions {
342 display: flex;
343 gap: 8px;
344 flex-wrap: wrap;
345 margin-bottom: 4px;
347.pc-chip {
348 padding: 6px 11px;
349 border-radius: 999px;
350 border: 1px solid var(--pc-border);
351 background: var(--pc-panel);
352 color: var(--pc-muted);
353 font-size: 12.5px;
354 cursor: pointer;
356.pc-chip:hover {
357 color: var(--pc-text);
358 border-color: var(--pc-accent);