codexmate 0.1.25 → 0.1.28
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/config-bootstrap.js +2 -9
- package/cli/session-usage.js +10 -4
- package/cli.js +772 -225
- package/lib/cli-sessions.js +1 -1
- package/package.json +3 -3
- package/tools/dev/launch.js +147 -0
- package/web-ui/app.js +17 -3
- package/web-ui/index.html +12 -1
- package/web-ui/logic.prompts-token-count.mjs +49 -0
- package/web-ui/logic.sessions.mjs +30 -15
- package/web-ui/modules/app.computed.dashboard.mjs +1 -0
- package/web-ui/modules/app.computed.prompts.mjs +18 -0
- package/web-ui/modules/app.computed.session.mjs +3 -1
- package/web-ui/modules/app.methods.index.mjs +2 -0
- package/web-ui/modules/app.methods.session-actions.mjs +10 -4
- package/web-ui/modules/app.methods.session-browser.mjs +34 -45
- package/web-ui/modules/app.methods.session-timeline.mjs +1 -0
- package/web-ui/modules/app.methods.theme.mjs +38 -0
- package/web-ui/modules/app.methods.web-ui-preferences.mjs +9 -0
- package/web-ui/modules/i18n/locales/en.mjs +15 -2
- package/web-ui/modules/i18n/locales/ja.mjs +15 -2
- package/web-ui/modules/i18n/locales/vi.mjs +15 -2
- package/web-ui/modules/i18n/locales/zh-tw.mjs +15 -2
- package/web-ui/modules/i18n/locales/zh.mjs +15 -2
- package/web-ui/partials/index/layout-header.html +4 -2
- package/web-ui/partials/index/panel-prompts.html +14 -0
- package/web-ui/partials/index/panel-sessions.html +21 -6
- package/web-ui/partials/index/panel-settings.html +24 -0
- package/web-ui/res/web-ui-render.precompiled.js +115 -23
- package/web-ui/session-helpers.mjs +1 -1
- package/web-ui/styles/base-theme.css +25 -0
- package/web-ui/styles/controls-forms.css +1 -1
- package/web-ui/styles/modals-core.css +48 -0
- package/web-ui/styles/sessions-list.css +1 -1
- package/web-ui/styles/sessions-preview.css +56 -7
- package/web-ui/styles/sessions-toolbar-trash.css +2 -8
- package/web-ui/styles/sessions-usage.css +1 -1
- package/web-ui/styles/settings-panel.css +2 -2
- package/web-ui/styles/theme-dark-tokens.css +83 -0
- package/web-ui/styles/theme-dark.css +1355 -0
- package/web-ui/styles.css +1 -0
package/cli/config-bootstrap.js
CHANGED
|
@@ -17,10 +17,8 @@ function createConfigBootstrapController(deps = {}) {
|
|
|
17
17
|
writeModels,
|
|
18
18
|
readCurrentModels,
|
|
19
19
|
writeCurrentModels,
|
|
20
|
-
updateAuthJson,
|
|
21
20
|
CONFIG_DIR,
|
|
22
21
|
CONFIG_FILE,
|
|
23
|
-
AUTH_FILE,
|
|
24
22
|
MODELS_FILE,
|
|
25
23
|
RECENT_CONFIGS_FILE,
|
|
26
24
|
INIT_MARK_FILE,
|
|
@@ -49,10 +47,8 @@ function createConfigBootstrapController(deps = {}) {
|
|
|
49
47
|
if (typeof writeModels !== 'function') throw new Error('createConfigBootstrapController 缺少 writeModels');
|
|
50
48
|
if (typeof readCurrentModels !== 'function') throw new Error('createConfigBootstrapController 缺少 readCurrentModels');
|
|
51
49
|
if (typeof writeCurrentModels !== 'function') throw new Error('createConfigBootstrapController 缺少 writeCurrentModels');
|
|
52
|
-
if (typeof updateAuthJson !== 'function') throw new Error('createConfigBootstrapController 缺少 updateAuthJson');
|
|
53
50
|
if (!CONFIG_DIR) throw new Error('createConfigBootstrapController 缺少 CONFIG_DIR');
|
|
54
51
|
if (!CONFIG_FILE) throw new Error('createConfigBootstrapController 缺少 CONFIG_FILE');
|
|
55
|
-
if (!AUTH_FILE) throw new Error('createConfigBootstrapController 缺少 AUTH_FILE');
|
|
56
52
|
if (!MODELS_FILE) throw new Error('createConfigBootstrapController 缺少 MODELS_FILE');
|
|
57
53
|
if (!RECENT_CONFIGS_FILE) throw new Error('createConfigBootstrapController 缺少 RECENT_CONFIGS_FILE');
|
|
58
54
|
if (!INIT_MARK_FILE) throw new Error('createConfigBootstrapController 缺少 INIT_MARK_FILE');
|
|
@@ -131,6 +127,7 @@ base_url = "http://127.0.0.1:3737/bridge/local/v1"
|
|
|
131
127
|
wire_api = "responses"
|
|
132
128
|
requires_openai_auth = true
|
|
133
129
|
preferred_auth_method = "codexmate"
|
|
130
|
+
experimental_bearer_token = "codexmate"
|
|
134
131
|
codexmate_bridge = "local"
|
|
135
132
|
request_max_retries = 4
|
|
136
133
|
stream_max_retries = 10
|
|
@@ -181,7 +178,7 @@ stream_idle_timeout_ms = 300000
|
|
|
181
178
|
// Check if [model_providers.local] section already exists
|
|
182
179
|
if (/\[model_providers\.local\]/.test(content)) return;
|
|
183
180
|
|
|
184
|
-
const localSection = `\n[model_providers.local]\nname = "local"\nbase_url = "http://127.0.0.1:3737/bridge/local/v1"\nwire_api = "responses"\nrequires_openai_auth = true\npreferred_auth_method = "codexmate"\ncodexmate_bridge = "local"\nrequest_max_retries = 4\nstream_max_retries = 10\nstream_idle_timeout_ms = 300000\n`;
|
|
181
|
+
const localSection = `\n[model_providers.local]\nname = "local"\nbase_url = "http://127.0.0.1:3737/bridge/local/v1"\nwire_api = "responses"\nrequires_openai_auth = true\npreferred_auth_method = "codexmate"\nexperimental_bearer_token = "codexmate"\ncodexmate_bridge = "local"\nrequest_max_retries = 4\nstream_max_retries = 10\nstream_idle_timeout_ms = 300000\n`;
|
|
185
182
|
fs.appendFileSync(CONFIG_FILE, localSection, 'utf-8');
|
|
186
183
|
}
|
|
187
184
|
|
|
@@ -263,10 +260,6 @@ stream_idle_timeout_ms = 300000
|
|
|
263
260
|
currentModels[defaultProvider] = defaultModel;
|
|
264
261
|
writeCurrentModels(currentModels);
|
|
265
262
|
}
|
|
266
|
-
|
|
267
|
-
if (!fs.existsSync(AUTH_FILE)) {
|
|
268
|
-
updateAuthJson('');
|
|
269
|
-
}
|
|
270
263
|
}
|
|
271
264
|
|
|
272
265
|
function writeInitMark(payload) {
|
package/cli/session-usage.js
CHANGED
|
@@ -8,13 +8,14 @@ async function listSessionUsageCore(params = {}, deps = {}) {
|
|
|
8
8
|
parseCodexSessionSummary,
|
|
9
9
|
parseClaudeSessionSummary,
|
|
10
10
|
parseCodeBuddySessionSummary,
|
|
11
|
+
parseWorkBuddySessionSummary,
|
|
11
12
|
parseGeminiSessionSummary,
|
|
12
13
|
parsePiSessionSummary,
|
|
13
14
|
MAX_SESSION_USAGE_LIST_SIZE,
|
|
14
15
|
SESSION_BROWSE_SUMMARY_READ_BYTES
|
|
15
16
|
} = deps;
|
|
16
17
|
|
|
17
|
-
const source = params.source === 'codex' || params.source === 'claude' || params.source === 'gemini' || params.source === 'codebuddy' || params.source === 'pi'
|
|
18
|
+
const source = params.source === 'codex' || params.source === 'claude' || params.source === 'gemini' || params.source === 'codebuddy' || params.source === 'workbuddy' || params.source === 'pi' || params.source === 'opencode'
|
|
18
19
|
? params.source
|
|
19
20
|
: 'all';
|
|
20
21
|
const rawLimit = Number(params.limit);
|
|
@@ -62,6 +63,9 @@ async function listSessionUsageCore(params = {}, deps = {}) {
|
|
|
62
63
|
return normalized;
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
if (normalized.source === 'opencode') {
|
|
67
|
+
return normalized;
|
|
68
|
+
}
|
|
65
69
|
const filePath = typeof normalized.filePath === 'string' ? normalized.filePath.trim() : '';
|
|
66
70
|
if (!filePath) {
|
|
67
71
|
return null;
|
|
@@ -88,9 +92,11 @@ async function listSessionUsageCore(params = {}, deps = {}) {
|
|
|
88
92
|
? parseGeminiSessionSummary(filePath, summaryOptions)
|
|
89
93
|
: (normalized.source === 'codebuddy'
|
|
90
94
|
? parseCodeBuddySessionSummary(filePath, summaryOptions)
|
|
91
|
-
: (normalized.source === '
|
|
92
|
-
?
|
|
93
|
-
:
|
|
95
|
+
: (normalized.source === 'workbuddy'
|
|
96
|
+
? parseWorkBuddySessionSummary(filePath, summaryOptions)
|
|
97
|
+
: (normalized.source === 'pi'
|
|
98
|
+
? parsePiSessionSummary(filePath, summaryOptions)
|
|
99
|
+
: parseCodexSessionSummary(filePath, summaryOptions)))));
|
|
94
100
|
} catch (_) {
|
|
95
101
|
summary = null;
|
|
96
102
|
}
|