@memtensor/memos-local-openclaw-plugin 1.0.0 → 1.0.1
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/README.md +8 -1
- package/dist/storage/sqlite.d.ts.map +1 -1
- package/dist/storage/sqlite.js +20 -9
- package/dist/storage/sqlite.js.map +1 -1
- package/dist/viewer/html.d.ts +1 -1
- package/dist/viewer/html.d.ts.map +1 -1
- package/dist/viewer/html.js +198 -68
- package/dist/viewer/html.js.map +1 -1
- package/dist/viewer/server.d.ts +4 -0
- package/dist/viewer/server.d.ts.map +1 -1
- package/dist/viewer/server.js +183 -24
- package/dist/viewer/server.js.map +1 -1
- package/package.json +1 -1
- package/src/storage/sqlite.ts +19 -9
- package/src/viewer/html.ts +198 -68
- package/src/viewer/server.ts +177 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/viewer/html.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/viewer/html.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,glkQA0oIf,CAAC"}
|
package/dist/viewer/html.js
CHANGED
|
@@ -515,6 +515,12 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
515
515
|
.toggle-slider::before{content:'';position:absolute;height:14px;width:14px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.2s}
|
|
516
516
|
.toggle-switch input:checked+.toggle-slider{background:var(--pri)}
|
|
517
517
|
.toggle-switch input:checked+.toggle-slider::before{transform:translateX(16px)}
|
|
518
|
+
.test-conn-row{display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:10px;border-top:1px dashed var(--border)}
|
|
519
|
+
.test-conn-row .btn{font-size:11px;padding:5px 14px;border:1px solid var(--border);border-radius:6px}
|
|
520
|
+
.test-result{font-size:12px;line-height:1.5;word-break:break-word}
|
|
521
|
+
.test-result.ok{color:#22c55e}
|
|
522
|
+
.test-result.fail{color:var(--rose)}
|
|
523
|
+
.test-result.loading{color:var(--text-muted)}
|
|
518
524
|
.settings-actions{display:flex;gap:12px;justify-content:flex-end;align-items:center;margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
|
|
519
525
|
.settings-actions .btn{min-width:110px;padding:10px 20px;font-size:13px}
|
|
520
526
|
.settings-actions .btn-primary{background:rgba(99,102,241,.08);color:var(--pri);border:1px solid rgba(99,102,241,.25);font-weight:600}
|
|
@@ -942,9 +948,12 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
942
948
|
<div class="settings-grid">
|
|
943
949
|
<div class="settings-field">
|
|
944
950
|
<label data-i18n="settings.provider">Provider</label>
|
|
945
|
-
<select id="cfgEmbProvider">
|
|
951
|
+
<select id="cfgEmbProvider" onchange="onProviderChange('embedding')">
|
|
946
952
|
<option value="openai_compatible">OpenAI Compatible</option>
|
|
947
953
|
<option value="openai">OpenAI</option>
|
|
954
|
+
<option value="siliconflow">SiliconFlow (\u7845\u57FA\u6D41\u52A8)</option>
|
|
955
|
+
<option value="zhipu">Zhipu AI (\u667A\u8C31)</option>
|
|
956
|
+
<option value="bailian">Alibaba Bailian (\u767E\u70BC)</option>
|
|
948
957
|
<option value="gemini">Gemini</option>
|
|
949
958
|
<option value="azure_openai">Azure OpenAI</option>
|
|
950
959
|
<option value="cohere">Cohere</option>
|
|
@@ -966,6 +975,10 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
966
975
|
<input type="password" id="cfgEmbApiKey" placeholder="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022">
|
|
967
976
|
</div>
|
|
968
977
|
</div>
|
|
978
|
+
<div class="test-conn-row">
|
|
979
|
+
<button class="btn btn-sm btn-ghost" onclick="testModel('embedding')" id="testEmbBtn" data-i18n="settings.test">Test Connection</button>
|
|
980
|
+
<span class="test-result" id="testEmbResult"></span>
|
|
981
|
+
</div>
|
|
969
982
|
</div>
|
|
970
983
|
|
|
971
984
|
<div class="settings-section">
|
|
@@ -973,9 +986,14 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
973
986
|
<div class="settings-grid">
|
|
974
987
|
<div class="settings-field">
|
|
975
988
|
<label data-i18n="settings.provider">Provider</label>
|
|
976
|
-
<select id="cfgSumProvider">
|
|
989
|
+
<select id="cfgSumProvider" onchange="onProviderChange('summarizer')">
|
|
977
990
|
<option value="openai_compatible">OpenAI Compatible</option>
|
|
978
991
|
<option value="openai">OpenAI</option>
|
|
992
|
+
<option value="siliconflow">SiliconFlow (\u7845\u57FA\u6D41\u52A8)</option>
|
|
993
|
+
<option value="zhipu">Zhipu AI (\u667A\u8C31)</option>
|
|
994
|
+
<option value="deepseek">DeepSeek</option>
|
|
995
|
+
<option value="bailian">Alibaba Bailian (\u767E\u70BC)</option>
|
|
996
|
+
<option value="moonshot">Moonshot (Kimi)</option>
|
|
979
997
|
<option value="anthropic">Anthropic</option>
|
|
980
998
|
<option value="gemini">Gemini</option>
|
|
981
999
|
<option value="azure_openai">Azure OpenAI</option>
|
|
@@ -999,6 +1017,10 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
999
1017
|
<input type="number" id="cfgSumTemp" step="0.1" min="0" max="2" placeholder="0">
|
|
1000
1018
|
</div>
|
|
1001
1019
|
</div>
|
|
1020
|
+
<div class="test-conn-row">
|
|
1021
|
+
<button class="btn btn-sm btn-ghost" onclick="testModel('summarizer')" id="testSumBtn" data-i18n="settings.test">Test Connection</button>
|
|
1022
|
+
<span class="test-result" id="testSumResult"></span>
|
|
1023
|
+
</div>
|
|
1002
1024
|
</div>
|
|
1003
1025
|
</div>
|
|
1004
1026
|
|
|
@@ -1028,10 +1050,15 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
1028
1050
|
<div class="settings-grid">
|
|
1029
1051
|
<div class="settings-field">
|
|
1030
1052
|
<label data-i18n="settings.provider">Provider</label>
|
|
1031
|
-
<select id="cfgSkillProvider">
|
|
1053
|
+
<select id="cfgSkillProvider" onchange="onProviderChange('skill')">
|
|
1032
1054
|
<option value="">— <span data-i18n="settings.skill.usemain">Use main summarizer</span> —</option>
|
|
1033
1055
|
<option value="openai_compatible">OpenAI Compatible</option>
|
|
1034
1056
|
<option value="openai">OpenAI</option>
|
|
1057
|
+
<option value="siliconflow">SiliconFlow (\u7845\u57FA\u6D41\u52A8)</option>
|
|
1058
|
+
<option value="zhipu">Zhipu AI (\u667A\u8C31)</option>
|
|
1059
|
+
<option value="deepseek">DeepSeek</option>
|
|
1060
|
+
<option value="bailian">Alibaba Bailian (\u767E\u70BC)</option>
|
|
1061
|
+
<option value="moonshot">Moonshot (Kimi)</option>
|
|
1035
1062
|
<option value="anthropic">Anthropic</option>
|
|
1036
1063
|
<option value="gemini">Gemini</option>
|
|
1037
1064
|
<option value="azure_openai">Azure OpenAI</option>
|
|
@@ -1051,6 +1078,10 @@ input,textarea,select{font-family:inherit;font-size:inherit}
|
|
|
1051
1078
|
<input type="password" id="cfgSkillApiKey" placeholder="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022">
|
|
1052
1079
|
</div>
|
|
1053
1080
|
</div>
|
|
1081
|
+
<div class="test-conn-row">
|
|
1082
|
+
<button class="btn btn-sm btn-ghost" onclick="testModel('skill')" id="testSkillBtn" data-i18n="settings.test">Test Connection</button>
|
|
1083
|
+
<span class="test-result" id="testSkillResult"></span>
|
|
1084
|
+
</div>
|
|
1054
1085
|
</div>
|
|
1055
1086
|
</div>
|
|
1056
1087
|
|
|
@@ -1463,11 +1494,24 @@ const I18N={
|
|
|
1463
1494
|
'settings.telemetry.hint':'Anonymous usage analytics to help improve the plugin. Only sends tool names, latencies, and version info. No memory content, queries, or personal data is ever sent.',
|
|
1464
1495
|
'settings.viewerport':'Viewer Port',
|
|
1465
1496
|
'settings.viewerport.hint':'Requires restart to take effect',
|
|
1497
|
+
'settings.test':'Test Connection',
|
|
1498
|
+
'settings.test.loading':'Testing...',
|
|
1499
|
+
'settings.test.ok':'Connected',
|
|
1500
|
+
'settings.test.fail':'Failed',
|
|
1466
1501
|
'settings.save':'Save Settings',
|
|
1467
1502
|
'settings.reset':'Reset',
|
|
1468
1503
|
'settings.saved':'Saved',
|
|
1469
1504
|
'settings.restart.hint':'Some changes require restarting the OpenClaw gateway to take effect.',
|
|
1470
1505
|
'settings.save.fail':'Failed to save settings',
|
|
1506
|
+
'settings.save.emb.required':'Embedding model is required. Please configure an embedding model before saving.',
|
|
1507
|
+
'settings.save.emb.fail':'Embedding model test failed, cannot save',
|
|
1508
|
+
'settings.save.sum.fail':'Summarizer model test failed, cannot save',
|
|
1509
|
+
'settings.save.skill.fail':'Skill model test failed, cannot save',
|
|
1510
|
+
'settings.save.sum.fallback':'Summarizer model is not configured — will use OpenClaw native model as fallback.',
|
|
1511
|
+
'settings.save.skill.fallback':'Skill dedicated model is not configured — will use OpenClaw native model as fallback.',
|
|
1512
|
+
'settings.save.fallback.model':'Fallback model: ',
|
|
1513
|
+
'settings.save.fallback.none':'Not available (no OpenClaw native model found)',
|
|
1514
|
+
'settings.save.fallback.confirm':'Continue to save?',
|
|
1471
1515
|
'migrate.title':'Import OpenClaw Memory',
|
|
1472
1516
|
'migrate.desc':'Migrate your existing OpenClaw built-in memories and conversation history into this plugin. The import process uses smart deduplication to avoid duplicates.',
|
|
1473
1517
|
'migrate.modes.title':'Three ways to use:',
|
|
@@ -1756,11 +1800,24 @@ const I18N={
|
|
|
1756
1800
|
'settings.telemetry.hint':'匿名使用统计,帮助改进插件。仅发送工具名称、响应时间和版本信息,不会发送任何记忆内容、搜索查询或个人数据。',
|
|
1757
1801
|
'settings.viewerport':'Viewer 端口',
|
|
1758
1802
|
'settings.viewerport.hint':'修改后需重启网关生效',
|
|
1803
|
+
'settings.test':'测试连接',
|
|
1804
|
+
'settings.test.loading':'测试中...',
|
|
1805
|
+
'settings.test.ok':'连接成功',
|
|
1806
|
+
'settings.test.fail':'连接失败',
|
|
1759
1807
|
'settings.save':'保存设置',
|
|
1760
1808
|
'settings.reset':'重置',
|
|
1761
1809
|
'settings.saved':'已保存',
|
|
1762
1810
|
'settings.restart.hint':'部分设置修改后需要重启 OpenClaw 网关才能生效。',
|
|
1763
1811
|
'settings.save.fail':'保存设置失败',
|
|
1812
|
+
'settings.save.emb.required':'嵌入模型为必填项,请先配置嵌入模型再保存。',
|
|
1813
|
+
'settings.save.emb.fail':'嵌入模型测试失败,无法保存',
|
|
1814
|
+
'settings.save.sum.fail':'摘要模型测试失败,无法保存',
|
|
1815
|
+
'settings.save.skill.fail':'技能模型测试失败,无法保存',
|
|
1816
|
+
'settings.save.sum.fallback':'摘要模型未配置 — 将使用 OpenClaw 原生模型作为降级方案。',
|
|
1817
|
+
'settings.save.skill.fallback':'技能专用模型未配置 — 将使用 OpenClaw 原生模型作为降级方案。',
|
|
1818
|
+
'settings.save.fallback.model':'降级模型:',
|
|
1819
|
+
'settings.save.fallback.none':'不可用(未检测到 OpenClaw 原生模型)',
|
|
1820
|
+
'settings.save.fallback.confirm':'是否继续保存?',
|
|
1764
1821
|
'migrate.title':'导入 OpenClaw 记忆',
|
|
1765
1822
|
'migrate.desc':'将 OpenClaw 内置的记忆数据和对话历史迁移到本插件中。导入过程使用智能去重,避免重复导入。',
|
|
1766
1823
|
'migrate.modes.title':'三种使用方式:',
|
|
@@ -2288,7 +2345,6 @@ async function loadTasks(){
|
|
|
2288
2345
|
'</div>'+
|
|
2289
2346
|
'<div class="card-actions" onclick="event.stopPropagation()">'+
|
|
2290
2347
|
'<button class="btn btn-sm btn-ghost" onclick="openTaskDetail(\\''+task.id+'\\')">'+t('card.expand')+'</button>'+
|
|
2291
|
-
'<button class="btn btn-sm btn-ghost" onclick="editTaskInline(\\''+task.id+'\\')">'+t('card.edit')+'</button>'+
|
|
2292
2348
|
(task.status==='completed'&&(!task.skillStatus||task.skillStatus==='not_generated'||task.skillStatus==='skipped')?'<button class="btn btn-sm btn-ghost" onclick="retrySkillGen(\\''+task.id+'\\')">'+t('task.retrySkill.short')+'</button>':'')+
|
|
2293
2349
|
'<button class="btn btn-sm btn-ghost" style="color:var(--accent)" onclick="deleteTask(\\''+task.id+'\\')">'+t('task.delete')+'</button>'+
|
|
2294
2350
|
'</div>'+
|
|
@@ -2461,32 +2517,6 @@ async function deleteTask(taskId){
|
|
|
2461
2517
|
}catch(e){ alert(t('task.delete.error')+e.message); }
|
|
2462
2518
|
}
|
|
2463
2519
|
|
|
2464
|
-
async function editTaskInline(){
|
|
2465
|
-
if(!_currentTaskData) return;
|
|
2466
|
-
var task=_currentTaskData;
|
|
2467
|
-
var titleEl=document.getElementById('taskDetailTitle');
|
|
2468
|
-
var summaryEl=document.getElementById('taskDetailSummary');
|
|
2469
|
-
var actionsEl=document.getElementById('taskDetailActions');
|
|
2470
|
-
|
|
2471
|
-
titleEl.innerHTML='<input id="editTaskTitle" class="filter-input" style="width:100%;font-size:16px;font-weight:600" value="'+esc(task.title||'')+'"/>';
|
|
2472
|
-
summaryEl.innerHTML='<textarea id="editTaskSummary" class="filter-input" style="width:100%;min-height:80px;font-size:13px;resize:vertical">'+esc(task.summary||'')+'</textarea>';
|
|
2473
|
-
actionsEl.innerHTML=
|
|
2474
|
-
'<button class="btn btn-primary" onclick="saveTaskEdit()" style="font-size:12px">'+t('task.save')+'</button>'+
|
|
2475
|
-
'<button class="btn btn-ghost" onclick="openTaskDetail(\\''+esc(task.id)+'\\')" style="font-size:12px">'+t('task.cancel')+'</button>';
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
async function saveTaskEdit(){
|
|
2479
|
-
if(!_currentTaskId) return;
|
|
2480
|
-
var title=document.getElementById('editTaskTitle').value.trim();
|
|
2481
|
-
var summary=document.getElementById('editTaskSummary').value.trim();
|
|
2482
|
-
try{
|
|
2483
|
-
const r=await fetch('/api/task/'+_currentTaskId,{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:title,summary:summary})});
|
|
2484
|
-
const d=await r.json();
|
|
2485
|
-
if(!r.ok) throw new Error(d.error||'unknown');
|
|
2486
|
-
openTaskDetail(_currentTaskId);
|
|
2487
|
-
loadTasks();
|
|
2488
|
-
}catch(e){ alert(t('task.save.error')+e.message); }
|
|
2489
|
-
}
|
|
2490
2520
|
|
|
2491
2521
|
/* ─── Skills View Logic ─── */
|
|
2492
2522
|
let skillsStatusFilter='';
|
|
@@ -2547,7 +2577,6 @@ async function loadSkills(){
|
|
|
2547
2577
|
'</div>'+
|
|
2548
2578
|
'<div class="card-actions" onclick="event.stopPropagation()">'+
|
|
2549
2579
|
'<button class="btn btn-sm btn-ghost" onclick="openSkillDetail(\\''+skill.id+'\\')">'+t('card.expand')+'</button>'+
|
|
2550
|
-
'<button class="btn btn-sm btn-ghost" onclick="editSkillInline(\\''+skill.id+'\\')">'+t('card.edit')+'</button>'+
|
|
2551
2580
|
(skill.visibility==='public'?'<button class="btn btn-sm btn-ghost" onclick="toggleSkillPublic(\\''+skill.id+'\\',false)">\\u{1F512} '+t('skills.setPrivate')+'</button>':'<button class="btn btn-sm btn-ghost" onclick="toggleSkillPublic(\\''+skill.id+'\\',true)">\\u{1F310} '+t('skills.setPublic')+'</button>')+
|
|
2552
2581
|
'<button class="btn btn-sm btn-ghost" style="color:var(--accent)" onclick="deleteSkill(\\''+skill.id+'\\')">'+t('skill.delete')+'</button>'+
|
|
2553
2582
|
'</div>'+
|
|
@@ -2694,11 +2723,11 @@ async function toggleSkillVisibility(){
|
|
|
2694
2723
|
const newVis=btn.dataset.vis==='public'?'private':'public';
|
|
2695
2724
|
try{
|
|
2696
2725
|
const r=await fetch('/api/skill/'+currentSkillId+'/visibility',{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({visibility:newVis})});
|
|
2697
|
-
if(!r.ok) throw new Error('
|
|
2726
|
+
if(!r.ok){var errBody='';try{var ej=await r.json();errBody=ej.error||JSON.stringify(ej);}catch(x){errBody=await r.text();}throw new Error(r.status+': '+errBody);}
|
|
2698
2727
|
openSkillDetail(currentSkillId);
|
|
2699
2728
|
loadSkills();
|
|
2700
2729
|
}catch(e){
|
|
2701
|
-
|
|
2730
|
+
toast('Error: '+e.message,'error');
|
|
2702
2731
|
}
|
|
2703
2732
|
}
|
|
2704
2733
|
|
|
@@ -2706,7 +2735,7 @@ async function toggleSkillPublic(id,setPublic){
|
|
|
2706
2735
|
const newVis=setPublic?'public':'private';
|
|
2707
2736
|
try{
|
|
2708
2737
|
const r=await fetch('/api/skill/'+id+'/visibility',{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({visibility:newVis})});
|
|
2709
|
-
if(!r.ok) throw new Error('
|
|
2738
|
+
if(!r.ok){var errBody='';try{var ej=await r.json();errBody=ej.error||JSON.stringify(ej);}catch(x){errBody=await r.text();}throw new Error(r.status+': '+errBody);}
|
|
2710
2739
|
toast(setPublic?t('toast.setPublic'):t('toast.setPrivate'),'success');
|
|
2711
2740
|
loadSkills();
|
|
2712
2741
|
}catch(e){
|
|
@@ -2754,7 +2783,37 @@ async function loadConfig(){
|
|
|
2754
2783
|
}
|
|
2755
2784
|
}
|
|
2756
2785
|
|
|
2786
|
+
var _providerDefaults={
|
|
2787
|
+
siliconflow:{endpoint:'https://api.siliconflow.cn/v1',embModel:'BAAI/bge-m3',chatModel:'Qwen/Qwen2.5-7B-Instruct'},
|
|
2788
|
+
openai:{endpoint:'https://api.openai.com/v1',embModel:'text-embedding-3-small',chatModel:'gpt-4o-mini'},
|
|
2789
|
+
anthropic:{endpoint:'https://api.anthropic.com/v1/messages',chatModel:'claude-3-haiku-20240307'},
|
|
2790
|
+
cohere:{endpoint:'https://api.cohere.com/v2',embModel:'embed-english-v3.0'},
|
|
2791
|
+
mistral:{endpoint:'https://api.mistral.ai/v1',embModel:'mistral-embed'},
|
|
2792
|
+
voyage:{endpoint:'https://api.voyageai.com/v1',embModel:'voyage-3'},
|
|
2793
|
+
gemini:{endpoint:'',embModel:'text-embedding-004',chatModel:'gemini-2.0-flash'},
|
|
2794
|
+
zhipu:{endpoint:'https://open.bigmodel.cn/api/paas/v4',embModel:'embedding-3',chatModel:'glm-4-flash'},
|
|
2795
|
+
deepseek:{endpoint:'https://api.deepseek.com/v1',chatModel:'deepseek-chat'},
|
|
2796
|
+
bailian:{endpoint:'https://dashscope.aliyuncs.com/compatible-mode/v1',embModel:'text-embedding-v3',chatModel:'qwen-max'},
|
|
2797
|
+
moonshot:{endpoint:'https://api.moonshot.cn/v1',chatModel:'moonshot-v1-8k'}
|
|
2798
|
+
};
|
|
2799
|
+
function onProviderChange(section){
|
|
2800
|
+
var map={embedding:['cfgEmbEndpoint','cfgEmbModel','emb'],summarizer:['cfgSumEndpoint','cfgSumModel','chat'],skill:['cfgSkillEndpoint','cfgSkillModel','chat']};
|
|
2801
|
+
var m=map[section];if(!m)return;
|
|
2802
|
+
var sel=document.getElementById(section==='embedding'?'cfgEmbProvider':section==='summarizer'?'cfgSumProvider':'cfgSkillProvider');
|
|
2803
|
+
var pv=sel.value;
|
|
2804
|
+
var def=_providerDefaults[pv];
|
|
2805
|
+
if(!def)return;
|
|
2806
|
+
var epEl=document.getElementById(m[0]);
|
|
2807
|
+
var mdEl=document.getElementById(m[1]);
|
|
2808
|
+
if(def.endpoint&&!epEl.value.trim()) epEl.value=def.endpoint;
|
|
2809
|
+
if(m[2]==='emb'&&def.embModel&&!mdEl.value.trim()) mdEl.value=def.embModel;
|
|
2810
|
+
if(m[2]==='chat'&&def.chatModel&&!mdEl.value.trim()) mdEl.value=def.chatModel;
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2757
2813
|
async function saveConfig(){
|
|
2814
|
+
var saveBtn=document.querySelector('.settings-actions .btn-primary');
|
|
2815
|
+
saveBtn.disabled=true;saveBtn.textContent=t('settings.test.loading');
|
|
2816
|
+
|
|
2758
2817
|
const cfg={};
|
|
2759
2818
|
const embP=document.getElementById('cfgEmbProvider').value;
|
|
2760
2819
|
if(embP){
|
|
@@ -2764,11 +2823,15 @@ async function saveConfig(){
|
|
|
2764
2823
|
const k=document.getElementById('cfgEmbApiKey').value.trim();if(k) cfg.embedding.apiKey=k;
|
|
2765
2824
|
}
|
|
2766
2825
|
const sumP=document.getElementById('cfgSumProvider').value;
|
|
2767
|
-
|
|
2826
|
+
const sumModel=document.getElementById('cfgSumModel').value.trim();
|
|
2827
|
+
const sumEndpoint=document.getElementById('cfgSumEndpoint').value.trim();
|
|
2828
|
+
const sumApiKey=document.getElementById('cfgSumApiKey').value.trim();
|
|
2829
|
+
var hasSumConfig=!!(sumModel||sumEndpoint||sumApiKey);
|
|
2830
|
+
if(hasSumConfig&&sumP){
|
|
2768
2831
|
cfg.summarizer={provider:sumP};
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2832
|
+
if(sumModel) cfg.summarizer.model=sumModel;
|
|
2833
|
+
if(sumEndpoint) cfg.summarizer.endpoint=sumEndpoint;
|
|
2834
|
+
if(sumApiKey) cfg.summarizer.apiKey=sumApiKey;
|
|
2772
2835
|
const tp=document.getElementById('cfgSumTemp').value.trim();if(tp!=='') cfg.summarizer.temperature=Number(tp);
|
|
2773
2836
|
}
|
|
2774
2837
|
cfg.skillEvolution={
|
|
@@ -2779,29 +2842,118 @@ async function saveConfig(){
|
|
|
2779
2842
|
const mk=document.getElementById('cfgSkillMinChunks').value.trim();if(mk) cfg.skillEvolution.minChunksForEval=Number(mk);
|
|
2780
2843
|
|
|
2781
2844
|
const skP=document.getElementById('cfgSkillProvider').value;
|
|
2782
|
-
|
|
2845
|
+
const skModel=document.getElementById('cfgSkillModel').value.trim();
|
|
2846
|
+
const skEndpoint=document.getElementById('cfgSkillEndpoint').value.trim();
|
|
2847
|
+
const skApiKey=document.getElementById('cfgSkillApiKey').value.trim();
|
|
2848
|
+
var hasSkillConfig=!!(skP&&(skModel||skEndpoint||skApiKey));
|
|
2849
|
+
if(hasSkillConfig){
|
|
2783
2850
|
cfg.skillEvolution.summarizer={provider:skP};
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2851
|
+
if(skModel) cfg.skillEvolution.summarizer.model=skModel;
|
|
2852
|
+
if(skEndpoint) cfg.skillEvolution.summarizer.endpoint=skEndpoint;
|
|
2853
|
+
if(skApiKey) cfg.skillEvolution.summarizer.apiKey=skApiKey;
|
|
2787
2854
|
}
|
|
2788
2855
|
|
|
2789
2856
|
const vp=document.getElementById('cfgViewerPort').value.trim();
|
|
2790
2857
|
if(vp) cfg.viewerPort=Number(vp);
|
|
2858
|
+
cfg.telemetry={enabled:document.getElementById('cfgTelemetryEnabled').checked};
|
|
2791
2859
|
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2860
|
+
function done(){saveBtn.disabled=false;saveBtn.textContent=t('settings.save');}
|
|
2861
|
+
|
|
2862
|
+
// 1) Embedding model is required
|
|
2863
|
+
if(!embP||embP===''){done();toast(t('settings.save.emb.required'),'error');return;}
|
|
2795
2864
|
|
|
2865
|
+
// 2) Test embedding
|
|
2866
|
+
try{
|
|
2867
|
+
var er=await fetch('/api/test-model',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({type:'embedding',provider:cfg.embedding.provider,model:cfg.embedding.model||'',endpoint:cfg.embedding.endpoint||'',apiKey:cfg.embedding.apiKey||''})});
|
|
2868
|
+
var ed=await er.json();
|
|
2869
|
+
if(!ed.ok){done();toast(t('settings.save.emb.fail')+': '+ed.error,'error');document.getElementById('testEmbResult').className='test-result fail';document.getElementById('testEmbResult').innerHTML='\\u274C '+ed.error;return;}
|
|
2870
|
+
document.getElementById('testEmbResult').className='test-result ok';document.getElementById('testEmbResult').innerHTML='\\u2705 '+t('settings.test.ok');
|
|
2871
|
+
}catch(e){done();toast(t('settings.save.emb.fail')+': '+e.message,'error');return;}
|
|
2872
|
+
|
|
2873
|
+
// 3) Test summarizer if user filled it
|
|
2874
|
+
if(hasSumConfig&&cfg.summarizer){
|
|
2875
|
+
try{
|
|
2876
|
+
var sr=await fetch('/api/test-model',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({type:'summarizer',provider:cfg.summarizer.provider,model:cfg.summarizer.model||'',endpoint:cfg.summarizer.endpoint||'',apiKey:cfg.summarizer.apiKey||''})});
|
|
2877
|
+
var sd=await sr.json();
|
|
2878
|
+
if(!sd.ok){done();toast(t('settings.save.sum.fail')+': '+sd.error,'error');document.getElementById('testSumResult').className='test-result fail';document.getElementById('testSumResult').innerHTML='\\u274C '+sd.error;return;}
|
|
2879
|
+
document.getElementById('testSumResult').className='test-result ok';document.getElementById('testSumResult').innerHTML='\\u2705 '+t('settings.test.ok');
|
|
2880
|
+
}catch(e){done();toast(t('settings.save.sum.fail')+': '+e.message,'error');return;}
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
// 4) Test skill model if user filled it
|
|
2884
|
+
if(hasSkillConfig&&cfg.skillEvolution.summarizer){
|
|
2885
|
+
try{
|
|
2886
|
+
var kr=await fetch('/api/test-model',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({type:'summarizer',provider:cfg.skillEvolution.summarizer.provider,model:cfg.skillEvolution.summarizer.model||'',endpoint:cfg.skillEvolution.summarizer.endpoint||'',apiKey:cfg.skillEvolution.summarizer.apiKey||''})});
|
|
2887
|
+
var kd=await kr.json();
|
|
2888
|
+
if(!kd.ok){done();toast(t('settings.save.skill.fail')+': '+kd.error,'error');document.getElementById('testSkillResult').className='test-result fail';document.getElementById('testSkillResult').innerHTML='\\u274C '+kd.error;return;}
|
|
2889
|
+
document.getElementById('testSkillResult').className='test-result ok';document.getElementById('testSkillResult').innerHTML='\\u2705 '+t('settings.test.ok');
|
|
2890
|
+
}catch(e){done();toast(t('settings.save.skill.fail')+': '+e.message,'error');return;}
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
// 5) If summarizer or skill model not configured, check OpenClaw fallback and confirm
|
|
2894
|
+
if(!hasSumConfig||!hasSkillConfig){
|
|
2895
|
+
try{
|
|
2896
|
+
var fr=await fetch('/api/fallback-model');
|
|
2897
|
+
var fb=await fr.json();
|
|
2898
|
+
var msgs=[];
|
|
2899
|
+
if(!hasSumConfig){msgs.push(t('settings.save.sum.fallback'));}
|
|
2900
|
+
if(!hasSkillConfig){msgs.push(t('settings.save.skill.fallback'));}
|
|
2901
|
+
var fbInfo=fb.available?(fb.model+' ('+fb.baseUrl+')'):t('settings.save.fallback.none');
|
|
2902
|
+
var confirmMsg=msgs.join('\\n')+'\\n\\n'+t('settings.save.fallback.model')+fbInfo+'\\n\\n'+t('settings.save.fallback.confirm');
|
|
2903
|
+
if(!confirm(confirmMsg)){done();return;}
|
|
2904
|
+
}catch(e){}
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
// 6) All tests passed, save
|
|
2796
2908
|
try{
|
|
2797
2909
|
const r=await fetch('/api/config',{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify(cfg)});
|
|
2798
2910
|
if(!r.ok) throw new Error(await r.text());
|
|
2799
2911
|
const el=document.getElementById('settingsSaved');
|
|
2800
2912
|
el.classList.add('show');
|
|
2801
2913
|
setTimeout(()=>el.classList.remove('show'),2500);
|
|
2914
|
+
toast(t('settings.saved'),'success');
|
|
2802
2915
|
}catch(e){
|
|
2803
|
-
|
|
2916
|
+
toast(t('settings.save.fail')+': '+e.message,'error');
|
|
2917
|
+
}finally{done();}
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
async function testModel(type){
|
|
2921
|
+
var ids={embedding:['Emb','cfgEmbProvider','cfgEmbModel','cfgEmbEndpoint','cfgEmbApiKey'],summarizer:['Sum','cfgSumProvider','cfgSumModel','cfgSumEndpoint','cfgSumApiKey'],skill:['Skill','cfgSkillProvider','cfgSkillModel','cfgSkillEndpoint','cfgSkillApiKey']};
|
|
2922
|
+
var c=ids[type];if(!c)return;
|
|
2923
|
+
var resultEl=document.getElementById('test'+c[0]+'Result');
|
|
2924
|
+
var btn=document.getElementById('test'+c[0]+'Btn');
|
|
2925
|
+
var provider=document.getElementById(c[1]).value;
|
|
2926
|
+
var model=document.getElementById(c[2]).value.trim();
|
|
2927
|
+
var endpoint=document.getElementById(c[3]).value.trim();
|
|
2928
|
+
var apiKey=document.getElementById(c[4]).value.trim();
|
|
2929
|
+
if(!provider||(provider!=='local'&&!model)){
|
|
2930
|
+
resultEl.className='test-result fail';
|
|
2931
|
+
resultEl.innerHTML='\\u274C '+t('settings.test.fail')+'<div style="margin-top:4px;font-size:11px;color:var(--text-muted)">Provider and Model are required</div>';
|
|
2932
|
+
return;
|
|
2804
2933
|
}
|
|
2934
|
+
if(provider!=='local'&&!apiKey){
|
|
2935
|
+
resultEl.className='test-result fail';
|
|
2936
|
+
resultEl.innerHTML='\\u274C '+t('settings.test.fail')+'<div style="margin-top:4px;font-size:11px;color:var(--text-muted)">API Key is required</div>';
|
|
2937
|
+
return;
|
|
2938
|
+
}
|
|
2939
|
+
resultEl.className='test-result loading';resultEl.textContent=t('settings.test.loading');
|
|
2940
|
+
btn.disabled=true;
|
|
2941
|
+
try{
|
|
2942
|
+
var body={type:type,provider:provider,model:model,endpoint:endpoint,apiKey:apiKey};
|
|
2943
|
+
var r=await fetch('/api/test-model',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)});
|
|
2944
|
+
var d=await r.json();
|
|
2945
|
+
if(d.ok){
|
|
2946
|
+
resultEl.className='test-result ok';
|
|
2947
|
+
resultEl.innerHTML='\\u2705 '+t('settings.test.ok')+'<div style="margin-top:4px;font-size:11px;color:var(--text-muted)">'+esc(d.detail||'')+'</div>';
|
|
2948
|
+
}else{
|
|
2949
|
+
var errMsg=d.error||'Unknown error';
|
|
2950
|
+
resultEl.className='test-result fail';
|
|
2951
|
+
resultEl.innerHTML='\\u274C '+t('settings.test.fail')+'<div style="margin-top:6px;font-size:11px;padding:8px 10px;background:rgba(239,68,68,.06);border:1px solid rgba(239,68,68,.15);border-radius:6px;white-space:pre-wrap;word-break:break-all;max-height:120px;overflow-y:auto;font-family:SF Mono,Monaco,Consolas,monospace">'+esc(errMsg)+'</div>';
|
|
2952
|
+
}
|
|
2953
|
+
}catch(e){
|
|
2954
|
+
resultEl.className='test-result fail';
|
|
2955
|
+
resultEl.innerHTML='\\u274C '+t('settings.test.fail')+'<div style="margin-top:6px;font-size:11px;padding:8px 10px;background:rgba(239,68,68,.06);border:1px solid rgba(239,68,68,.15);border-radius:6px;white-space:pre-wrap;word-break:break-all">'+esc(e.message)+'</div>';
|
|
2956
|
+
}finally{btn.disabled=false;}
|
|
2805
2957
|
}
|
|
2806
2958
|
|
|
2807
2959
|
function renderSkillMarkdown(md){
|
|
@@ -2847,28 +2999,6 @@ async function deleteSkill(skillId){
|
|
|
2847
2999
|
}catch(e){ alert(t('skill.delete.error')+e.message); }
|
|
2848
3000
|
}
|
|
2849
3001
|
|
|
2850
|
-
function editSkillInline(){
|
|
2851
|
-
var skill=window._currentSkillData;
|
|
2852
|
-
if(!skill) return;
|
|
2853
|
-
var descEl=document.getElementById('skillDetailDesc');
|
|
2854
|
-
var actionsEl=document.getElementById('skillDetailActions');
|
|
2855
|
-
descEl.innerHTML='<textarea id="editSkillDesc" class="filter-input" style="width:100%;min-height:60px;font-size:13px;resize:vertical">'+esc(skill.description||'')+'</textarea>';
|
|
2856
|
-
actionsEl.innerHTML=
|
|
2857
|
-
'<button class="btn btn-primary" onclick="saveSkillEdit()" style="font-size:12px">'+t('skill.save')+'</button>'+
|
|
2858
|
-
'<button class="btn btn-ghost" onclick="openSkillDetail(\\''+esc(skill.id)+'\\')" style="font-size:12px">'+t('skill.cancel')+'</button>';
|
|
2859
|
-
}
|
|
2860
|
-
|
|
2861
|
-
async function saveSkillEdit(){
|
|
2862
|
-
if(!currentSkillId) return;
|
|
2863
|
-
var desc=document.getElementById('editSkillDesc').value.trim();
|
|
2864
|
-
try{
|
|
2865
|
-
const r=await fetch('/api/skill/'+currentSkillId,{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({description:desc})});
|
|
2866
|
-
const d=await r.json();
|
|
2867
|
-
if(!r.ok) throw new Error(d.error||'unknown');
|
|
2868
|
-
openSkillDetail(currentSkillId);
|
|
2869
|
-
loadSkills();
|
|
2870
|
-
}catch(e){ alert(t('skill.save.error')+e.message); }
|
|
2871
|
-
}
|
|
2872
3002
|
|
|
2873
3003
|
function formatDuration(ms){
|
|
2874
3004
|
const s=Math.floor(ms/1000);
|
package/dist/viewer/html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../src/viewer/html.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../src/viewer/html.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0oIlB,CAAC"}
|
package/dist/viewer/server.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ export declare class ViewerServer {
|
|
|
72
72
|
private getOpenClawConfigPath;
|
|
73
73
|
private serveConfig;
|
|
74
74
|
private handleSaveConfig;
|
|
75
|
+
private handleTestModel;
|
|
76
|
+
private serveFallbackModel;
|
|
77
|
+
private testEmbeddingModel;
|
|
78
|
+
private testChatModel;
|
|
75
79
|
private serveLogs;
|
|
76
80
|
private serveLogTools;
|
|
77
81
|
private getOpenClawHome;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/viewer/server.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQ7C,OAAO,KAAK,EAAE,MAAM,EAAS,aAAa,EAAE,MAAM,UAAU,CAAC;AAI7D,MAAM,WAAW,mBAAmB;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