codexmate 0.0.37 → 0.0.39
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/cli/analytics-export-args.js +68 -0
- package/cli/builtin-proxy.js +626 -207
- package/cli/openai-bridge.js +541 -210
- package/cli/session-usage.js +187 -1
- package/cli.js +84 -2
- package/package.json +1 -1
- package/web-ui/app.js +12 -3
- package/web-ui/modules/app.computed.main-tabs.mjs +37 -30
- package/web-ui/modules/app.methods.claude-config.mjs +111 -9
- package/web-ui/modules/app.methods.openclaw-editing.mjs +48 -0
- package/web-ui/modules/app.methods.openclaw-persist.mjs +13 -7
- package/web-ui/modules/app.methods.providers.mjs +36 -10
- package/web-ui/modules/app.methods.runtime.mjs +76 -1
- package/web-ui/modules/app.methods.startup-claude.mjs +1 -0
- package/web-ui/modules/config-mode.computed.mjs +3 -3
- package/web-ui/modules/i18n.dict.mjs +13 -0
- package/web-ui/modules/i18n.mjs +65 -16
- package/web-ui/modules/skills.methods.mjs +1 -1
- package/web-ui/partials/index/layout-header.html +16 -46
- package/web-ui/partials/index/modal-openclaw-config.html +135 -71
- package/web-ui/partials/index/modal-webhook.html +8 -8
- package/web-ui/partials/index/modals-basic.html +56 -16
- package/web-ui/partials/index/panel-config-claude.html +20 -20
- package/web-ui/partials/index/panel-config-codex.html +5 -5
- package/web-ui/partials/index/panel-config-openclaw.html +70 -64
- package/web-ui/partials/index/panel-dashboard.html +62 -77
- package/web-ui/partials/index/panel-settings.html +28 -7
- package/web-ui/partials/index/panel-trash.html +14 -14
- package/web-ui/res/web-ui-render.precompiled.js +846 -539
- package/web-ui/styles/controls-forms.css +6 -0
- package/web-ui/styles/dashboard.css +46 -14
- package/web-ui/styles/layout-shell.css +45 -0
- package/web-ui/styles/navigation-panels.css +3 -3
- package/web-ui/styles/openclaw-structured.css +383 -33
- package/web-ui/styles/responsive.css +68 -0
- package/web-ui/styles/sessions-usage.css +105 -9
- package/web-ui/styles/settings-panel.css +4 -0
- package/web-ui/partials/index/panel-config-codex.html.bak +0 -337
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function parseAnalyticsExportArgs(args = []) {
|
|
2
|
+
const options = {
|
|
3
|
+
format: 'csv',
|
|
4
|
+
source: 'all',
|
|
5
|
+
output: ''
|
|
6
|
+
};
|
|
7
|
+
const errors = [];
|
|
8
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
9
|
+
const token = String(args[index] || '');
|
|
10
|
+
const readValue = (flag) => {
|
|
11
|
+
if (token.startsWith(`${flag}=`)) {
|
|
12
|
+
return token.slice(flag.length + 1);
|
|
13
|
+
}
|
|
14
|
+
const value = args[index + 1];
|
|
15
|
+
index += 1;
|
|
16
|
+
return value;
|
|
17
|
+
};
|
|
18
|
+
if (token === '--format' || token.startsWith('--format=')) {
|
|
19
|
+
options.format = String(readValue('--format') || '').trim().toLowerCase();
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (token === '--from' || token.startsWith('--from=')) {
|
|
23
|
+
options.from = String(readValue('--from') || '').trim();
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (token === '--to' || token.startsWith('--to=')) {
|
|
27
|
+
options.to = String(readValue('--to') || '').trim();
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (token === '--model' || token.startsWith('--model=')) {
|
|
31
|
+
options.model = String(readValue('--model') || '').trim();
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (token === '--source' || token.startsWith('--source=')) {
|
|
35
|
+
options.source = String(readValue('--source') || '').trim().toLowerCase();
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (token === '--output' || token === '-o' || token.startsWith('--output=')) {
|
|
39
|
+
options.output = String(readValue(token === '-o' ? '-o' : '--output') || '').trim();
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (token === '--force-refresh') {
|
|
43
|
+
options.forceRefresh = true;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (token === '--help' || token === '-h') {
|
|
47
|
+
options.help = true;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (token) {
|
|
51
|
+
errors.push(`未知参数 ${token}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (options.format !== 'csv' && options.format !== 'json') {
|
|
55
|
+
errors.push('--format 必须是 csv 或 json');
|
|
56
|
+
}
|
|
57
|
+
if (options.source && !['codex', 'claude', 'gemini', 'codebuddy', 'all'].includes(options.source)) {
|
|
58
|
+
errors.push('--source 必须是 codex、claude、gemini、codebuddy 或 all');
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
options,
|
|
62
|
+
error: errors.join(';')
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
module.exports = {
|
|
67
|
+
parseAnalyticsExportArgs
|
|
68
|
+
};
|