mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:40:44 +00:00
fix: reduce WebUI session latency churn (#76277) thanks @BunsDev
Reduce WebUI/Gateway latency churn by avoiding redundant session reloads, carrying session keys through transcript update events, and deferring explicit media provider discovery. Includes changelog attribution and closes the referenced runtime latency issues.
This commit is contained in:
@@ -427,14 +427,16 @@ function isNpmExecPath(value: string): boolean {
|
||||
return /^npm(?:-cli)?(?:\.(?:c?js|cmd|exe))?$/.test(basename(value).toLowerCase());
|
||||
}
|
||||
|
||||
export function resolveNpmCommandInvocation(params?: {
|
||||
npmExecPath?: string;
|
||||
nodeExecPath?: string;
|
||||
platform?: NodeJS.Platform;
|
||||
}): { command: string; args: string[] } {
|
||||
const npmExecPath = params === undefined ? process.env.npm_execpath : params.npmExecPath;
|
||||
const nodeExecPath = params?.nodeExecPath ?? process.execPath;
|
||||
const npmCommand = (params?.platform ?? process.platform) === "win32" ? "npm.cmd" : "npm";
|
||||
export function resolveNpmCommandInvocation(
|
||||
params: {
|
||||
npmExecPath?: string;
|
||||
nodeExecPath?: string;
|
||||
platform?: NodeJS.Platform;
|
||||
} = {},
|
||||
): { command: string; args: string[] } {
|
||||
const npmExecPath = params.npmExecPath ?? process.env.npm_execpath;
|
||||
const nodeExecPath = params.nodeExecPath ?? process.execPath;
|
||||
const npmCommand = (params.platform ?? process.platform) === "win32" ? "npm.cmd" : "npm";
|
||||
|
||||
if (typeof npmExecPath === "string" && npmExecPath.length > 0 && isNpmExecPath(npmExecPath)) {
|
||||
return { command: nodeExecPath, args: [npmExecPath] };
|
||||
|
||||
Reference in New Issue
Block a user