mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 12:11:20 +00:00
style: format memory and gateway touchups
This commit is contained in:
@@ -4,8 +4,5 @@ export type {
|
||||
MemoryProviderStatus,
|
||||
MemorySyncProgressUpdate,
|
||||
} from "openclaw/plugin-sdk/memory-core-host-engine-storage";
|
||||
export {
|
||||
removeBackfillDiaryEntries,
|
||||
writeBackfillDiaryEntries,
|
||||
} from "./src/dreaming-narrative.js";
|
||||
export { removeBackfillDiaryEntries, writeBackfillDiaryEntries } from "./src/dreaming-narrative.js";
|
||||
export { previewGroundedRemMarkdown } from "./src/rem-evidence.js";
|
||||
|
||||
@@ -1087,9 +1087,7 @@ describe("memory cli", () => {
|
||||
await runMemoryCli(["rem-backfill", "--path", path.join(workspaceDir, "missing-history")]);
|
||||
|
||||
expect(
|
||||
errors.mock.calls.some((call) =>
|
||||
String(call[0]).includes("found no YYYY-MM-DD.md files"),
|
||||
),
|
||||
errors.mock.calls.some((call) => String(call[0]).includes("found no YYYY-MM-DD.md files")),
|
||||
).toBe(true);
|
||||
expect(close).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -295,7 +295,10 @@ export function buildBackfillDiaryEntry(params: {
|
||||
}): string {
|
||||
const dateStr = formatBackfillDiaryDate(params.isoDay, params.timezone);
|
||||
const marker = `<!-- ${BACKFILL_ENTRY_MARKER} day=${params.isoDay}${params.sourcePath ? ` source=${params.sourcePath}` : ""} -->`;
|
||||
const body = params.bodyLines.map((line) => line.trimEnd()).join("\n").trim();
|
||||
const body = params.bodyLines
|
||||
.map((line) => line.trimEnd())
|
||||
.join("\n")
|
||||
.trim();
|
||||
return [`*${dateStr}*`, marker, body].filter((part) => part.length > 0).join("\n\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -246,10 +246,7 @@ function normalizeMemoryPath(rawPath: string): string {
|
||||
function normalizeMemoryPathForWorkspace(workspaceDir: string, rawPath: string): string {
|
||||
const normalized = normalizeMemoryPath(rawPath);
|
||||
const workspaceNormalized = normalizeMemoryPath(workspaceDir);
|
||||
if (
|
||||
path.isAbsolute(rawPath) &&
|
||||
normalized.startsWith(`${workspaceNormalized}/`)
|
||||
) {
|
||||
if (path.isAbsolute(rawPath) && normalized.startsWith(`${workspaceNormalized}/`)) {
|
||||
return normalized.slice(workspaceNormalized.length + 1);
|
||||
}
|
||||
return normalized;
|
||||
|
||||
@@ -595,20 +595,14 @@ export const handleNodeEvent = async (ctx: NodeEventContext, nodeId: string, evt
|
||||
}
|
||||
|
||||
const runId = normalizeOptionalString(obj.runId) ?? "";
|
||||
const command = sanitizeInboundSystemTags(
|
||||
normalizeOptionalString(obj.command) ?? "",
|
||||
);
|
||||
const command = sanitizeInboundSystemTags(normalizeOptionalString(obj.command) ?? "");
|
||||
const exitCode =
|
||||
typeof obj.exitCode === "number" && Number.isFinite(obj.exitCode)
|
||||
? obj.exitCode
|
||||
: undefined;
|
||||
const timedOut = obj.timedOut === true;
|
||||
const output = sanitizeInboundSystemTags(
|
||||
normalizeOptionalString(obj.output) ?? "",
|
||||
);
|
||||
const reason = sanitizeInboundSystemTags(
|
||||
normalizeOptionalString(obj.reason) ?? "",
|
||||
);
|
||||
const output = sanitizeInboundSystemTags(normalizeOptionalString(obj.output) ?? "");
|
||||
const reason = sanitizeInboundSystemTags(normalizeOptionalString(obj.reason) ?? "");
|
||||
|
||||
let text = "";
|
||||
if (evt.event === "exec.started") {
|
||||
|
||||
@@ -850,12 +850,11 @@
|
||||
padding: 18px 18px 16px;
|
||||
border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
|
||||
border-radius: 16px;
|
||||
background:
|
||||
linear-gradient(
|
||||
180deg,
|
||||
color-mix(in oklab, var(--bg-elevated, var(--bg)) 88%, #0d0818) 0%,
|
||||
color-mix(in oklab, var(--bg) 92%, #0d0818) 100%
|
||||
);
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
color-mix(in oklab, var(--bg-elevated, var(--bg)) 88%, #0d0818) 0%,
|
||||
color-mix(in oklab, var(--bg) 92%, #0d0818) 100%
|
||||
);
|
||||
box-shadow:
|
||||
0 12px 30px rgba(0, 0, 0, 0.14),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
|
||||
Reference in New Issue
Block a user