mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
fix(memory): align dreaming status payloads
This commit is contained in:
@@ -647,7 +647,9 @@ export async function runMemoryStatus(opts: MemoryCommandOptions) {
|
||||
purpose: managerPurpose,
|
||||
run: async (manager) => {
|
||||
const deep = Boolean(opts.deep || opts.index);
|
||||
let embeddingProbe: { ok?: boolean; error?: string } | undefined;
|
||||
let embeddingProbe:
|
||||
| Awaited<ReturnType<MemoryManager["probeEmbeddingAvailability"]>>
|
||||
| undefined;
|
||||
let indexError: string | undefined;
|
||||
const syncFn = manager.sync ? manager.sync.bind(manager) : undefined;
|
||||
if (deep) {
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
import type { ModelAliasIndex } from "../../agents/model-selection.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import type { SessionEntry } from "../../config/sessions.js";
|
||||
import type { ElevatedLevel } from "../thinking.js";
|
||||
import { handleDirectiveOnly } from "./directive-handling.impl.js";
|
||||
import { parseInlineDirectives } from "./directive-handling.js";
|
||||
import {
|
||||
@@ -706,7 +707,7 @@ describe("handleDirectiveOnly model persist behavior (fixes #1435)", () => {
|
||||
createHandleParams({
|
||||
...base,
|
||||
directives: parseInlineDirectives("/elevated"),
|
||||
currentElevatedLevel: sessionEntry.elevatedLevel,
|
||||
currentElevatedLevel: sessionEntry.elevatedLevel as ElevatedLevel | undefined,
|
||||
}),
|
||||
);
|
||||
expect(statusReply?.text).toContain("Current elevated level: on");
|
||||
@@ -715,7 +716,7 @@ describe("handleDirectiveOnly model persist behavior (fixes #1435)", () => {
|
||||
createHandleParams({
|
||||
...base,
|
||||
directives: parseInlineDirectives("/elevated off"),
|
||||
currentElevatedLevel: sessionEntry.elevatedLevel,
|
||||
currentElevatedLevel: sessionEntry.elevatedLevel as ElevatedLevel | undefined,
|
||||
}),
|
||||
);
|
||||
expect(offReply?.text).toContain("Elevated mode disabled");
|
||||
|
||||
@@ -506,6 +506,7 @@ async function loadDreamingStoreStats(
|
||||
shortTermCount: 0,
|
||||
recallSignalCount: 0,
|
||||
dailySignalCount: 0,
|
||||
groundedSignalCount: 0,
|
||||
totalSignalCount: 0,
|
||||
phaseSignalCount: 0,
|
||||
lightPhaseHitCount: 0,
|
||||
@@ -523,6 +524,7 @@ async function loadDreamingStoreStats(
|
||||
shortTermCount: 0,
|
||||
recallSignalCount: 0,
|
||||
dailySignalCount: 0,
|
||||
groundedSignalCount: 0,
|
||||
totalSignalCount: 0,
|
||||
phaseSignalCount: 0,
|
||||
lightPhaseHitCount: 0,
|
||||
@@ -543,6 +545,7 @@ function mergeDreamingStoreStats(stats: DreamingStoreStats[]): DreamingStoreStat
|
||||
let shortTermCount = 0;
|
||||
let recallSignalCount = 0;
|
||||
let dailySignalCount = 0;
|
||||
let groundedSignalCount = 0;
|
||||
let totalSignalCount = 0;
|
||||
let phaseSignalCount = 0;
|
||||
let lightPhaseHitCount = 0;
|
||||
@@ -563,6 +566,7 @@ function mergeDreamingStoreStats(stats: DreamingStoreStats[]): DreamingStoreStat
|
||||
shortTermCount += stat.shortTermCount;
|
||||
recallSignalCount += stat.recallSignalCount;
|
||||
dailySignalCount += stat.dailySignalCount;
|
||||
groundedSignalCount += stat.groundedSignalCount;
|
||||
totalSignalCount += stat.totalSignalCount;
|
||||
phaseSignalCount += stat.phaseSignalCount;
|
||||
lightPhaseHitCount += stat.lightPhaseHitCount;
|
||||
@@ -595,6 +599,7 @@ function mergeDreamingStoreStats(stats: DreamingStoreStats[]): DreamingStoreStat
|
||||
shortTermCount,
|
||||
recallSignalCount,
|
||||
dailySignalCount,
|
||||
groundedSignalCount,
|
||||
totalSignalCount,
|
||||
phaseSignalCount,
|
||||
lightPhaseHitCount,
|
||||
@@ -797,6 +802,7 @@ export const doctorHandlers: GatewayRequestHandlers = {
|
||||
shortTermCount: 0,
|
||||
recallSignalCount: 0,
|
||||
dailySignalCount: 0,
|
||||
groundedSignalCount: 0,
|
||||
totalSignalCount: 0,
|
||||
phaseSignalCount: 0,
|
||||
lightPhaseHitCount: 0,
|
||||
|
||||
@@ -103,6 +103,7 @@ describe("control UI routing", () => {
|
||||
shortTermCount: 2,
|
||||
recallSignalCount: 1,
|
||||
dailySignalCount: 1,
|
||||
groundedSignalCount: 0,
|
||||
totalSignalCount: 2,
|
||||
phaseSignalCount: 0,
|
||||
lightPhaseHitCount: 0,
|
||||
|
||||
Reference in New Issue
Block a user