refactor(plugins): drop duplicate memory reset alias · openclaw/openclaw@7fafad8
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Covers plugin-backed memory state registration and reset behavior. |
2 | 2 | import { afterEach, describe, expect, it } from "vitest"; |
3 | 3 | import { |
4 | | -resetMemoryPluginState, |
5 | 4 | buildMemoryPromptSection, |
6 | 5 | clearMemoryPluginState, |
7 | 6 | getMemoryCapabilityRegistration, |
@@ -363,7 +362,7 @@ describe("memory plugin state", () => {
|
363 | 362 | }); |
364 | 363 | const snapshot = createMemoryStateSnapshot(); |
365 | 364 | |
366 | | -resetMemoryPluginState(); |
| 365 | +clearMemoryPluginState(); |
367 | 366 | expectClearedMemoryState(); |
368 | 367 | |
369 | 368 | restoreMemoryPluginState(snapshot); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -348,5 +348,3 @@ export function clearMemoryPluginState(): void {
|
348 | 348 | memoryPluginState.corpusSupplements = []; |
349 | 349 | memoryPluginState.promptSupplements = []; |
350 | 350 | } |
351 | | - |
352 | | -export const resetMemoryPluginState = clearMemoryPluginState; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,14 +7,14 @@ import {
|
7 | 7 | import { afterEach, describe, expect, it } from "vitest"; |
8 | 8 | import { clearMemoryEmbeddingProviders } from "./memory-embedding-providers.js"; |
9 | 9 | import { |
10 | | -resetMemoryPluginState, |
| 10 | +clearMemoryPluginState, |
11 | 11 | getMemoryCapabilityRegistration, |
12 | 12 | getMemoryRuntime, |
13 | 13 | } from "./memory-state.js"; |
14 | 14 | import { createPluginRecord } from "./status.test-helpers.js"; |
15 | 15 | |
16 | 16 | afterEach(() => { |
17 | | -resetMemoryPluginState(); |
| 17 | +clearMemoryPluginState(); |
18 | 18 | clearMemoryEmbeddingProviders(); |
19 | 19 | }); |
20 | 20 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。