codexmate 0.0.25 → 0.0.27

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.
Files changed (35) hide show
  1. package/README.md +11 -3
  2. package/README.zh.md +10 -2
  3. package/cli/builtin-proxy.js +315 -95
  4. package/cli/openai-bridge.js +99 -5
  5. package/cli/session-convert-args.js +65 -0
  6. package/cli/session-convert-io.js +82 -0
  7. package/cli/session-convert.js +43 -0
  8. package/cli.js +547 -32
  9. package/package.json +74 -74
  10. package/web-ui/app.js +24 -2
  11. package/web-ui/logic.session-convert.mjs +70 -0
  12. package/web-ui/logic.sessions.mjs +151 -0
  13. package/web-ui/modules/app.computed.dashboard.mjs +44 -1
  14. package/web-ui/modules/app.computed.session.mjs +336 -12
  15. package/web-ui/modules/app.methods.claude-config.mjs +11 -1
  16. package/web-ui/modules/app.methods.codex-config.mjs +76 -0
  17. package/web-ui/modules/app.methods.navigation.mjs +51 -3
  18. package/web-ui/modules/app.methods.session-actions.mjs +55 -3
  19. package/web-ui/modules/app.methods.session-browser.mjs +270 -3
  20. package/web-ui/modules/app.methods.session-timeline.mjs +34 -3
  21. package/web-ui/modules/app.methods.session-trash.mjs +16 -1
  22. package/web-ui/modules/app.methods.startup-claude.mjs +234 -125
  23. package/web-ui/modules/i18n.dict.mjs +76 -0
  24. package/web-ui/partials/index/panel-config-claude.html +12 -4
  25. package/web-ui/partials/index/panel-sessions.html +33 -10
  26. package/web-ui/partials/index/panel-settings.html +16 -0
  27. package/web-ui/partials/index/panel-usage.html +95 -85
  28. package/web-ui/session-helpers.mjs +3 -0
  29. package/web-ui/styles/base-theme.css +29 -25
  30. package/web-ui/styles/layout-shell.css +1 -1
  31. package/web-ui/styles/navigation-panels.css +9 -9
  32. package/web-ui/styles/sessions-list.css +17 -0
  33. package/web-ui/styles/sessions-toolbar-trash.css +62 -0
  34. package/web-ui/styles/sessions-usage.css +211 -83
  35. package/web-ui/styles/settings-panel.css +19 -0
@@ -117,10 +117,10 @@
117
117
  gap: 4px;
118
118
  min-height: 88px;
119
119
  padding: 12px 14px;
120
- border-radius: 14px;
121
- background: var(--color-surface-alt);
122
- border: 1px solid var(--color-border-soft);
123
- box-shadow: var(--shadow-subtle);
120
+ border-radius: 12px;
121
+ background: var(--color-surface);
122
+ border: 1px solid var(--color-border);
123
+ box-shadow: none;
124
124
  }
125
125
 
126
126
  .usage-content {
@@ -173,6 +173,7 @@
173
173
 
174
174
  .usage-summary-card.usage-copyable:hover {
175
175
  border-color: var(--color-border-strong);
176
+ background: var(--color-surface-alt);
176
177
  }
177
178
 
178
179
  .usage-loading-skeleton {
@@ -261,16 +262,16 @@
261
262
 
262
263
  .usage-chart-grid {
263
264
  display: grid;
264
- grid-template-columns: 2fr 1fr;
265
+ grid-template-columns: 1fr;
265
266
  gap: 16px;
266
267
  }
267
268
 
268
269
  .usage-card {
269
270
  padding: 16px;
270
- border-radius: 16px;
271
+ border-radius: 12px;
271
272
  background: var(--color-surface);
272
- border: 1px solid var(--color-border-soft);
273
- box-shadow: var(--shadow-subtle);
273
+ border: 1px solid var(--color-border);
274
+ box-shadow: none;
274
275
  min-width: 0;
275
276
  overflow: hidden;
276
277
  }
@@ -303,7 +304,7 @@
303
304
  padding: 0 10px;
304
305
  border-radius: 999px;
305
306
  border: 1px solid var(--color-border);
306
- background: var(--color-surface-alt);
307
+ background: transparent;
307
308
  color: var(--color-text-secondary);
308
309
  font-size: 12px;
309
310
  font-weight: 600;
@@ -322,7 +323,7 @@
322
323
  padding: 0 2px 10px;
323
324
  scrollbar-gutter: stable both-edges;
324
325
  scrollbar-width: thin;
325
- scrollbar-color: rgba(199, 116, 98, 0.72) rgba(199, 116, 98, 0.08);
326
+ scrollbar-color: rgba(24, 24, 27, 0.26) rgba(24, 24, 27, 0.08);
326
327
  }
327
328
 
328
329
  .usage-bars::-webkit-scrollbar {
@@ -330,18 +331,18 @@
330
331
  }
331
332
 
332
333
  .usage-bars::-webkit-scrollbar-track {
333
- background: linear-gradient(90deg, rgba(199, 116, 98, 0.04), rgba(199, 116, 98, 0.1));
334
+ background: rgba(24, 24, 27, 0.06);
334
335
  border-radius: 999px;
335
336
  }
336
337
 
337
338
  .usage-bars::-webkit-scrollbar-thumb {
338
- background: linear-gradient(90deg, rgba(199, 116, 98, 0.68), rgba(180, 94, 78, 0.92));
339
+ background: rgba(24, 24, 27, 0.26);
339
340
  border-radius: 999px;
340
- border: 2px solid rgba(248, 243, 238, 0.96);
341
+ border: 2px solid rgba(255, 255, 255, 0.92);
341
342
  }
342
343
 
343
344
  .usage-bars::-webkit-scrollbar-thumb:hover {
344
- background: linear-gradient(90deg, rgba(199, 116, 98, 0.82), rgba(180, 94, 78, 1));
345
+ background: rgba(24, 24, 27, 0.34);
345
346
  }
346
347
 
347
348
  .usage-bar-group {
@@ -380,110 +381,142 @@
380
381
  grid-column: 1 / -1;
381
382
  }
382
383
 
383
- .usage-daily-legend {
384
- display: flex;
385
- flex-wrap: wrap;
384
+ .usage-daydetail-controls {
385
+ display: inline-flex;
386
386
  align-items: center;
387
- gap: 12px;
388
- margin: 0 0 10px;
389
- font-size: 12px;
390
- color: var(--color-text-secondary);
387
+ gap: 8px;
391
388
  }
392
389
 
393
- .usage-daily-dot {
394
- width: 10px;
395
- height: 10px;
390
+ .usage-daydetail-select {
391
+ min-height: 30px;
392
+ padding: 0 30px 0 10px;
396
393
  border-radius: 999px;
394
+ border: 1px solid var(--color-border);
395
+ background-color: transparent;
396
+ color: var(--color-text-secondary);
397
+ font-size: 12px;
398
+ font-weight: 600;
399
+ cursor: pointer;
400
+ appearance: none;
401
+ -webkit-appearance: none;
402
+ -moz-appearance: none;
403
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23505A66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
404
+ background-repeat: no-repeat;
405
+ background-position: right 10px center;
406
+ background-size: 12px;
397
407
  }
398
408
 
399
- .usage-daily-dot-tokens {
400
- background: var(--color-brand);
409
+ .usage-daydetail-select:hover {
410
+ background-color: var(--color-surface-alt);
401
411
  }
402
412
 
403
- .usage-daily-dot-cost {
404
- background: linear-gradient(135deg, rgba(139, 107, 214, 0.95), rgba(199, 116, 98, 0.95));
413
+ .usage-daydetail-select:focus {
414
+ outline: none;
415
+ box-shadow: var(--shadow-input-focus);
416
+ border-color: var(--color-brand);
417
+ background-color: var(--color-surface-alt);
405
418
  }
406
419
 
407
- .usage-daily-bar-stack {
408
- width: 100%;
409
- max-width: 40px;
410
- height: 160px;
411
- display: flex;
412
- align-items: flex-end;
413
- justify-content: center;
414
- gap: 4px;
420
+ .usage-daydetail-empty {
421
+ padding: 10px 0 2px;
422
+ font-size: 12px;
423
+ color: var(--color-text-secondary);
415
424
  }
416
425
 
417
- .usage-daily-bar {
418
- flex: 1;
419
- min-height: 4px;
420
- border-radius: 10px 10px 4px 4px;
421
- box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
426
+ .usage-daydetail-grid {
427
+ display: grid;
428
+ grid-template-columns: repeat(2, minmax(0, 1fr));
429
+ gap: 10px;
430
+ margin-top: 10px;
422
431
  }
423
432
 
424
- .usage-daily-bar-tokens {
425
- background: linear-gradient(180deg, rgba(199, 116, 98, 1) 0%, rgba(180, 94, 78, 1) 100%);
433
+ .usage-daydetail-metric {
434
+ border: 1px solid var(--color-border);
435
+ border-radius: 14px;
436
+ padding: 10px 12px;
437
+ background: var(--color-surface-alt);
426
438
  }
427
439
 
428
- .usage-daily-bar-cost {
429
- background: linear-gradient(180deg, rgba(139, 107, 214, 0.92) 0%, rgba(95, 72, 170, 0.98) 100%);
440
+ .usage-daydetail-label {
441
+ font-size: 12px;
442
+ color: var(--color-text-tertiary);
430
443
  }
431
444
 
432
- .usage-daily-table-wrap {
433
- margin-top: 12px;
434
- border-radius: 14px;
435
- border: 1px solid var(--color-border-soft);
436
- background: var(--color-surface-alt);
437
- overflow: auto;
445
+ .usage-daydetail-value {
446
+ margin-top: 4px;
447
+ font-size: 18px;
448
+ font-weight: 750;
449
+ color: var(--color-text-primary);
438
450
  }
439
451
 
440
- .usage-daily-table {
441
- width: 100%;
442
- border-collapse: collapse;
443
- min-width: 560px;
452
+ .usage-daydetail-sub {
453
+ margin-top: 6px;
454
+ font-size: 11px;
455
+ color: var(--color-text-tertiary);
456
+ line-height: 1.25;
444
457
  }
445
458
 
446
- .usage-daily-table th,
447
- .usage-daily-table td {
448
- padding: 10px 12px;
449
- border-bottom: 1px solid rgba(216, 201, 184, 0.22);
459
+ .usage-daydetail-section {
460
+ margin-top: 12px;
461
+ }
462
+
463
+ .usage-daydetail-section-title {
450
464
  font-size: 12px;
465
+ font-weight: 700;
451
466
  color: var(--color-text-secondary);
452
- white-space: nowrap;
467
+ margin-bottom: 8px;
453
468
  }
454
469
 
455
- .usage-daily-table thead th {
456
- position: sticky;
457
- top: 0;
458
- background: rgba(248, 243, 238, 0.92);
459
- backdrop-filter: blur(6px);
460
- font-weight: 700;
461
- color: var(--color-text-primary);
462
- z-index: 1;
470
+ .usage-daydetail-list {
471
+ display: grid;
472
+ gap: 8px;
463
473
  }
464
474
 
465
- .usage-daily-table tr:last-child td {
466
- border-bottom: none;
475
+ .usage-daydetail-row {
476
+ display: flex;
477
+ align-items: center;
478
+ justify-content: space-between;
479
+ gap: 10px;
480
+ padding: 8px 10px;
481
+ border-radius: 12px;
482
+ background: rgba(24, 24, 27, 0.02);
483
+ border: 1px solid rgba(24, 24, 27, 0.08);
467
484
  }
468
485
 
469
- .usage-daily-table .right {
470
- text-align: right;
486
+ .usage-daydetail-row-title {
487
+ flex: 1;
488
+ min-width: 0;
489
+ overflow: hidden;
490
+ text-overflow: ellipsis;
491
+ white-space: nowrap;
492
+ color: var(--color-text-primary);
493
+ font-size: 12px;
471
494
  }
472
495
 
473
- .usage-daily-table .mono {
474
- font-family: var(--font-family-mono);
475
- letter-spacing: -0.01em;
496
+ .usage-daydetail-row-meta {
497
+ flex-shrink: 0;
498
+ color: var(--color-text-tertiary);
499
+ font-size: 12px;
476
500
  }
477
501
 
478
- .usage-daily-note {
479
- margin-top: 10px;
480
- padding: 10px 12px;
481
- border-radius: 12px;
482
- background: rgba(255, 244, 220, 0.58);
483
- border: 1px solid rgba(216, 201, 184, 0.22);
484
- color: #7a5110;
502
+ .usage-daydetail-models {
503
+ display: flex;
504
+ flex-wrap: wrap;
505
+ gap: 6px;
506
+ }
507
+
508
+ .usage-daydetail-model {
485
509
  font-size: 12px;
486
- line-height: 1.45;
510
+ padding: 4px 8px;
511
+ border-radius: 999px;
512
+ background: rgba(24, 24, 27, 0.06);
513
+ color: var(--color-text-secondary);
514
+ }
515
+
516
+ @media (max-width: 900px) {
517
+ .usage-chart-grid {
518
+ grid-template-columns: 1fr;
519
+ }
487
520
  }
488
521
 
489
522
  .usage-bar.claude {
@@ -910,3 +943,98 @@
910
943
  align-items: stretch;
911
944
  }
912
945
  }
946
+
947
+ .usage-card-hourly-heatmap {
948
+ overflow-x: auto;
949
+ }
950
+
951
+ .hourly-heatmap-wrapper {
952
+ display: flex;
953
+ flex-direction: column;
954
+ gap: 2px;
955
+ margin-top: 8px;
956
+ min-width: 580px;
957
+ }
958
+
959
+ .hourly-heatmap-header {
960
+ display: flex;
961
+ gap: 2px;
962
+ align-items: flex-end;
963
+ }
964
+
965
+ .hourly-heatmap-corner {
966
+ width: 36px;
967
+ flex-shrink: 0;
968
+ }
969
+
970
+ .hourly-heatmap-hour-label {
971
+ flex: 1;
972
+ min-width: 0;
973
+ font-size: 10px;
974
+ color: var(--color-text-muted);
975
+ text-align: center;
976
+ line-height: 14px;
977
+ }
978
+
979
+ .hourly-heatmap-row {
980
+ display: flex;
981
+ gap: 2px;
982
+ align-items: center;
983
+ }
984
+
985
+ .hourly-heatmap-weekday-label {
986
+ width: 36px;
987
+ flex-shrink: 0;
988
+ font-size: 11px;
989
+ color: var(--color-text-secondary);
990
+ text-align: right;
991
+ padding-right: 4px;
992
+ }
993
+
994
+ .hourly-heatmap-cell {
995
+ flex: 1;
996
+ min-width: 0;
997
+ aspect-ratio: 1;
998
+ border-radius: 3px;
999
+ cursor: default;
1000
+ }
1001
+
1002
+ .hourly-heatmap-cell.level-0 {
1003
+ background: var(--color-surface-alt);
1004
+ }
1005
+
1006
+ .hourly-heatmap-cell.level-1 {
1007
+ background: var(--color-heatmap-1);
1008
+ }
1009
+
1010
+ .hourly-heatmap-cell.level-2 {
1011
+ background: var(--color-heatmap-2);
1012
+ }
1013
+
1014
+ .hourly-heatmap-cell.level-3 {
1015
+ background: var(--color-heatmap-3);
1016
+ }
1017
+
1018
+ .hourly-heatmap-cell.level-4 {
1019
+ background: var(--color-heatmap-4);
1020
+ }
1021
+
1022
+ .hourly-heatmap-legend {
1023
+ display: flex;
1024
+ align-items: center;
1025
+ gap: 3px;
1026
+ justify-content: flex-end;
1027
+ margin-top: 6px;
1028
+ font-size: 10px;
1029
+ color: var(--color-text-muted);
1030
+ }
1031
+
1032
+ .hourly-heatmap-legend .hourly-heatmap-cell {
1033
+ width: 12px;
1034
+ height: 12px;
1035
+ aspect-ratio: auto;
1036
+ }
1037
+
1038
+ .hourly-heatmap-legend-label {
1039
+ margin: 0 2px;
1040
+ }
@@ -147,6 +147,25 @@
147
147
  background: rgba(248, 243, 238, 0.6);
148
148
  }
149
149
 
150
+ .settings-retention-row {
151
+ display: flex;
152
+ align-items: center;
153
+ gap: 10px;
154
+ padding: 8px 10px;
155
+ border-radius: 12px;
156
+ border: 1px solid rgba(216, 201, 184, 0.4);
157
+ background: rgba(248, 243, 238, 0.6);
158
+ }
159
+
160
+ .settings-retention-input {
161
+ width: 72px;
162
+ padding: 4px 8px;
163
+ border: 1px solid rgba(216, 201, 184, 0.6);
164
+ border-radius: 8px;
165
+ font-size: 14px;
166
+ text-align: center;
167
+ }
168
+
150
169
  /* Re-balance action buttons inside cards */
151
170
  .settings-card .btn-tool {
152
171
  width: auto;