mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 06:41:44 +00:00
style(repo): format touched helpers and tests
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
* {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user