@aiyiran/myclaw 1.1.186 → 1.1.188
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.
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
var cachedData = null;
|
|
32
32
|
var pollTimer = null;
|
|
33
33
|
var lastKnownClawName = null; // 统一从 /api/config 读取并缓存(本地与远程一致)
|
|
34
|
+
var lastKnownOpenclawRoot = null; // .openclaw 根目录绝对路径,从 /api/config 读取
|
|
34
35
|
var _preloadCache = {}; // url → Image 对象,防止重复预加载
|
|
35
36
|
var showHiddenArtifacts = false; // 是否显示被过滤掉的系统/模板内部文件
|
|
36
37
|
var MYCLAW_API_PORT = 18800;
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
})
|
|
75
76
|
.then(function (data) {
|
|
76
77
|
lastKnownClawName = data.claw;
|
|
78
|
+
lastKnownOpenclawRoot = data.root || null;
|
|
77
79
|
return data.claw;
|
|
78
80
|
})
|
|
79
81
|
.catch(function (err) {
|
|
@@ -449,6 +451,10 @@
|
|
|
449
451
|
// 1. 检查文件名是否包含在黑名单中
|
|
450
452
|
if (ARTIFACT_BLACKLIST.indexOf(basename) !== -1) return false;
|
|
451
453
|
|
|
454
|
+
// 1.5 约定前缀:文件名以 hide- 开头 = 内部/生成文件,默认不显示
|
|
455
|
+
// (Markdown 安全、shell 安全,供各流水线自命名用,无需维护清单)
|
|
456
|
+
if (basename.indexOf('hide-') === 0) return false;
|
|
457
|
+
|
|
452
458
|
// 2. 检查路径是否以黑名单目录开头
|
|
453
459
|
for (var i = 0; i < DIR_BLACKLIST.length; i++) {
|
|
454
460
|
if (path.indexOf(DIR_BLACKLIST[i]) === 0) {
|
|
@@ -537,8 +543,9 @@
|
|
|
537
543
|
copyPathBtn.onmouseleave = function () { copyPathBtn.style.background = '#2d2d4a'; };
|
|
538
544
|
copyPathBtn.onclick = function (e) {
|
|
539
545
|
e.stopPropagation();
|
|
540
|
-
var
|
|
541
|
-
|
|
546
|
+
var rel = getWorkspaceId() + '/' + (asset.path || '');
|
|
547
|
+
var pathToCopy = lastKnownOpenclawRoot ? lastKnownOpenclawRoot + '/' + rel : rel;
|
|
548
|
+
navigator.clipboard.writeText(pathToCopy).then(function () {
|
|
542
549
|
copyPathBtn.textContent = '✓';
|
|
543
550
|
copyPathBtn.style.color = '#10b981';
|
|
544
551
|
copyPathBtn.style.borderColor = '#10b981';
|
package/package.json
CHANGED
package/server/sync_workspace.py
CHANGED
|
@@ -1156,7 +1156,7 @@ class MyclawAPIHandler(BaseHTTPRequestHandler):
|
|
|
1156
1156
|
|
|
1157
1157
|
def _handle_config(self):
|
|
1158
1158
|
"""GET /api/config → 返回 claw 名称和 CDN base_url"""
|
|
1159
|
-
self._send_json({"claw": claw, "base_url": BASE_URL})
|
|
1159
|
+
self._send_json({"claw": claw, "base_url": BASE_URL, "root": get_openclaw_path()})
|
|
1160
1160
|
|
|
1161
1161
|
def _handle_artifacts(self, params):
|
|
1162
1162
|
"""GET /api/artifacts?workspace=xxx → 直接从磁盘读取 __MY_ARTIFACTS__.json"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: chat-history-extractor
|
|
3
|
-
description: Extract and render chat history from OpenClaw session URLs. Use when user provides a URL like https://claw1.kekouen.cn/chat?session=agent%3Ac108-v1-1811%3Amain containing a session key. The skill parses the URL, finds the corresponding chat JSONL file, and generates a JS data file for rendering. Also provide template HTML for visualizing the conversation with timing metrics.
|
|
3
|
+
description: Extract and render chat history from OpenClaw session URLs. Use when user provides a URL like https://claw1.kekouen.cn/chat?session=agent%3Ac108-v1-1811%3Amain containing a session key. The skill parses the URL, finds the corresponding chat JSONL file, and generates a JS data file for rendering. Also provide template HTML for visualizing the conversation with timing metrics. IMPORTANT: The workspace argument must be YOUR OWN current workspace path (where you are running), NOT the workspace of the conversation being analyzed.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Chat History Extractor
|
|
@@ -15,7 +15,7 @@ python3 scripts/extract_chat.py <my-workspace>
|
|
|
15
15
|
python3 scripts/extract_chat.py <my-workspace> "<urls>"
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
- `<my-workspace
|
|
18
|
+
- `<my-workspace>`:**必填**,你自己当前所在的 workspace 路径(即你运行命令的目录)。**不是**你要提取的那个对话所属的 workspace。因为分析结果要落在你自己的目录下,方便你在当前上下文里查看。
|
|
19
19
|
- `<urls>`:可选,单个 URL/key、逗号分隔、或 JSON 数组
|
|
20
20
|
- 输出固定到 `<my-workspace>/chat-history/` 子目录
|
|
21
21
|
|