fix(telegram): exclude plugin commands from setMyCommands when native=false (openclaw#15164) thanks @Glucksberg

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test

Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
Glucksberg
2026-02-14 15:22:58 -04:00
committed by GitHub
parent 65eefd65e1
commit f537bd1796
5 changed files with 15 additions and 45 deletions

View File

@@ -110,11 +110,6 @@ const silentArgs =
const rawPassthroughArgs = process.argv.slice(2);
const passthroughArgs =
rawPassthroughArgs[0] === "--" ? rawPassthroughArgs.slice(1) : rawPassthroughArgs;
const rawTestProfile = process.env.OPENCLAW_TEST_PROFILE?.trim().toLowerCase();
const testProfile =
rawTestProfile === "low" || rawTestProfile === "max" || rawTestProfile === "normal"
? rawTestProfile
: "normal";
const overrideWorkers = Number.parseInt(process.env.OPENCLAW_TEST_WORKERS ?? "", 10);
const resolvedOverride =
Number.isFinite(overrideWorkers) && overrideWorkers > 0 ? overrideWorkers : null;
@@ -127,29 +122,10 @@ const keepGatewaySerial =
const parallelRuns = keepGatewaySerial ? runs.filter((entry) => entry.name !== "gateway") : runs;
const serialRuns = keepGatewaySerial ? runs.filter((entry) => entry.name === "gateway") : [];
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
const defaultWorkerBudget =
testProfile === "low"
? {
unit: 2,
unitIsolated: 1,
extensions: 1,
gateway: 1,
}
: testProfile === "max"
? {
unit: localWorkers,
unitIsolated: Math.min(4, localWorkers),
extensions: Math.max(1, Math.min(6, Math.floor(localWorkers / 2))),
gateway: Math.max(1, Math.min(2, Math.floor(localWorkers / 4))),
}
: {
// Local `pnpm test` runs multiple vitest groups concurrently;
// keep per-group workers conservative to avoid pegging all cores.
unit: Math.max(2, Math.min(8, Math.floor(localWorkers / 2))),
unitIsolated: 1,
extensions: Math.max(1, Math.min(4, Math.floor(localWorkers / 4))),
gateway: 1,
};
const defaultUnitWorkers = localWorkers;
// Local perf: extensions tend to be the critical path under parallel vitest runs; give them more headroom.
const defaultExtensionsWorkers = Math.max(1, Math.min(6, Math.floor(localWorkers / 2)));
const defaultGatewayWorkers = Math.max(1, Math.min(2, Math.floor(localWorkers / 4)));
// Keep worker counts predictable for local runs; trim macOS CI workers to avoid worker crashes/OOM.
// In CI on linux/windows, prefer Vitest defaults to avoid cross-test interference from lower worker counts.
@@ -164,15 +140,16 @@ const maxWorkersForRun = (name) => {
return 1;
}
if (name === "unit-isolated") {
return defaultWorkerBudget.unitIsolated;
// Local: allow a bit of parallelism while keeping this run stable.
return Math.min(4, localWorkers);
}
if (name === "extensions") {
return defaultWorkerBudget.extensions;
return defaultExtensionsWorkers;
}
if (name === "gateway") {
return defaultWorkerBudget.gateway;
return defaultGatewayWorkers;
}
return defaultWorkerBudget.unit;
return defaultUnitWorkers;
};
const WARNING_SUPPRESSION_FLAGS = [