Commit 42e1e38
authored
fix: rebrand viewer, fix embedding warning, fix memory_add/search order (#1446)
## Summary
### 1. Rebrand viewer from OpenClaw to MemTensor
- Replace all 28 user-visible "OpenClaw" references with "MemTensor" in
the memory viewer UI
- Update `server.ts` branding replacement regex to match new text
### 2. Fix embedding warning banner
- Banner now dismisses when a configured (non-local) embedding provider
is detected
- Previously the warning persisted forever after first page load due to
`_embeddingWarningShown` flag
### 3. Fix memory_add/search order (critical)
- **Problem**: Hermes calls `sync_all()` before `queue_prefetch_all()`,
so the current turn's data was ingested before the next prefetch search
ran. This caused every search to return the just-added turn content —
redundant and wasting context window.
- **Fix**: `sync_turn()` now defers ingest by stashing the data.
`queue_prefetch()` picks it up and flushes AFTER the search completes.
This ensures recalled memories never include the current turn.
- `on_session_end()` flushes any remaining deferred ingest to prevent
data loss.
## Changed files
| File | Change |
|------|--------|
| `adapters/hermes/__init__.py` | Defer ingest, search-before-add
ordering |
| `src/viewer/html.ts` | Rebrand OpenClaw → MemTensor, fix embedding
banner |
| `src/viewer/server.ts` | Update branding regex |
## Test plan
- [ ] Start `hermes chat`, send a message — verify logs show `search`
before `add`
- [ ] Verify search results don't contain the message just sent
- [ ] Verify viewer title shows "MemTensor Memory"
- [ ] Configure embedding model → warning banner disappears
- [ ] Exit session → verify deferred ingest is flushed (no data loss)File tree
6 files changed
+186
-67
lines changed- apps/memos-local-plugin
- adapters/hermes
- src
- ingest
- viewer
6 files changed
+186
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
49 | 84 | | |
50 | 85 | | |
51 | 86 | | |
| |||
56 | 91 | | |
57 | 92 | | |
58 | 93 | | |
| 94 | + | |
59 | 95 | | |
60 | 96 | | |
61 | 97 | | |
| |||
122 | 158 | | |
123 | 159 | | |
124 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
125 | 164 | | |
| 165 | + | |
126 | 166 | | |
127 | 167 | | |
128 | 168 | | |
| |||
131 | 171 | | |
132 | 172 | | |
133 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
134 | 190 | | |
135 | 191 | | |
136 | 192 | | |
| |||
172 | 228 | | |
173 | 229 | | |
174 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
175 | 239 | | |
176 | 240 | | |
177 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
178 | 249 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 250 | + | |
199 | 251 | | |
200 | 252 | | |
201 | 253 | | |
| |||
256 | 308 | | |
257 | 309 | | |
258 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
259 | 327 | | |
260 | 328 | | |
261 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
10 | 44 | | |
11 | 45 | | |
12 | 46 | | |
| |||
30 | 64 | | |
31 | 65 | | |
32 | 66 | | |
33 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
34 | 75 | | |
35 | 76 | | |
36 | 77 | | |
| |||
0 commit comments