codexmate 0.0.23 → 0.0.24

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 (55) hide show
  1. package/README.md +4 -3
  2. package/README.zh.md +4 -2
  3. package/cli/auth-profiles.js +23 -7
  4. package/cli/doctor-core.js +903 -0
  5. package/cli/import-skills-url.js +334 -0
  6. package/cli.js +304 -208
  7. package/lib/cli-models-utils.js +0 -40
  8. package/lib/cli-network-utils.js +28 -2
  9. package/package.json +5 -2
  10. package/plugins/README.md +20 -0
  11. package/plugins/README.zh-CN.md +20 -0
  12. package/plugins/prompt-templates/comment-polish/index.mjs +25 -0
  13. package/plugins/prompt-templates/computed.mjs +253 -0
  14. package/plugins/prompt-templates/index.mjs +8 -0
  15. package/plugins/prompt-templates/manifest.mjs +15 -0
  16. package/plugins/prompt-templates/methods.mjs +619 -0
  17. package/plugins/prompt-templates/overview.mjs +90 -0
  18. package/plugins/prompt-templates/ownership.mjs +19 -0
  19. package/plugins/prompt-templates/rule-ack/index.mjs +21 -0
  20. package/plugins/prompt-templates/storage.mjs +64 -0
  21. package/plugins/registry.mjs +16 -0
  22. package/res/logo-pack.webp +0 -0
  23. package/web-ui/app.js +15 -32
  24. package/web-ui/index.html +4 -3
  25. package/web-ui/modules/app.computed.dashboard.mjs +22 -22
  26. package/web-ui/modules/app.computed.main-tabs.mjs +3 -0
  27. package/web-ui/modules/app.methods.agents.mjs +91 -3
  28. package/web-ui/modules/app.methods.codex-config.mjs +153 -164
  29. package/web-ui/modules/app.methods.navigation.mjs +34 -1
  30. package/web-ui/modules/app.methods.runtime.mjs +24 -2
  31. package/web-ui/modules/app.methods.session-browser.mjs +9 -2
  32. package/web-ui/modules/config-mode.computed.mjs +1 -3
  33. package/web-ui/modules/i18n.dict.mjs +2039 -0
  34. package/web-ui/modules/i18n.mjs +2 -1769
  35. package/web-ui/partials/index/layout-header.html +36 -32
  36. package/web-ui/partials/index/modal-config-template-agents.html +3 -4
  37. package/web-ui/partials/index/modal-health-check.html +33 -60
  38. package/web-ui/partials/index/panel-config-claude.html +35 -15
  39. package/web-ui/partials/index/panel-config-codex.html +47 -19
  40. package/web-ui/partials/index/panel-config-openclaw.html +8 -3
  41. package/web-ui/partials/index/panel-dashboard.html +186 -0
  42. package/web-ui/partials/index/panel-docs.html +1 -1
  43. package/web-ui/partials/index/panel-market.html +3 -0
  44. package/web-ui/partials/index/panel-orchestration.html +3 -0
  45. package/web-ui/partials/index/panel-plugins.html +16 -10
  46. package/web-ui/partials/index/panel-sessions.html +4 -1
  47. package/web-ui/partials/index/panel-settings.html +1 -1
  48. package/web-ui/partials/index/panel-usage.html +2 -1
  49. package/web-ui/styles/controls-forms.css +9 -2
  50. package/web-ui/styles/dashboard.css +274 -0
  51. package/web-ui/styles/layout-shell.css +2 -2
  52. package/web-ui/styles/sessions-list.css +3 -3
  53. package/web-ui/styles/sessions-usage.css +9 -0
  54. package/web-ui/styles.css +1 -0
  55. package/res/logo.png +0 -0
package/README.md CHANGED
@@ -60,9 +60,11 @@ It works on local files directly and does not require cloud hosting. The skills
60
60
  - Unified Codex + Claude session list
61
61
  - Local session pinning with persistent pinned state and pinned-first ordering
62
62
  - Keyword/source/cwd filters
63
+ - Fast search UX: short-lived query result caching to avoid rescanning on each keystroke
63
64
  - Usage subview with 7d / 30d session trends, message trends, source share, and top paths
64
65
  - Markdown export
65
- - Session-level and message-level delete (supports batch)
66
+ - Session-level and message-level delete (supports batch), with a local recycle bin for restore/purge
67
+ - Large-session preview optimization (fast tail preview path)
66
68
 
67
69
  **Skills Market**
68
70
  - Switch the skills install target between Codex and Claude Code
@@ -190,7 +192,7 @@ npm run reset
190
192
  npm run reset 79
191
193
  ```
192
194
 
193
- - `npm run reset`: prompt for a PR number; leave it blank to return to default `origin/main`
195
+ - `npm run reset`: reset to default `origin/main`
194
196
  - `npm run reset 79`: sync directly to the latest head snapshot of PR `#79`
195
197
  - The script also handles local branch switching, workspace cleanup, untracked file cleanup, and final state validation
196
198
 
@@ -206,7 +208,6 @@ npm run reset 79
206
208
  | `codexmate delete <name>` | Delete provider |
207
209
  | `codexmate claude <BaseURL> <API_KEY> [model]` | Write Claude Code config |
208
210
  | `codexmate auth <list\|import\|switch\|delete\|status>` | Auth profile management |
209
- | `codexmate proxy <status\|set\|apply\|enable\|start\|stop>` | Built-in proxy management |
210
211
  | `codexmate workflow <list\|get\|validate\|run\|runs>` | MCP workflow management |
211
212
  | `codexmate codex [args...] [--follow-up <text> repeatable]` | Codex CLI passthrough entrypoint (auto-adds `--yolo`, supports queued follow-up appends) |
212
213
  | `codexmate qwen [args...]` | Qwen CLI passthrough entrypoint |
package/README.zh.md CHANGED
@@ -61,9 +61,11 @@ Codex Mate 提供一套本地优先的 CLI + Web UI,用于统一管理:
61
61
  - 同页查看 Codex 与 Claude 会话
62
62
  - 支持本地会话置顶,置顶状态持久化保存并优先排序显示
63
63
  - 关键词搜索、来源筛选、cwd 路径筛选
64
+ - 搜索体验优化:短周期结果缓存,避免输入时重复扫描
64
65
  - Usage 子页:近 7 天 / 近 30 天会话趋势、消息趋势、来源占比、高频路径
65
66
  - 会话导出 Markdown
66
- - 会话与消息级删除(支持批量)
67
+ - 会话与消息级删除(支持批量),并提供本地回收站用于恢复/彻底删除
68
+ - 大会话预览优化(快速 tail 预览路径)
67
69
 
68
70
  **Skills 市场**
69
71
  - 在 Codex 与 Claude Code 之间切换 skills 安装目标
@@ -193,7 +195,7 @@ npm run reset
193
195
  npm run reset 79
194
196
  ```
195
197
 
196
- - `npm run reset`:交互输入 PR 编号;留空则回到默认 `origin/main`
198
+ - `npm run reset`:直接重置到默认 `origin/main`
197
199
  - `npm run reset 79`:直接同步到 PR `#79` 的最新 head 快照
198
200
  - 脚本会自动完成本地分支切换、工作区清理、未跟踪文件清理与最终状态校验
199
201
 
@@ -28,12 +28,17 @@ function createAuthProfileController(deps = {}) {
28
28
  function normalizeAuthProfileName(value) {
29
29
  const raw = typeof value === 'string' ? value.trim() : '';
30
30
  if (!raw) return '';
31
- const sanitized = raw
31
+ return raw.slice(0, 120);
32
+ }
33
+
34
+ function sanitizeAuthProfileFileStem(value) {
35
+ const raw = typeof value === 'string' ? value.trim() : '';
36
+ if (!raw) return '';
37
+ return raw
32
38
  .replace(/[\\/:*?"<>|]/g, '-')
33
39
  .replace(/\s+/g, '-')
34
40
  .replace(/^-+|-+$/g, '')
35
41
  .slice(0, 120);
36
- return sanitized;
37
42
  }
38
43
 
39
44
  function normalizeAuthRegistry(raw) {
@@ -46,7 +51,7 @@ function createAuthProfileController(deps = {}) {
46
51
  version: 1,
47
52
  current: typeof raw.current === 'string' ? raw.current.trim() : '',
48
53
  items: items.map((item) => ({
49
- name: normalizeAuthProfileName(item.name) || item.name.trim(),
54
+ name: item.name.trim(),
50
55
  fileName: typeof item.fileName === 'string' ? path.basename(item.fileName) : '',
51
56
  type: typeof item.type === 'string' ? item.type : '',
52
57
  email: typeof item.email === 'string' ? item.email : '',
@@ -135,13 +140,24 @@ function createAuthProfileController(deps = {}) {
135
140
  const sourceFile = typeof options.sourceFile === 'string' ? options.sourceFile : '';
136
141
  const preferredName = normalizeAuthProfileName(options.name || '');
137
142
  const profileName = preferredName || getAuthProfileNameFallback(safePayload, sourceFile);
138
- const fileName = `${profileName}.json`;
139
- const profilePath = path.join(AUTH_PROFILES_DIR, fileName);
143
+ let fileStem = sanitizeAuthProfileFileStem(profileName) || sanitizeAuthProfileFileStem(sourceFile) || `auth-${Date.now()}`;
144
+
145
+ const registry = readAuthRegistry();
146
+ const existed = registry.items.find((item) => item && item.name === profileName);
147
+ if (existed && existed.fileName) {
148
+ fileStem = path.basename(existed.fileName, path.extname(existed.fileName));
149
+ }
150
+
151
+ let fileName = `${fileStem}.json`;
152
+ let profilePath = path.join(AUTH_PROFILES_DIR, fileName);
153
+ if (!existed && fs.existsSync(profilePath)) {
154
+ fileStem = `${fileStem}-${Date.now().toString(16).slice(-6)}`;
155
+ fileName = `${fileStem}.json`;
156
+ profilePath = path.join(AUTH_PROFILES_DIR, fileName);
157
+ }
140
158
 
141
159
  ensureDir(AUTH_PROFILES_DIR);
142
160
  writeJsonAtomic(profilePath, safePayload);
143
-
144
- const registry = readAuthRegistry();
145
161
  const meta = buildAuthProfileSummary(profileName, safePayload, fileName);
146
162
  meta.importedAt = toIsoTime(Date.now());
147
163
  meta.sourceFile = sourceFile || '';