codexmate 0.1.34 → 0.1.36

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 (68) hide show
  1. package/README.md +102 -86
  2. package/README.vi.md +105 -79
  3. package/README.zh.md +102 -84
  4. package/cli/analytics-export-args.js +7 -0
  5. package/cli/session-usage.js +4 -1
  6. package/cli.js +30 -6
  7. package/lib/data/model-prices.json +1868 -0
  8. package/lib/session-context-health.js +5 -1
  9. package/lib/session-evidence-collections.js +85 -0
  10. package/lib/session-features.js +15 -0
  11. package/lib/session-project-git.js +65 -0
  12. package/lib/session-projects.js +12 -1
  13. package/lib/session-stories.js +67 -0
  14. package/lib/session-usage-ledger.js +77 -0
  15. package/lib/session-usage-pricing.js +42 -0
  16. package/lib/session-usage-report.js +101 -0
  17. package/package.json +4 -1
  18. package/plugins/prompt-templates/computed.mjs +9 -0
  19. package/web-ui/app.js +12 -0
  20. package/web-ui/logic.codex.mjs +14 -0
  21. package/web-ui/logic.session-artifacts.mjs +39 -0
  22. package/web-ui/modules/app.methods.agents.mjs +3 -2
  23. package/web-ui/modules/app.methods.claude-config.mjs +26 -5
  24. package/web-ui/modules/app.methods.install.mjs +13 -17
  25. package/web-ui/modules/app.methods.navigation.mjs +1 -1
  26. package/web-ui/modules/app.methods.openclaw-editing.mjs +29 -0
  27. package/web-ui/modules/app.methods.openclaw-persist.mjs +3 -3
  28. package/web-ui/modules/app.methods.opencode-config.mjs +34 -0
  29. package/web-ui/modules/app.methods.pi-config.mjs +14 -9
  30. package/web-ui/modules/app.methods.providers.mjs +11 -0
  31. package/web-ui/modules/app.methods.session-browser.mjs +35 -0
  32. package/web-ui/modules/app.methods.session-trash.mjs +4 -5
  33. package/web-ui/modules/app.methods.startup-claude.mjs +1 -0
  34. package/web-ui/modules/app.methods.system-prompt.mjs +16 -7
  35. package/web-ui/modules/app.methods.web-ui-preferences.mjs +5 -0
  36. package/web-ui/modules/claude-provider-presets.mjs +23 -0
  37. package/web-ui/modules/i18n/locales/en.mjs +127 -1
  38. package/web-ui/modules/i18n/locales/ja.mjs +127 -1
  39. package/web-ui/modules/i18n/locales/vi.mjs +127 -1
  40. package/web-ui/modules/i18n/locales/zh-tw.mjs +127 -1
  41. package/web-ui/modules/i18n/locales/zh.mjs +127 -1
  42. package/web-ui/modules/pi-provider-templates.mjs +6 -1
  43. package/web-ui/modules/session-collections.mjs +65 -0
  44. package/web-ui/modules/session-evidence.mjs +81 -0
  45. package/web-ui/modules/session-features.mjs +15 -1
  46. package/web-ui/modules/session-git.mjs +39 -0
  47. package/web-ui/modules/session-stories.mjs +64 -0
  48. package/web-ui/modules/usage-pricing.mjs +30 -0
  49. package/web-ui/partials/index/layout-footer.html +1 -1
  50. package/web-ui/partials/index/modal-openclaw-config.html +3 -0
  51. package/web-ui/partials/index/modals-basic.html +1 -1
  52. package/web-ui/partials/index/modals-pi-provider.html +1 -1
  53. package/web-ui/partials/index/panel-config-claude.html +4 -21
  54. package/web-ui/partials/index/panel-config-codex.html +3 -1
  55. package/web-ui/partials/index/panel-config-opencode.html +4 -0
  56. package/web-ui/partials/index/panel-sessions.html +20 -20
  57. package/web-ui/partials/index/panel-settings.html +45 -0
  58. package/web-ui/partials/index/panel-usage.html +2 -0
  59. package/web-ui/partials/index/session-features.html +82 -2
  60. package/web-ui/partials/index/thread-handoff.html +73 -62
  61. package/web-ui/partials/index/usage-records.html +41 -0
  62. package/web-ui/res/web-ui-render.precompiled.js +896 -236
  63. package/web-ui/styles/session-features.css +63 -0
  64. package/web-ui/styles/sessions-list.css +74 -0
  65. package/web-ui/styles/sessions-preview.css +106 -68
  66. package/web-ui/styles/sessions-usage.css +8 -0
  67. package/web-ui/styles/settings-panel.css +4 -0
  68. package/web-ui/styles/theme-violet.css +9 -3
@@ -0,0 +1,41 @@
1
+ <details class="usage-card usage-records" id="usage-records-report" @toggle="toggleUsageRecords($event)">
2
+ <summary>{{ t('usage.records.title') }}</summary>
3
+ <p class="usage-list-meta">{{ t('usage.records.scope') }}</p>
4
+ <p v-if="usageRecordsLoading" role="status">{{ t('usage.loading') }}</p>
5
+ <p v-if="usageRecordsError" role="alert">{{ usageRecordsError }}</p>
6
+ <template v-if="usageRecords">
7
+ <p class="usage-list-meta">{{ t('usage.records.coverage', { scanned: usageRecords.summary.scannedSessions, candidates: usageRecords.summary.candidateSessions, unreported: usageRecords.summary.unreportedSessions, unsupported: usageRecords.summary.unsupportedSessions }) }}</p>
8
+ <p v-if="usageRecords.summary.failedSessions.length" role="alert">{{ t('usage.records.failed', { count: usageRecords.summary.failedSessions.length }) }}</p>
9
+ <div class="usage-kpi-grid">
10
+ <div class="usage-kpi-card"><div class="usage-kpi-label">{{ t('usage.records.total') }}</div><div class="usage-kpi-value">{{ formatUsageRecordCount(usageRecords.summary.totalTokens) }}</div></div>
11
+ <div class="usage-kpi-card"><div class="usage-kpi-label">{{ t('usage.records.estimated') }}</div><div class="usage-kpi-value">{{ formatUsageRecordCount(usageRecords.summary.estimatedTextTokens) }}</div></div>
12
+ <div class="usage-kpi-card"><div class="usage-kpi-label">{{ t('usage.records.cacheRead') }}</div><div class="usage-kpi-value">{{ formatUsageRecordCount(usageRecords.summary.cachedInputTokens) }}</div></div>
13
+ <div class="usage-kpi-card"><div class="usage-kpi-label">{{ t('usage.records.cacheWrite') }}</div><div class="usage-kpi-value">{{ formatUsageRecordCount(usageRecords.summary.cacheCreationInputTokens) }}</div></div>
14
+ </div>
15
+ <p v-if="usageRecords.summary.undatedTokens" class="usage-list-meta">{{ t('usage.records.undated', { tokens: usageRecords.summary.undatedTokens }) }}</p>
16
+ <div class="usage-records-table">
17
+ <table>
18
+ <thead><tr><th>{{ t('usage.records.date') }}</th><th>{{ t('usage.records.source') }}</th><th>{{ t('usage.records.model') }}</th><th>{{ t('usage.records.input') }}</th><th>{{ t('usage.records.cacheRead') }}</th><th>{{ t('usage.records.cacheWrite') }}</th><th>{{ t('usage.records.output') }}</th><th>{{ t('usage.records.total') }}</th></tr></thead>
19
+ <tbody><tr v-for="row in usageRecords.rows" :key="row.date + ':' + row.source + ':' + row.model"><td>{{ row.date || t('usage.records.unknown') }}</td><td>{{ row.source }}</td><td>{{ row.model }}</td><td>{{ formatUsageRecordCount(row.inputTokens) }}</td><td>{{ formatUsageRecordCount(row.cachedInputTokens) }}</td><td>{{ formatUsageRecordCount(row.cacheCreationInputTokens) }}</td><td>{{ formatUsageRecordCount(row.outputTokens) }}</td><td>{{ formatUsageRecordCount(row.totalTokens) }}</td></tr></tbody>
20
+ </table>
21
+ </div>
22
+ <p v-if="!usageRecords.rows.length">{{ t('usage.empty') }}</p>
23
+ </template>
24
+ <button v-if="!usageRecordsLoading" type="button" class="btn-mini" @click="loadUsageRecords({ forceRefresh: true })">{{ t('usage.refresh') }}</button>
25
+ </details>
26
+
27
+ <details class="usage-card usage-pricing" id="usage-price-reference" @toggle="toggleUsagePricing($event)">
28
+ <summary>{{ t('pricing.title') }}</summary>
29
+ <p class="usage-list-meta">{{ t('pricing.scope') }}</p>
30
+ <p v-if="usagePricingBusy" role="status">{{ t('usage.loading') }}</p>
31
+ <p v-if="usagePricingError" role="alert">{{ usagePricingError }}</p>
32
+ <template v-if="usagePricing">
33
+ <p class="usage-price-total">{{ t('pricing.total') }}: {{ formatPriceUsd(usagePricing.summary.estimatedUsd) }}</p>
34
+ <p class="usage-list-meta">{{ t('pricing.coverage', { known: usagePricing.summary.pricedRows, unknown: usagePricing.summary.unknownRows, failed: usagePricing.summary.failedSessions, unreported: usagePricing.summary.unreportedSessions, unsupported: usagePricing.summary.unsupportedSessions }) }} · {{ t('pricing.subtotal') }}: {{ formatPriceUsd(usagePricing.summary.knownSubtotalUsd) }}</p>
35
+ <p class="usage-list-meta"><a :href="usagePricing.priceSource.repository" target="_blank" rel="noopener noreferrer">Wei-Shaw/model-price-repo</a> · {{ usagePricing.priceSource.sourceUpdatedAt }} · <code>{{ usagePricing.priceSource.commit.slice(0, 12) }}</code></p>
36
+ <div class="usage-records-table"><table><thead><tr><th>{{ t('usage.records.date') }}</th><th>{{ t('usage.records.source') }}</th><th>{{ t('usage.records.model') }}</th><th>{{ t('pricing.total') }}</th><th>{{ t('pricing.basis') }}</th></tr></thead><tbody><tr v-for="row in usagePricing.rows" :key="row.date + ':' + row.source + ':' + row.model"><td>{{ row.date || t('usage.records.unknown') }}</td><td>{{ row.source }}</td><td>{{ row.model }}</td><td>{{ formatPriceUsd(row.estimatedUsd) }}</td><td>{{ t('pricing.reason.' + row.reason) }}<span v-if="row.rates" class="usage-price-rates">{{ t('pricing.rates', { input: formatTokenRate(row.rates.input_cost_per_token), output: formatTokenRate(row.rates.output_cost_per_token), cached: formatTokenRate(row.rates.cache_read_input_token_cost), created: formatTokenRate(row.rates.cache_creation_input_token_cost) }) }}</span></td></tr></tbody></table></div>
37
+ <p v-if="!usagePricing.rows.length">{{ t('usage.empty') }}</p>
38
+ <button type="button" class="btn-mini" @click="downloadUsagePricing">{{ t('pricing.download') }}</button>
39
+ </template>
40
+ <button type="button" class="btn-mini" @click="loadUsagePricing" :disabled="usagePricingBusy">{{ t('usage.refresh') }}</button>
41
+ </details>