mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-15 19:01:24 +00:00
fix: align trace directive types
This commit is contained in:
@@ -1207,16 +1207,16 @@ async function readActiveMemorySearchDebug(
|
||||
continue;
|
||||
}
|
||||
return {
|
||||
backend: normalizeOptionalString(debug.backend),
|
||||
configuredMode: normalizeOptionalString(debug.configuredMode),
|
||||
effectiveMode: normalizeOptionalString(debug.effectiveMode),
|
||||
fallback: normalizeOptionalString(debug.fallback),
|
||||
backend: normalizeOptionalString(debug?.backend),
|
||||
configuredMode: normalizeOptionalString(debug?.configuredMode),
|
||||
effectiveMode: normalizeOptionalString(debug?.effectiveMode),
|
||||
fallback: normalizeOptionalString(debug?.fallback),
|
||||
searchMs:
|
||||
typeof debug.searchMs === "number" && Number.isFinite(debug.searchMs)
|
||||
typeof debug?.searchMs === "number" && Number.isFinite(debug.searchMs)
|
||||
? debug.searchMs
|
||||
: undefined,
|
||||
hits:
|
||||
typeof debug.hits === "number" && Number.isFinite(debug.hits) ? debug.hits : undefined,
|
||||
typeof debug?.hits === "number" && Number.isFinite(debug.hits) ? debug.hits : undefined,
|
||||
warning,
|
||||
action,
|
||||
error,
|
||||
|
||||
@@ -260,7 +260,7 @@ describe("directive behavior", () => {
|
||||
|
||||
it("shows current trace level and persists trace directives", async () => {
|
||||
const { text: currentText } = await runDirectiveStatus("/trace", {
|
||||
sessionEntry: { traceLevel: "on" },
|
||||
sessionEntry: { sessionId: "trace", updatedAt: Date.now(), traceLevel: "on" },
|
||||
});
|
||||
expect(currentText).toContain("Current trace level: on");
|
||||
|
||||
@@ -269,7 +269,7 @@ describe("directive behavior", () => {
|
||||
expect(enabled.sessionEntry.traceLevel).toBe("on");
|
||||
|
||||
const disabled = await runDirectiveStatus("/trace off", {
|
||||
sessionEntry: { traceLevel: "on" },
|
||||
sessionEntry: { sessionId: "trace", updatedAt: Date.now(), traceLevel: "on" },
|
||||
});
|
||||
expect(disabled.text).toContain("Plugin trace disabled.");
|
||||
expect(disabled.sessionEntry.traceLevel).toBe("off");
|
||||
|
||||
@@ -174,6 +174,7 @@ function buildCommandParams(params?: {
|
||||
invalidExecNode: false,
|
||||
hasStatusDirective: false,
|
||||
hasModelDirective: false,
|
||||
hasTraceDirective: false,
|
||||
hasQueueDirective: false,
|
||||
queueReset: false,
|
||||
hasQueueOptions: false,
|
||||
|
||||
@@ -56,6 +56,7 @@ function buildContext(params?: {
|
||||
invalidExecNode: false,
|
||||
hasStatusDirective: false,
|
||||
hasModelDirective: false,
|
||||
hasTraceDirective: false,
|
||||
hasQueueDirective: false,
|
||||
queueReset: false,
|
||||
hasQueueOptions: false,
|
||||
|
||||
Reference in New Issue
Block a user