mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:36 +00:00
fix(ci): restore main lint/typecheck after direct merges
This commit is contained in:
@@ -97,10 +97,10 @@ function generateHtml(sessionData: SessionData): string {
|
||||
|
||||
// Build CSS with theme variables
|
||||
const css = templateCss
|
||||
.replace("{{THEME_VARS}}", themeVars)
|
||||
.replace("{{BODY_BG}}", bodyBg)
|
||||
.replace("{{CONTAINER_BG}}", containerBg)
|
||||
.replace("{{INFO_BG}}", infoBg);
|
||||
.replace("/* {{THEME_VARS}} */", themeVars.trim())
|
||||
.replace("/* {{BODY_BG_DECL}} */", `--body-bg: ${bodyBg};`)
|
||||
.replace("/* {{CONTAINER_BG_DECL}} */", `--container-bg: ${containerBg};`)
|
||||
.replace("/* {{INFO_BG_DECL}} */", `--info-bg: ${infoBg};`);
|
||||
|
||||
return template
|
||||
.replace("{{CSS}}", css)
|
||||
@@ -234,7 +234,7 @@ export async function buildExportSessionReply(params: HandleCommandsParams): Pro
|
||||
const args = parseExportArgs(params.command.commandBodyNormalized);
|
||||
|
||||
// 1. Resolve session file
|
||||
const sessionEntry = params.sessionEntry as SessionEntry | undefined;
|
||||
const sessionEntry = params.sessionEntry;
|
||||
if (!sessionEntry?.sessionId) {
|
||||
return { text: "❌ No active session found." };
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function trimMeshPlanCache() {
|
||||
return;
|
||||
}
|
||||
const oldest = [...meshPlanCache.entries()]
|
||||
.sort((a, b) => a[1].createdAt - b[1].createdAt)
|
||||
.toSorted((a, b) => a[1].createdAt - b[1].createdAt)
|
||||
.slice(0, meshPlanCache.size - MAX_CACHED_MESH_PLANS);
|
||||
for (const [key] of oldest) {
|
||||
meshPlanCache.delete(key);
|
||||
@@ -110,7 +110,10 @@ function putCachedPlan(params: Parameters<CommandHandler>[0], plan: MeshPlanShap
|
||||
trimMeshPlanCache();
|
||||
}
|
||||
|
||||
function getCachedPlan(params: Parameters<CommandHandler>[0], planId: string): MeshPlanShape | null {
|
||||
function getCachedPlan(
|
||||
params: Parameters<CommandHandler>[0],
|
||||
planId: string,
|
||||
): MeshPlanShape | null {
|
||||
return meshPlanCache.get(cacheKeyForPlan(params, planId))?.plan ?? null;
|
||||
}
|
||||
|
||||
@@ -190,7 +193,9 @@ export const handleMeshCommand: CommandHandler = async (params, allowTextCommand
|
||||
return null;
|
||||
}
|
||||
if (!params.command.isAuthorizedSender) {
|
||||
logVerbose(`Ignoring /mesh from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
||||
logVerbose(
|
||||
`Ignoring /mesh from unauthorized sender: ${params.command.senderId || "<unknown>"}`,
|
||||
);
|
||||
return { shouldContinue: false };
|
||||
}
|
||||
if (!parsed.ok) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,54 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Session Export</title>
|
||||
<style>
|
||||
{{CSS}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="hamburger" title="Open sidebar"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" stroke="none"><circle cx="6" cy="6" r="2.5"/><circle cx="6" cy="18" r="2.5"/><circle cx="18" cy="12" r="2.5"/><rect x="5" y="6" width="2" height="12"/><path d="M6 12h10c1 0 2 0 2-2V8"/></svg></button>
|
||||
<div id="sidebar-overlay"></div>
|
||||
<div id="app">
|
||||
<aside id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-controls">
|
||||
<input type="text" class="sidebar-search" id="tree-search" placeholder="Search...">
|
||||
</div>
|
||||
<div class="sidebar-filters">
|
||||
<button class="filter-btn active" data-filter="default" title="Hide settings entries">Default</button>
|
||||
<button class="filter-btn" data-filter="no-tools" title="Default minus tool results">No-tools</button>
|
||||
<button class="filter-btn" data-filter="user-only" title="Only user messages">User</button>
|
||||
<button class="filter-btn" data-filter="labeled-only" title="Only labeled entries">Labeled</button>
|
||||
<button class="filter-btn" data-filter="all" title="Show everything">All</button>
|
||||
<button class="sidebar-close" id="sidebar-close" title="Close">✕</button>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Session Export</title>
|
||||
<style>
|
||||
{{CSS}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="hamburger" title="Open sidebar">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<circle cx="6" cy="6" r="2.5" />
|
||||
<circle cx="6" cy="18" r="2.5" />
|
||||
<circle cx="18" cy="12" r="2.5" />
|
||||
<rect x="5" y="6" width="2" height="12" />
|
||||
<path d="M6 12h10c1 0 2 0 2-2V8" />
|
||||
</svg>
|
||||
</button>
|
||||
<div id="sidebar-overlay"></div>
|
||||
<div id="app">
|
||||
<aside id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-controls">
|
||||
<input type="text" class="sidebar-search" id="tree-search" placeholder="Search..." />
|
||||
</div>
|
||||
<div class="sidebar-filters">
|
||||
<button class="filter-btn active" data-filter="default" title="Hide settings entries">
|
||||
Default
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="no-tools" title="Default minus tool results">
|
||||
No-tools
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="user-only" title="Only user messages">
|
||||
User
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="labeled-only" title="Only labeled entries">
|
||||
Labeled
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="all" title="Show everything">All</button>
|
||||
<button class="sidebar-close" id="sidebar-close" title="Close">✕</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree-container" id="tree-container"></div>
|
||||
<div class="tree-status" id="tree-status"></div>
|
||||
</aside>
|
||||
<main id="content">
|
||||
<div id="header-container"></div>
|
||||
<div id="messages"></div>
|
||||
</main>
|
||||
<div id="image-modal" class="image-modal">
|
||||
<img id="modal-image" src="" alt="" />
|
||||
</div>
|
||||
<div class="tree-container" id="tree-container"></div>
|
||||
<div class="tree-status" id="tree-status"></div>
|
||||
</aside>
|
||||
<main id="content">
|
||||
<div id="header-container"></div>
|
||||
<div id="messages"></div>
|
||||
</main>
|
||||
<div id="image-modal" class="image-modal">
|
||||
<img id="modal-image" src="" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script id="session-data" type="application/json">{{SESSION_DATA}}</script>
|
||||
<script id="session-data" type="application/json">
|
||||
{{SESSION_DATA}}
|
||||
</script>
|
||||
|
||||
<!-- Vendored libraries -->
|
||||
<script>{{MARKED_JS}}</script>
|
||||
<!-- Vendored libraries -->
|
||||
<script>
|
||||
{
|
||||
{
|
||||
MARKED_JS;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- highlight.js -->
|
||||
<script>{{HIGHLIGHT_JS}}</script>
|
||||
<!-- highlight.js -->
|
||||
<script>
|
||||
{
|
||||
{
|
||||
HIGHLIGHT_JS;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Main application code -->
|
||||
<script>
|
||||
{{JS}}
|
||||
</script>
|
||||
</body>
|
||||
<!-- Main application code -->
|
||||
<script>
|
||||
{
|
||||
{
|
||||
JS;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -130,7 +130,9 @@ export async function initSessionState(params: {
|
||||
// Stale cache (especially with multiple gateway processes or on Windows where
|
||||
// mtime granularity may miss rapid writes) can cause incorrect sessionId
|
||||
// generation, leading to orphaned transcript files. See #17971.
|
||||
const sessionStore: Record<string, SessionEntry> = loadSessionStore(storePath, { skipCache: true });
|
||||
const sessionStore: Record<string, SessionEntry> = loadSessionStore(storePath, {
|
||||
skipCache: true,
|
||||
});
|
||||
let sessionKey: string | undefined;
|
||||
let sessionEntry: SessionEntry;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user