import type { StreamFn } from "@mariozechner/pi-agent-core"; import type { ProviderWrapStreamFnContext } from "openclaw/plugin-sdk/plugin-entry"; import {
applyAnthropicEphemeralCacheControlMarkers,
buildCopilotDynamicHeaders,
hasCopilotVisionInput,
streamWithPayloadPatch,
} from "openclaw/plugin-sdk/provider-stream-shared"; import { rewriteCopilotResponsePayloadConnectionBoundIds } from "./connection-bound-ids.js";
type _StreamContext = Parameters<StreamFn>[1];
type StreamOptions = Parameters<StreamFn>[2];
function patchOnPayloadResult(result: unknown): unknown { if (result && typeof result === "object" && "then" in result) { return Promise.resolve(result).then((next) => {
rewriteCopilotResponsePayloadConnectionBoundIds(next); return next;
});
}
rewriteCopilotResponsePayloadConnectionBoundIds(result); return result;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.