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.
- package/README.md +102 -86
- package/README.vi.md +105 -79
- package/README.zh.md +102 -84
- package/cli/analytics-export-args.js +7 -0
- package/cli/session-usage.js +4 -1
- package/cli.js +30 -6
- package/lib/data/model-prices.json +1868 -0
- package/lib/session-context-health.js +5 -1
- package/lib/session-evidence-collections.js +85 -0
- package/lib/session-features.js +15 -0
- package/lib/session-project-git.js +65 -0
- package/lib/session-projects.js +12 -1
- package/lib/session-stories.js +67 -0
- package/lib/session-usage-ledger.js +77 -0
- package/lib/session-usage-pricing.js +42 -0
- package/lib/session-usage-report.js +101 -0
- package/package.json +4 -1
- package/plugins/prompt-templates/computed.mjs +9 -0
- package/web-ui/app.js +12 -0
- package/web-ui/logic.codex.mjs +14 -0
- package/web-ui/logic.session-artifacts.mjs +39 -0
- package/web-ui/modules/app.methods.agents.mjs +3 -2
- package/web-ui/modules/app.methods.claude-config.mjs +26 -5
- package/web-ui/modules/app.methods.install.mjs +13 -17
- package/web-ui/modules/app.methods.navigation.mjs +1 -1
- package/web-ui/modules/app.methods.openclaw-editing.mjs +29 -0
- package/web-ui/modules/app.methods.openclaw-persist.mjs +3 -3
- package/web-ui/modules/app.methods.opencode-config.mjs +34 -0
- package/web-ui/modules/app.methods.pi-config.mjs +14 -9
- package/web-ui/modules/app.methods.providers.mjs +11 -0
- package/web-ui/modules/app.methods.session-browser.mjs +35 -0
- package/web-ui/modules/app.methods.session-trash.mjs +4 -5
- package/web-ui/modules/app.methods.startup-claude.mjs +1 -0
- package/web-ui/modules/app.methods.system-prompt.mjs +16 -7
- package/web-ui/modules/app.methods.web-ui-preferences.mjs +5 -0
- package/web-ui/modules/claude-provider-presets.mjs +23 -0
- package/web-ui/modules/i18n/locales/en.mjs +127 -1
- package/web-ui/modules/i18n/locales/ja.mjs +127 -1
- package/web-ui/modules/i18n/locales/vi.mjs +127 -1
- package/web-ui/modules/i18n/locales/zh-tw.mjs +127 -1
- package/web-ui/modules/i18n/locales/zh.mjs +127 -1
- package/web-ui/modules/pi-provider-templates.mjs +6 -1
- package/web-ui/modules/session-collections.mjs +65 -0
- package/web-ui/modules/session-evidence.mjs +81 -0
- package/web-ui/modules/session-features.mjs +15 -1
- package/web-ui/modules/session-git.mjs +39 -0
- package/web-ui/modules/session-stories.mjs +64 -0
- package/web-ui/modules/usage-pricing.mjs +30 -0
- package/web-ui/partials/index/layout-footer.html +1 -1
- package/web-ui/partials/index/modal-openclaw-config.html +3 -0
- package/web-ui/partials/index/modals-basic.html +1 -1
- package/web-ui/partials/index/modals-pi-provider.html +1 -1
- package/web-ui/partials/index/panel-config-claude.html +4 -21
- package/web-ui/partials/index/panel-config-codex.html +3 -1
- package/web-ui/partials/index/panel-config-opencode.html +4 -0
- package/web-ui/partials/index/panel-sessions.html +20 -20
- package/web-ui/partials/index/panel-settings.html +45 -0
- package/web-ui/partials/index/panel-usage.html +2 -0
- package/web-ui/partials/index/session-features.html +82 -2
- package/web-ui/partials/index/thread-handoff.html +73 -62
- package/web-ui/partials/index/usage-records.html +41 -0
- package/web-ui/res/web-ui-render.precompiled.js +896 -236
- package/web-ui/styles/session-features.css +63 -0
- package/web-ui/styles/sessions-list.css +74 -0
- package/web-ui/styles/sessions-preview.css +106 -68
- package/web-ui/styles/sessions-usage.css +8 -0
- package/web-ui/styles/settings-panel.css +4 -0
- 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>
|