@eworkbase/sdk 0.4.1 → 0.4.2

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.
@@ -107,11 +107,11 @@ function normalizeLogStatus(status) {
107
107
  return status;
108
108
  }
109
109
  function shortenLogTitle(title) {
110
- const text = title.trim();
110
+ let text = title.trim();
111
111
  const file = /^(?:Read file|List files in) ['"](.+)['"]$/i.exec(text);
112
- if (file) return (/^Read/i.test(text) ? "读取文件:" : "列出文件:") + file[1].split(/[\\/]/).filter(Boolean).at(-1);
113
- if (/^Search for ['"]/i.test(text)) return "搜索内容";
114
- if (/^(?:python\d*|node|bash|sh|zsh)\s/i.test(text)) return "执行命令:" + text.split(/\s/, 1)[0];
112
+ if (file) text = (/^Read/i.test(text) ? "读取文件:" : "列出文件:") + file[1].split(/[\\/]/).filter(Boolean).at(-1);
113
+ if (/^Search for ['"]/i.test(text)) text = text.replace(/^Search for\s+/i, "搜索内容:");
114
+ if (/^(?:python\d*|node|bash|sh|zsh)\s/i.test(text)) text = "执行命令:" + text;
115
115
  const firstLine = text.split(/\r?\n/, 1)[0];
116
116
  return firstLine.length > LOG_TITLE_LIMIT ? firstLine.slice(0, LOG_TITLE_LIMIT) + "…" : firstLine || "执行记录";
117
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eworkbase/sdk",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./markdown": {