























@@ -71,31 +71,26 @@ function createMemoryRuntimeFixture() {
7171}
72727373function expectMemoryRuntimeLoaded(
74-rawConfig: unknown,
75-autoEnabledConfig: unknown,
74+config: unknown,
7675pluginIds: readonly string[] = ["memory-core"],
7776) {
78-void rawConfig;
79-void autoEnabledConfig;
80-expect(getLoadedRuntimePluginRegistryMock).toHaveBeenCalledWith(
81-expect.objectContaining({
82-requiredPluginIds: pluginIds,
83-}),
84-);
85-expect(ensureStandaloneRuntimePluginRegistryLoadedMock).toHaveBeenCalledWith(
86-expect.objectContaining({
87-requiredPluginIds: pluginIds,
88-loadOptions: expect.objectContaining({
89-onlyPluginIds: pluginIds,
90-workspaceDir: "/resolved-workspace",
91-}),
92-}),
93-);
77+expect(getLoadedRuntimePluginRegistryMock).toHaveBeenCalledWith({
78+requiredPluginIds: pluginIds,
79+});
80+expect(ensureStandaloneRuntimePluginRegistryLoadedMock).toHaveBeenCalledWith({
81+requiredPluginIds: pluginIds,
82+loadOptions: {
83+ config,
84+onlyPluginIds: pluginIds,
85+workspaceDir: "/resolved-workspace",
86+},
87+});
9488}
95899690function expectMemoryAutoEnableApplied(rawConfig: unknown, autoEnabledConfig: unknown) {
9791expect(applyPluginAutoEnableMock).not.toHaveBeenCalled();
98-expectMemoryRuntimeLoaded(rawConfig, autoEnabledConfig);
92+expectMemoryRuntimeLoaded(rawConfig);
93+expect(rawConfig).not.toBe(autoEnabledConfig);
9994}
1009510196function setAutoEnabledMemoryRuntime() {
@@ -216,7 +211,7 @@ describe("memory runtime auto-enable loading", () => {
216211agentId: "main",
217212});
218213219-expectMemoryRuntimeLoaded(rawConfig, rawConfig, ["memory-lancedb"]);
214+expectMemoryRuntimeLoaded(rawConfig, ["memory-lancedb"]);
220215});
221216222217it("does not fall back to broad plugin loading when the memory slot is disabled", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。