@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.
- package/dist/ui/execution-log.js +4 -4
- package/package.json +1 -1
package/dist/ui/execution-log.js
CHANGED
|
@@ -107,11 +107,11 @@ function normalizeLogStatus(status) {
|
|
|
107
107
|
return status;
|
|
108
108
|
}
|
|
109
109
|
function shortenLogTitle(title) {
|
|
110
|
-
|
|
110
|
+
let text = title.trim();
|
|
111
111
|
const file = /^(?:Read file|List files in) ['"](.+)['"]$/i.exec(text);
|
|
112
|
-
if (file)
|
|
113
|
-
if (/^Search for ['"]/i.test(text))
|
|
114
|
-
if (/^(?:python\d*|node|bash|sh|zsh)\s/i.test(text))
|
|
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
|
}
|