agent-loft 0.2.33 → 0.2.35

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.
@@ -0,0 +1,350 @@
1
+ /* ---------- 远程控制(views/remote.js、desktop.js) ---------- */
2
+
3
+ /* 侧栏入口:没权限、没有能用的时藏起来(.side-nav 的 display 会盖过 hidden) */
4
+ .side-nav[hidden] {
5
+ display: none;
6
+ }
7
+
8
+ /* 后台连着时右边一个小绿点 */
9
+ .side-nav .live-dot {
10
+ display: none;
11
+ width: 7px;
12
+ height: 7px;
13
+ margin-left: auto;
14
+ border-radius: 50%;
15
+ background: var(--ok);
16
+ }
17
+
18
+ .side-nav.live .live-dot {
19
+ display: block;
20
+ }
21
+
22
+ /* 远程控制页:对话、输入框都藏起来(只是藏,回来时还在),这一页占满顶栏下面 */
23
+ .main.remote-view .messages,
24
+ .main.remote-view .msg-nav,
25
+ .main.remote-view .composer-wrap,
26
+ .main.remote-view .to-bottom,
27
+ .main.remote-view > .term-dock {
28
+ display: none;
29
+ }
30
+
31
+ .remote-pane {
32
+ flex: 1;
33
+ min-height: 0;
34
+ display: flex;
35
+ flex-direction: column;
36
+ margin-top: calc(52px + env(safe-area-inset-top));
37
+ }
38
+
39
+ /* 软键盘盖住的高度(views/remote.js),iOS 上才不为 0 */
40
+ .remote-pane,
41
+ .main > .term-dock {
42
+ padding-bottom: var(--kb-inset, 0px);
43
+ }
44
+
45
+ .remote-pane[hidden] {
46
+ display: none;
47
+ }
48
+
49
+ /* iOS 主屏 PWA 里顶栏是 sticky 的、本来就占位置 */
50
+ @media (display-mode: standalone) and (max-width: 768px) {
51
+ .remote-pane {
52
+ margin-top: 0;
53
+ }
54
+ }
55
+
56
+ .remote-head {
57
+ display: flex;
58
+ align-items: center;
59
+ gap: 8px;
60
+ padding: 0 12px 6px;
61
+ min-height: 36px;
62
+ }
63
+
64
+ .remote-head .grow {
65
+ flex: 1;
66
+ }
67
+
68
+ .remote-switch {
69
+ display: flex;
70
+ gap: 2px;
71
+ padding: 2px;
72
+ border-radius: 9px;
73
+ background: var(--bg-soft);
74
+ }
75
+
76
+ .remote-switch:empty {
77
+ display: none;
78
+ }
79
+
80
+ .remote-tab {
81
+ display: flex;
82
+ white-space: nowrap;
83
+ flex-shrink: 0;
84
+ align-items: center;
85
+ gap: 6px;
86
+ padding: 5px 12px;
87
+ border: none;
88
+ border-radius: 7px;
89
+ background: transparent;
90
+ color: var(--fg-soft);
91
+ font: inherit;
92
+ font-size: 13px;
93
+ cursor: pointer;
94
+ }
95
+
96
+ .remote-tab svg {
97
+ width: 15px;
98
+ height: 15px;
99
+ }
100
+
101
+ .remote-tab.on {
102
+ background: var(--bg);
103
+ color: var(--fg);
104
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
105
+ }
106
+
107
+ .remote-tools {
108
+ display: flex;
109
+ gap: 2px;
110
+ min-width: 0;
111
+ overflow-x: auto;
112
+ scrollbar-width: none;
113
+ }
114
+
115
+ /* 手机:切换只留图标,工具栏挤一挤 */
116
+ @media (max-width: 768px) {
117
+ .remote-head {
118
+ padding: 0 8px 6px;
119
+ gap: 4px;
120
+ }
121
+
122
+ .remote-tab {
123
+ padding: 6px 10px;
124
+ }
125
+
126
+ .remote-tab span {
127
+ display: none;
128
+ }
129
+
130
+ .desk-tool {
131
+ width: 30px;
132
+ flex-shrink: 0;
133
+ }
134
+ }
135
+
136
+ .desk-tool {
137
+ width: 32px;
138
+ height: 32px;
139
+ }
140
+
141
+ .desk-tool svg {
142
+ width: 17px;
143
+ height: 17px;
144
+ }
145
+
146
+ .desk-tool.on {
147
+ background: var(--bg-hover);
148
+ color: var(--accent);
149
+ }
150
+
151
+ .desk-tool:disabled {
152
+ opacity: 0.35;
153
+ pointer-events: none;
154
+ }
155
+
156
+ .remote-body {
157
+ flex: 1;
158
+ min-height: 0;
159
+ display: flex;
160
+ flex-direction: column;
161
+ position: relative;
162
+ }
163
+
164
+ .remote-body[hidden] {
165
+ display: none;
166
+ }
167
+
168
+ /* ---------- 桌面 ---------- */
169
+
170
+ .desk-status {
171
+ display: flex;
172
+ align-items: center;
173
+ justify-content: center;
174
+ gap: 10px;
175
+ padding: 6px 12px;
176
+ font-size: 13px;
177
+ }
178
+
179
+ .desk-status[hidden] {
180
+ display: none;
181
+ }
182
+
183
+ /* 外框负责裁剪;里面那块交给 noVNC,手机上在它上面做 CSS 放大(views/desktop-touch.js) */
184
+ .desk-viewport {
185
+ flex: 1;
186
+ min-height: 0;
187
+ position: relative;
188
+ overflow: hidden;
189
+ background: #111;
190
+ /* 手势全由页面自己处理:别让浏览器拿去缩放、滚动页面 */
191
+ touch-action: none;
192
+ -webkit-user-select: none;
193
+ user-select: none;
194
+ -webkit-touch-callout: none;
195
+ }
196
+
197
+ .desk-screen {
198
+ position: relative;
199
+ width: 100%;
200
+ height: 100%;
201
+ transform-origin: 0 0;
202
+ transition: opacity 0.2s;
203
+ }
204
+
205
+ /* 触控板模式下的指针(远程那边的指针不画在画面里) */
206
+ .desk-cursor {
207
+ position: absolute;
208
+ left: 0;
209
+ top: 0;
210
+ width: 20px;
211
+ height: 24px;
212
+ margin: -1px 0 0 -2px;
213
+ pointer-events: none;
214
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
215
+ z-index: 2;
216
+ }
217
+
218
+ .desk-cursor[hidden] {
219
+ display: none;
220
+ }
221
+
222
+ .desk-cursor svg {
223
+ width: 100%;
224
+ height: 100%;
225
+ }
226
+
227
+ /* 长按到了:要开始拖了 */
228
+ .desk-cursor.armed::after,
229
+ .desk-cursor.pressed::after {
230
+ content: "";
231
+ position: absolute;
232
+ left: -12px;
233
+ top: -12px;
234
+ width: 26px;
235
+ height: 26px;
236
+ border-radius: 50%;
237
+ border: 2px solid var(--accent);
238
+ background: color-mix(in srgb, var(--accent) 25%, transparent);
239
+ }
240
+
241
+ /* 放大了:右下角「2.0× · 还原」 */
242
+ .desk-zoom {
243
+ position: absolute;
244
+ right: 10px;
245
+ bottom: 10px;
246
+ z-index: 3;
247
+ padding: 5px 10px;
248
+ border: none;
249
+ border-radius: 999px;
250
+ background: rgba(0, 0, 0, 0.6);
251
+ color: #fff;
252
+ font: 12px var(--font);
253
+ }
254
+
255
+ .desk-zoom[hidden],
256
+ .desk-hint[hidden] {
257
+ display: none;
258
+ }
259
+
260
+ .desk-hint {
261
+ position: absolute;
262
+ left: 50%;
263
+ top: 12px;
264
+ transform: translateX(-50%);
265
+ z-index: 3;
266
+ padding: 6px 12px;
267
+ border-radius: 999px;
268
+ background: rgba(0, 0, 0, 0.7);
269
+ color: #fff;
270
+ font-size: 13px;
271
+ white-space: nowrap;
272
+ pointer-events: none;
273
+ }
274
+
275
+ .desk-keys .term-key.icon {
276
+ display: grid;
277
+ place-items: center;
278
+ }
279
+
280
+ .desk-keys .term-key.icon svg {
281
+ width: 20px;
282
+ height: 20px;
283
+ }
284
+
285
+ .desk-keys .term-key.on {
286
+ background: var(--accent);
287
+ border-color: var(--accent);
288
+ color: var(--accent-fg);
289
+ }
290
+
291
+ .gesture-sec h4 {
292
+ margin: 4px 0 8px;
293
+ font-size: 14px;
294
+ }
295
+
296
+ .gesture-list {
297
+ display: grid;
298
+ grid-template-columns: max-content 1fr;
299
+ gap: 6px 14px;
300
+ margin-bottom: 14px;
301
+ font-size: 13px;
302
+ }
303
+
304
+ .gesture-row {
305
+ display: contents;
306
+ }
307
+
308
+ .gesture-row span {
309
+ color: var(--fg-soft);
310
+ }
311
+
312
+ .desk-screen.dim {
313
+ opacity: 0.4;
314
+ }
315
+
316
+ /* 浏览器全屏时只剩画面 */
317
+ .remote-body:fullscreen .desk-status {
318
+ display: none;
319
+ }
320
+
321
+ .desk-clip {
322
+ width: 100%;
323
+ margin-top: 10px;
324
+ font: 13px var(--mono);
325
+ resize: vertical;
326
+ }
327
+
328
+ /* 手机上收软键盘输入用:看不见,但要能拿到焦点 */
329
+ .desk-keyinput {
330
+ position: absolute;
331
+ left: 0;
332
+ bottom: 0;
333
+ width: 1px;
334
+ height: 1px;
335
+ opacity: 0;
336
+ border: none;
337
+ padding: 0;
338
+ resize: none;
339
+ /* 小于 16px 的输入框,iOS 聚焦时会把整页放大 */
340
+ font-size: 16px;
341
+ }
342
+
343
+ /* 设置里按选项显示的一组输入框:照常吃 section 的间距 */
344
+ .field-group {
345
+ display: contents;
346
+ }
347
+
348
+ .field-group[hidden] {
349
+ display: none;
350
+ }
@@ -333,3 +333,197 @@
333
333
  background: var(--code-bg);
334
334
  font-size: 12px;
335
335
  }
336
+
337
+ /* ---------- 用量(按日 / 月 / 年统计 Token 和费用) ---------- */
338
+
339
+ .usage-stats h5 {
340
+ margin: 4px 0 -4px;
341
+ font-size: 13px;
342
+ font-weight: 600;
343
+ color: var(--fg-soft);
344
+ }
345
+
346
+ .us-head {
347
+ display: flex;
348
+ align-items: center;
349
+ gap: 12px;
350
+ flex-wrap: wrap;
351
+ }
352
+
353
+ .us-head h4 {
354
+ flex: 1;
355
+ }
356
+
357
+ .us-head .seg {
358
+ display: inline-flex;
359
+ padding: 3px;
360
+ border-radius: 10px;
361
+ background: var(--bg-soft);
362
+ }
363
+
364
+ .us-head .seg button {
365
+ padding: 5px 12px;
366
+ border-radius: 8px;
367
+ font-size: 13px;
368
+ color: var(--fg-soft);
369
+ }
370
+
371
+ .us-head .seg button.on {
372
+ background: var(--bg);
373
+ color: var(--fg);
374
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
375
+ }
376
+
377
+ .us-nav {
378
+ display: inline-flex;
379
+ align-items: center;
380
+ gap: 6px;
381
+ }
382
+
383
+ .us-title {
384
+ min-width: 7.5em;
385
+ text-align: center;
386
+ font-size: 14px;
387
+ font-weight: 600;
388
+ font-variant-numeric: tabular-nums;
389
+ }
390
+
391
+ .us-empty {
392
+ padding: 24px 0;
393
+ text-align: center;
394
+ }
395
+
396
+ .us-tiles {
397
+ display: grid;
398
+ grid-template-columns: repeat(3, minmax(0, 1fr));
399
+ gap: 8px;
400
+ }
401
+
402
+ .us-tile {
403
+ display: flex;
404
+ flex-direction: column;
405
+ gap: 4px;
406
+ padding: 10px 12px;
407
+ border-radius: 10px;
408
+ background: var(--bg-soft);
409
+ }
410
+
411
+ .us-tile span {
412
+ font-size: 12px;
413
+ color: var(--fg-soft);
414
+ }
415
+
416
+ .us-tile b {
417
+ font-size: 20px;
418
+ font-weight: 600;
419
+ font-variant-numeric: tabular-nums;
420
+ }
421
+
422
+ /* 趋势:单一系列,用主题前景色;没用量的格子留空,悬停看数字 */
423
+ .us-trend {
424
+ position: relative;
425
+ padding-top: 16px;
426
+ }
427
+
428
+ .us-bars {
429
+ display: grid;
430
+ gap: 2px;
431
+ height: 120px;
432
+ align-items: end;
433
+ border-bottom: 1px solid var(--border);
434
+ }
435
+
436
+ .us-col {
437
+ height: 100%;
438
+ display: flex;
439
+ align-items: flex-end;
440
+ border-radius: 4px 4px 0 0;
441
+ }
442
+
443
+ .us-col:hover {
444
+ background: var(--bg-soft);
445
+ }
446
+
447
+ .us-col i {
448
+ width: 100%;
449
+ background: var(--fg);
450
+ opacity: 0.78;
451
+ border-radius: 4px 4px 0 0;
452
+ }
453
+
454
+ .us-col:hover i {
455
+ opacity: 1;
456
+ }
457
+
458
+ .us-axis {
459
+ display: grid;
460
+ gap: 2px;
461
+ margin-top: 4px;
462
+ font-size: 11px;
463
+ color: var(--fg-faint);
464
+ text-align: center;
465
+ font-variant-numeric: tabular-nums;
466
+ }
467
+
468
+ .us-max {
469
+ position: absolute;
470
+ top: 0;
471
+ right: 0;
472
+ font-size: 11px;
473
+ color: var(--fg-faint);
474
+ }
475
+
476
+ .usage-stats .usage {
477
+ padding: 0;
478
+ font-size: 13px;
479
+ }
480
+
481
+ .us-list {
482
+ display: flex;
483
+ flex-direction: column;
484
+ gap: 6px;
485
+ }
486
+
487
+ .us-item {
488
+ display: grid;
489
+ grid-template-columns: minmax(5em, 9em) 1fr 4.5em 4.5em;
490
+ align-items: center;
491
+ gap: 10px;
492
+ font-size: 13px;
493
+ font-variant-numeric: tabular-nums;
494
+ }
495
+
496
+ .us-name {
497
+ overflow: hidden;
498
+ text-overflow: ellipsis;
499
+ white-space: nowrap;
500
+ }
501
+
502
+ .us-meter {
503
+ height: 6px;
504
+ border-radius: 3px;
505
+ background: var(--bg-soft);
506
+ overflow: hidden;
507
+ }
508
+
509
+ .us-meter i {
510
+ display: block;
511
+ height: 100%;
512
+ background: var(--fg-soft);
513
+ border-radius: 3px;
514
+ }
515
+
516
+ .us-num,
517
+ .us-cost {
518
+ text-align: right;
519
+ }
520
+
521
+ .us-cost {
522
+ color: var(--fg-soft);
523
+ }
524
+
525
+ @media (max-width: 640px) {
526
+ .us-tiles {
527
+ grid-template-columns: 1fr 1fr;
528
+ }
529
+ }