style(repo): format touched helpers and tests

This commit is contained in:
Peter Steinberger
2026-04-06 16:16:00 +01:00
parent 9ca935720c
commit 514328a9ad
11 changed files with 20 additions and 28 deletions

View File

@@ -140,7 +140,9 @@ function normalizeDiscordStreamingAliases(params: {
const preview = ensureNestedRecord(streaming, "preview");
if (
(hadLegacyStreamMode || typeof beforeStreaming === "boolean" || typeof beforeStreaming === "string") &&
(hadLegacyStreamMode ||
typeof beforeStreaming === "boolean" ||
typeof beforeStreaming === "string") &&
streaming.mode === undefined
) {
streaming.mode = resolved;

View File

@@ -52,12 +52,10 @@ let matrixAuthClientDepsForTest: MatrixAuthClientDeps | undefined;
const MATRIX_AUTH_REQUEST_RETRY_RE =
/\b(fetch failed|econnreset|econnrefused|enotfound|etimedout|ehostunreach|enetunreach|eai_again|und_err_|socket hang up|network|headers timeout|body timeout|connect timeout)\b/i;
export function setMatrixAuthClientDepsForTest(
deps?: {
MatrixClient: typeof import("../sdk.js").MatrixClient;
ensureMatrixSdkLoggingConfigured: typeof import("./logging.js").ensureMatrixSdkLoggingConfigured;
},
): void {
export function setMatrixAuthClientDepsForTest(deps?: {
MatrixClient: typeof import("../sdk.js").MatrixClient;
ensureMatrixSdkLoggingConfigured: typeof import("./logging.js").ensureMatrixSdkLoggingConfigured;
}): void {
matrixAuthClientDepsForTest = deps;
}

View File

@@ -36,8 +36,8 @@ import {
sendReadReceiptMatrix,
sendTypingMatrix,
} from "../send.js";
import { resolveMatrixStoredSessionMeta } from "../session-store-metadata.js";
import { MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY } from "../send/types.js";
import { resolveMatrixStoredSessionMeta } from "../session-store-metadata.js";
import { resolveMatrixMonitorAccessState } from "./access-state.js";
import { resolveMatrixAckReactionConfig } from "./ack-config.js";
import { resolveMatrixAllowListMatch } from "./allowlist.js";

View File

@@ -15,8 +15,7 @@
--warning: #ffd36f;
--shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
--radius: 22px;
font-family:
"Avenir Next", "Segoe UI", sans-serif;
font-family: "Avenir Next", "Segoe UI", sans-serif;
}
* {

View File

@@ -3,10 +3,7 @@ import type {
ChannelDoctorLegacyConfigRule,
} from "openclaw/plugin-sdk/channel-contract";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
import {
resolveSlackNativeStreaming,
resolveSlackStreamingMode,
} from "./streaming-compat.js";
import { resolveSlackNativeStreaming, resolveSlackStreamingMode } from "./streaming-compat.js";
function asObjectRecord(value: unknown): Record<string, unknown> | null {
return value && typeof value === "object" && !Array.isArray(value)

View File

@@ -50,7 +50,9 @@ function collectMatchingToolResultIds(message: AgentMessage): Set<string> {
ids.add(toolResultId);
}
} else if (role === "tool") {
for (const id of extractToolResultIdsFromRecord(message as unknown as Record<string, unknown>)) {
for (const id of extractToolResultIdsFromRecord(
message as unknown as Record<string, unknown>,
)) {
ids.add(id);
}
}

View File

@@ -3,10 +3,7 @@ import {
validateConfigObjectRawWithPlugins,
validateConfigObjectWithPlugins,
} from "../../../config/validation.js";
import {
applyLegacyDoctorMigrations,
migrateLegacyConfig,
} from "./legacy-config-migrate.js";
import { applyLegacyDoctorMigrations, migrateLegacyConfig } from "./legacy-config-migrate.js";
describe("legacy migrate audio transcription", () => {
it("does not rewrite removed routing.transcribeAudio migrations", () => {

View File

@@ -67,8 +67,8 @@ describe("status-json-payload", () => {
gatewayProbeAuth: { token: "tok" },
gatewaySelf: { host: "gateway" },
gatewayProbeAuthWarning: "warn",
gatewayService: { label: "LaunchAgent", installed: true, loadedText: "loaded" },
nodeService: { label: "node", installed: true, loadedText: "loaded" },
gatewayService: { label: "LaunchAgent", installed: true, loadedText: "loaded" },
nodeService: { label: "node", installed: true, loadedText: "loaded" },
},
osSummary: { platform: "linux" },
memory: null,

View File

@@ -1,10 +1,9 @@
import { formatCliCommand } from "../cli/command-format.js";
import type { HeartbeatEventPayload } from "../infra/heartbeat-events.js";
import type { Tone } from "../memory-host-sdk/status.js";
import type { PluginCompatibilityNotice } from "../plugins/status.js";
import { formatCliCommand } from "../cli/command-format.js";
import { VERSION } from "../version.js";
import type { HealthSummary } from "./health.js";
import type { AgentLocalStatus } from "./status.agent-local.js";
import {
buildStatusOverviewRowsFromSurface,
type StatusOverviewSurface,
@@ -17,6 +16,7 @@ import {
buildStatusSecretsValue,
buildStatusSessionsOverviewValue,
} from "./status-overview-values.ts";
import type { AgentLocalStatus } from "./status.agent-local.js";
import {
buildStatusAgentsValue,
buildStatusHeartbeatValue,

View File

@@ -5,13 +5,13 @@ import type { PluginCompatibilityNotice } from "../plugins/status.js";
import type { SecurityAuditReport } from "../security/audit.js";
import type { RenderTableOptions, TableColumn } from "../terminal/table.js";
import type { HealthSummary } from "./health.js";
import type { AgentLocalStatus } from "./status.agent-local.js";
import {
buildStatusChannelsTableRows,
statusChannelsTableColumns,
} from "./status-all/channels-table.js";
import { buildStatusCommandOverviewRows } from "./status-overview-rows.ts";
import type { StatusOverviewSurface } from "./status-overview-surface.ts";
import type { AgentLocalStatus } from "./status.agent-local.js";
import {
buildStatusFooterLines,
buildStatusHealthRows,

View File

@@ -65,10 +65,7 @@ describe("provider replay helpers", () => {
}
// These legacy models SHOULD drop thinking blocks
for (const modelId of [
"claude-3-7-sonnet-20250219",
"claude-3-5-sonnet-20240620",
]) {
for (const modelId of ["claude-3-7-sonnet-20250219", "claude-3-5-sonnet-20240620"]) {
const policy = buildAnthropicReplayPolicyForModel(modelId);
expect(policy).toMatchObject({ dropThinkingBlocks: true });
}