mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 23:40:23 +00:00
fix(boundary): restore warm support shard checks
This commit is contained in:
@@ -3,7 +3,6 @@ import type {
|
||||
ChannelDoctorLegacyConfigRule,
|
||||
} from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { hasLegacyAccountStreamingAliases } from "openclaw/plugin-sdk/runtime-doctor";
|
||||
import { resolveTelegramPreviewStreamMode } from "./preview-streaming.js";
|
||||
|
||||
function asObjectRecord(value: unknown): Record<string, unknown> | null {
|
||||
@@ -30,6 +29,17 @@ function hasLegacyTelegramStreamingAliases(value: unknown): boolean {
|
||||
return typeof streaming === "string" || typeof streaming === "boolean";
|
||||
}
|
||||
|
||||
function hasLegacyAccountStreamingAliases(
|
||||
value: unknown,
|
||||
match: (entry: unknown) => boolean,
|
||||
): boolean {
|
||||
const accounts = asObjectRecord(value);
|
||||
if (!accounts) {
|
||||
return false;
|
||||
}
|
||||
return Object.values(accounts).some((account) => match(account));
|
||||
}
|
||||
|
||||
function ensureNestedRecord(owner: Record<string, unknown>, key: string): Record<string, unknown> {
|
||||
const existing = asObjectRecord(owner[key]);
|
||||
if (existing) {
|
||||
|
||||
Reference in New Issue
Block a user