fix(config): normalize channel streaming config shape (#61381)

* feat(config): add canonical streaming config helpers

* refactor(runtime): prefer canonical streaming accessors

* feat(config): normalize preview channel streaming shape

* test(config): lock streaming normalization followups

* fix(config): polish streaming migration edges

* chore(config): refresh streaming baseline hash
This commit is contained in:
Vincent Koc
2026-04-06 05:08:20 +01:00
committed by GitHub
parent 93ddcb37de
commit 0fdf9e874b
48 changed files with 3012 additions and 705 deletions

View File

@@ -1,6 +1,11 @@
import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
import {
resolveChannelStreamingBlockCoalesce,
resolveChannelStreamingBlockEnabled,
resolveChannelStreamingChunkMode,
} from "openclaw/plugin-sdk/channel-streaming";
import { normalizeResolvedSecretInputString, normalizeSecretInputString } from "../secret-input.js";
import type {
MattermostAccountConfig,
@@ -27,6 +32,7 @@ export type ResolvedMattermostAccount = {
oncharPrefixes?: string[];
requireMention?: boolean;
textChunkLimit?: number;
chunkMode?: MattermostAccountConfig["chunkMode"];
blockStreaming?: boolean;
blockStreamingCoalesce?: MattermostAccountConfig["blockStreamingCoalesce"];
};
@@ -112,8 +118,10 @@ export function resolveMattermostAccount(params: {
oncharPrefixes: merged.oncharPrefixes,
requireMention,
textChunkLimit: merged.textChunkLimit,
blockStreaming: merged.blockStreaming,
blockStreamingCoalesce: merged.blockStreamingCoalesce,
chunkMode: resolveChannelStreamingChunkMode(merged) ?? merged.chunkMode,
blockStreaming: resolveChannelStreamingBlockEnabled(merged) ?? merged.blockStreaming,
blockStreamingCoalesce:
resolveChannelStreamingBlockCoalesce(merged) ?? merged.blockStreamingCoalesce,
};
}