@memtensor/memos-local-openclaw-plugin 1.0.9-beta.1 → 1.0.9

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.
@@ -124,7 +124,7 @@ input,textarea,select{font-family:inherit;font-size:inherit}
124
124
  .topbar-center{flex:1;display:flex;justify-content:center}
125
125
  .topbar .actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
126
126
 
127
- .main-content{display:flex;flex:1;max-width:1400px;margin:0 auto;width:100%;padding:28px 32px;gap:28px}
127
+ .main-content{display:grid;grid-template-columns:260px 1fr;grid-template-rows:auto 1fr;flex:1;max-width:1400px;margin:0 auto;width:100%;padding:28px 32px;gap:28px}
128
128
 
129
129
  /* ─── Sidebar ─── */
130
130
  .sidebar{width:260px;min-width:260px;flex-shrink:0;position:sticky;top:84px;max-height:calc(100vh - 112px);display:flex;flex-direction:column}
@@ -1500,6 +1500,16 @@ input,textarea,select{font-family:inherit;font-size:inherit}
1500
1500
  </div>
1501
1501
  </div>
1502
1502
  <div class="settings-card-body">
1503
+ <div class="emb-banner warning" id="settingsWarningBanner" style="margin: 0 0 24px 0; display: block; border-left: 4px solid #f59e0b; position: relative;">
1504
+ <button onclick="document.getElementById('settingsWarningBanner').style.display='none'" style="position: absolute; right: 12px; top: 12px; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; opacity: 0.7; transition: opacity 0.2s;" onmouseover="this.style.opacity=1" onmouseout="this.style.opacity=0.7" title="关闭" aria-label="关闭">\u2715</button>
1505
+ <div style="font-weight: 700; margin-bottom: 8px; font-size: 14px; color: #d97706;" data-i18n-html="settings.warn.title">\u{1F514} 模型配置重要提醒</div>
1506
+ <ul style="margin: 0; padding-left: 20px; line-height: 1.7; color: var(--text-sec); font-size: 13px;">
1507
+ <li data-i18n-html="settings.warn.emb"><strong>嵌入模型 (Embedding):</strong>插件内置模型规模较小。为获得更精准的记忆检索体验,强烈建议配置 <code>bge-m3</code> 等专业嵌入模型。</li>
1508
+ <li data-i18n-html="settings.warn.sum"><strong>摘要模型 (Summarizer):</strong>此项为<strong>必填项</strong>,否则无法自动提取记忆摘要。建议配置<strong>非思考型</strong>大模型,以保障处理速度和流畅度。</li>
1509
+ <li data-i18n-html="settings.warn.skill"><strong>技能模型 (Skill Evolution):</strong>用于自动提取可复用技能。建议配置<strong>思考型</strong>大模型,以获得最佳的生成效果和稳定性。</li>
1510
+ </ul>
1511
+ </div>
1512
+
1503
1513
  <!-- Embedding Model section -->
1504
1514
  <div class="settings-card-subtitle">\u{1F4E1} <span data-i18n="settings.embedding">Embedding Model</span></div>
1505
1515
  <div class="field-hint" style="margin-bottom:10px" data-i18n="settings.embedding.desc">Vector embedding model for memory search and retrieval</div>
@@ -1609,7 +1619,7 @@ input,textarea,select{font-family:inherit;font-size:inherit}
1609
1619
  </div>
1610
1620
  <div style="margin-top:14px">
1611
1621
  <div class="settings-card-subtitle" style="margin-bottom:4px" data-i18n="settings.skill.model">Skill Dedicated Model</div>
1612
- <div class="field-hint" style="margin-bottom:12px" data-i18n="settings.skill.model.hint">If not configured, the main Summarizer Model above will be used for skill generation. Configure a dedicated model here for higher quality skill output.</div>
1622
+ <div class="field-hint" style="margin-bottom:12px" data-i18n="settings.skill.model.hint">If not configured, the main Summarizer Model above will be used for skill generation. Configure a dedicated thinking model here for higher quality skill output.</div>
1613
1623
  <div class="settings-grid">
1614
1624
  <div class="settings-field">
1615
1625
  <label data-i18n="settings.provider">Provider</label>
@@ -2126,6 +2136,7 @@ const I18N={
2126
2136
  'skills.search.placeholder':'Search skills...',
2127
2137
  'skills.search.local':'Local',
2128
2138
  'skills.search.noresult':'No matching skills found',
2139
+
2129
2140
  'skills.load.error':'Failed to load skills',
2130
2141
  'skills.hub.title':'\u{1F310} Team Skills',
2131
2142
  'skills.hub.empty':'No extra team skills to list here — either the hub has none yet, or every hub skill already appears in your local list above (same source skill).',
@@ -2273,7 +2284,10 @@ const I18N={
2273
2284
  'confirm.clearall2':'Are you absolutely sure?',
2274
2285
  'embed.on':'Embedding: ',
2275
2286
  'embed.off':'No embedding model',
2276
- 'embed.warn.local':'Using built-in mini model (384d). Search quality is limited configure an embedding model in Settings for best results.',
2287
+ 'embed.warn.local':'<strong>Embedding</strong>: Using built-in mini model (384d). Search quality is limited. It is highly recommended to configure a dedicated Embedding model (like bge-m3) in Settings for best results.',
2288
+ 'fallback.banner.sum': '<strong>Summarizer</strong>: Summarizer model is not configured, automatic memory summarization is paused. A fast, non-reasoning model is recommended for best performance.',
2289
+ 'fallback.banner.skill': '<strong>Skill Evolution</strong>: Skill Evolution model is not configured. A reasoning/thinking model is recommended for best stability and generation quality.',
2290
+ 'fallback.banner.goto': 'Configure models',
2277
2291
  'embed.err.fail':'Embedding model error detected. Check Settings → Model Health.',
2278
2292
  'embed.banner.goto':'Go to Settings',
2279
2293
  'lang.switch':'中',
@@ -2298,6 +2312,10 @@ const I18N={
2298
2312
  'tab.settings':'\u2699 Settings',
2299
2313
  'settings.modelconfig':'Model Configuration',
2300
2314
  'settings.models':'AI Models',
2315
+ 'settings.warn.title':'\u{1F514} Model Configuration Important Reminder',
2316
+ 'settings.warn.emb':'<strong>Embedding Model:</strong> The built-in model is small. For a more accurate memory retrieval experience, it is highly recommended to configure a professional embedding model such as <code>bge-m3</code>.',
2317
+ 'settings.warn.sum':'<strong>Summarizer Model:</strong> This is <strong>required</strong>, otherwise automatic memory summarization will fail. A fast, non-reasoning model is recommended for best performance.',
2318
+ 'settings.warn.skill':'<strong>Skill Evolution:</strong> Used to automatically extract reusable skills. A reasoning/thinking model is recommended for best stability and generation quality.',
2301
2319
  'settings.models.desc':'Configure embedding, summarizer and skill evolution models',
2302
2320
  'settings.modelhealth':'Model Health',
2303
2321
  'settings.embedding':'Embedding Model',
@@ -2321,7 +2339,7 @@ const I18N={
2321
2339
  'settings.skill.confidence':'Min Confidence',
2322
2340
  'settings.skill.minchunks':'Min Chunks',
2323
2341
  'settings.skill.model':'Skill Dedicated Model',
2324
- 'settings.skill.model.hint':'Leave empty to reuse the Summarizer model. Set a dedicated one for higher quality.',
2342
+ 'settings.skill.model.hint':'Leave empty to reuse the Summarizer model. Set a dedicated thinking model for higher quality.',
2325
2343
  'settings.optional':'Optional',
2326
2344
  'settings.skill.usemain':'Use Main Summarizer',
2327
2345
  'settings.telemetry':'Telemetry',
@@ -2899,6 +2917,7 @@ const I18N={
2899
2917
  'skills.search.placeholder':'搜索技能...',
2900
2918
  'skills.search.local':'本地',
2901
2919
  'skills.search.noresult':'未找到匹配的技能',
2920
+
2902
2921
  'skills.load.error':'加载技能失败',
2903
2922
  'skills.hub.title':'\u{1F310} 团队共享技能',
2904
2923
  'skills.hub.empty':'下方只列出「Hub 上有、但上方本机列表尚未包含」的技能;若 Hub 条目已与本机同源同步,则只会在上方显示,此处为空属正常。',
@@ -3046,7 +3065,10 @@ const I18N={
3046
3065
  'confirm.clearall2':'你真的确定吗?',
3047
3066
  'embed.on':'嵌入模型:',
3048
3067
  'embed.off':'无嵌入模型',
3049
- 'embed.warn.local':'当前使用内置迷你模型(384维),搜索效果有限。强烈建议在「设置」中配置专用 Embedding 模型以获得最佳效果。',
3068
+ 'embed.warn.local':'<strong>嵌入模型 (Embedding)</strong>:当前使用内置迷你模型(384维),搜索效果有限。强烈建议在「设置」中配置专用 Embedding 模型(如bge-m3等模型)以获得最佳效果。',
3069
+ 'fallback.banner.sum': '<strong>摘要模型 (Summarizer)</strong>:摘要模型未配置,无法自动提取记忆摘要。建议配置非思考型大模型,以保障处理速度和流畅度。',
3070
+ 'fallback.banner.skill': '<strong>技能模型 (Skill Evolution)</strong>:技能模型未配置,建议配置思考型大模型,以获得最佳的生成效果和稳定性。',
3071
+ 'fallback.banner.goto': '前往配置',
3050
3072
  'embed.err.fail':'Embedding 模型调用异常,请前往「设置 → 模型健康」检查。',
3051
3073
  'embed.banner.goto':'前往设置',
3052
3074
  'lang.switch':'EN',
@@ -3071,6 +3093,10 @@ const I18N={
3071
3093
  'tab.settings':'\u2699 设置',
3072
3094
  'settings.modelconfig':'模型配置',
3073
3095
  'settings.models':'AI 模型',
3096
+ 'settings.warn.title':'\u{1F514} 模型配置重要提醒',
3097
+ 'settings.warn.emb':'<strong>嵌入模型 (Embedding):</strong>插件内置模型规模较小。为获得更精准的记忆检索体验,强烈建议配置 <code>bge-m3</code> 等专业嵌入模型。',
3098
+ 'settings.warn.sum':'<strong>摘要模型 (Summarizer):</strong>此项为<strong>必填项</strong>,否则无法自动提取记忆摘要。建议配置<strong>非思考型</strong>大模型,以保障处理速度和流畅度。',
3099
+ 'settings.warn.skill':'<strong>技能模型 (Skill Evolution):</strong>用于自动提取可复用技能。建议配置<strong>思考型</strong>大模型,以获得最佳的生成效果和稳定性。',
3074
3100
  'settings.models.desc':'配置嵌入模型、摘要模型和技能进化模型',
3075
3101
  'settings.modelhealth':'模型健康',
3076
3102
  'settings.embedding':'嵌入模型',
@@ -3094,7 +3120,7 @@ const I18N={
3094
3120
  'settings.skill.confidence':'最低置信度',
3095
3121
  'settings.skill.minchunks':'最少记忆片段',
3096
3122
  'settings.skill.model':'技能专用模型',
3097
- 'settings.skill.model.hint':'不配置则复用摘要模型。如需更高质量可单独指定。',
3123
+ 'settings.skill.model.hint':'不配置则复用摘要模型。如需更高质量可单独指定思考模型。',
3098
3124
  'settings.optional':'可选',
3099
3125
  'settings.skill.usemain':'使用主摘要模型',
3100
3126
  'settings.telemetry':'数据统计',
@@ -3640,6 +3666,10 @@ function applyI18n(){
3640
3666
  const key=el.getAttribute('data-i18n');
3641
3667
  if(key) el.textContent=t(key);
3642
3668
  });
3669
+ document.querySelectorAll('[data-i18n-html]').forEach(el=>{
3670
+ const key=el.getAttribute('data-i18n-html');
3671
+ if(key) el.innerHTML=t(key);
3672
+ });
3643
3673
  document.querySelectorAll('[data-i18n-ph]').forEach(el=>{
3644
3674
  const key=el.getAttribute('data-i18n-ph');
3645
3675
  if(key) el.placeholder=t(key);
@@ -3647,7 +3677,15 @@ function applyI18n(){
3647
3677
  const step2=document.getElementById('resetStep2Desc');
3648
3678
  if(step2) step2.innerHTML=t('reset.step2.desc.pre')+'<span style="font-family:monospace;font-size:12px;color:var(--pri)">password reset token: <strong>a1b2c3d4e5f6...</strong></span>'+t('reset.step2.desc.post');
3649
3679
  document.title=t('title')+' - OpenClaw';
3650
- if(typeof loadStats==='function' && document.getElementById('app').style.display==='flex'){loadStats();}
3680
+ if(typeof loadStats==='function' && document.getElementById('app').style.display==='flex'){
3681
+ _embeddingWarningShown = false;
3682
+ _fallbackWarningShown = false;
3683
+ _lastStatsFp = '';
3684
+ const embB = document.getElementById('embBanner'); if (embB) embB.remove();
3685
+ const fSumB = document.getElementById('fallbackBannerSum'); if (fSumB) fSumB.remove();
3686
+ const fSkillB = document.getElementById('fallbackBannerSkill'); if (fSkillB) fSkillB.remove();
3687
+ loadStats();
3688
+ }
3651
3689
  if(document.querySelector('.analytics-view.show') && typeof loadMetrics==='function'){loadMetrics();}
3652
3690
  }
3653
3691
 
@@ -8263,6 +8301,7 @@ async function loadAll(){
8263
8301
  }
8264
8302
 
8265
8303
  var _lastStatsFp='';
8304
+ var _fallbackWarningShown=false;
8266
8305
  async function loadStats(ownerFilter){
8267
8306
  let d;
8268
8307
  try{
@@ -8312,6 +8351,19 @@ async function loadStats(ownerFilter){
8312
8351
  }).catch(()=>{});
8313
8352
  }
8314
8353
 
8354
+ if(!_fallbackWarningShown){
8355
+ _fallbackWarningShown=true;
8356
+ var sumWarn = (d.summarizerProvider === 'none') ? t('fallback.banner.sum') : '';
8357
+ var skillWarn = (d.skillEvolutionProvider === 'none') ? t('fallback.banner.skill') : '';
8358
+
8359
+ if (sumWarn) {
8360
+ showFallbackBanner('fallbackBannerSum', '<div>'+sumWarn+'</div>', 'warning');
8361
+ }
8362
+ if (skillWarn) {
8363
+ showFallbackBanner('fallbackBannerSkill', '<div>'+skillWarn+'</div>', 'warning');
8364
+ }
8365
+ }
8366
+
8315
8367
  const memorySessions=d.sessions||[];
8316
8368
  const taskSessions=d.taskSessions||[];
8317
8369
  const skillSessions=d.skillSessions||[];
@@ -9623,7 +9675,22 @@ function showEmbeddingBanner(msg,type){
9623
9675
  var el=document.createElement('div');
9624
9676
  el.id='embBanner';
9625
9677
  el.className=cls;
9626
- el.innerHTML=icon+' <span>'+esc(msg)+'</span>'+btn+close;
9678
+ el.innerHTML=icon+' <span>'+msg+'</span>'+btn+close;
9679
+ var mc=document.querySelector('.main-content');
9680
+ if(mc) mc.parentElement.insertBefore(el,mc);
9681
+ }
9682
+
9683
+ /* ─── Fallback Banner ─── */
9684
+ function showFallbackBanner(id, msgHtml,type){
9685
+ if(document.getElementById(id)) return;
9686
+ var cls=type==='error'?'emb-banner error':'emb-banner warning';
9687
+ var icon=type==='error'?'\\u274C':'\\u26A0\\uFE0F';
9688
+ var btn='<button class="emb-banner-btn" onclick="switchView(\\'settings\\');this.parentElement.remove()" style="margin-left:auto;">'+t('fallback.banner.goto')+'</button>';
9689
+ var close='<button class="emb-banner-close" onclick="this.parentElement.remove()">&times;</button>';
9690
+ var el=document.createElement('div');
9691
+ el.id=id;
9692
+ el.className=cls;
9693
+ el.innerHTML=icon+' <div style="line-height:1.5;flex:1;">'+msgHtml+'</div>'+btn+close;
9627
9694
  var mc=document.querySelector('.main-content');
9628
9695
  if(mc) mc.parentElement.insertBefore(el,mc);
9629
9696
  }
@@ -211,13 +211,24 @@ export class ViewerServer {
211
211
  }
212
212
  }
213
213
 
214
- stop(): void {
215
- this.stopHubHeartbeat();
216
- this.stopNotifPoll();
217
- for (const c of this.notifSSEClients) { try { c.end(); } catch {} }
218
- this.notifSSEClients = [];
219
- this.server?.close();
220
- this.server = null;
214
+ stop(): Promise<void> {
215
+ return new Promise((resolve) => {
216
+ this.stopHubHeartbeat();
217
+ this.stopNotifPoll();
218
+ for (const c of this.notifSSEClients) { try { c.end(); } catch {} }
219
+ this.notifSSEClients = [];
220
+ if (this.server) {
221
+ if ("closeAllConnections" in this.server) {
222
+ (this.server as any).closeAllConnections();
223
+ }
224
+ this.server.close(() => {
225
+ this.server = null;
226
+ resolve();
227
+ });
228
+ } else {
229
+ resolve();
230
+ }
231
+ });
221
232
  }
222
233
 
223
234
  getResetToken(): string {
@@ -904,6 +915,9 @@ export class ViewerServer {
904
915
  totalMemories: total.count, totalSessions: sessions.count, totalEmbeddings: embCount,
905
916
  totalSkills: skillCount, totalTasks: taskCount,
906
917
  embeddingProvider: this.embedder.provider,
918
+ summarizerProvider: this.ctx?.config?.summarizer?.provider ?? "none",
919
+ skillEvolutionProvider: this.ctx?.config?.skillEvolution?.enabled ? (this.ctx?.config?.summarizer?.provider ?? "none") : "none",
920
+ isSummarizerDegraded: this.ctx ? !this.hasUsableSummarizerProvider(this.ctx.config) : false,
907
921
  dedupBreakdown,
908
922
  timeRange: { earliest: timeRange.earliest, latest: timeRange.latest },
909
923
  sessions: sessionList,
@@ -1,5 +0,0 @@
1
- {
2
- "endpoint": "https://proj-xtrace-e218d9316b328f196a3c640cc7ca84-cn-hangzhou.cn-hangzhou.log.aliyuncs.com/rum/web/v2?workspace=default-cms-1026429231103299-cn-hangzhou&service_id=a3u72ukxmr@066657d42a13a9a9f337f",
3
- "pid": "a3u72ukxmr@066657d42a13a9a9f337f",
4
- "env": "prod"
5
- }