UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

17 lines (16 loc) • 797 B
//#region src/agents/diagnostic-model-response.ts /** * Resolves the model's own final message text for diagnostic capture. Only the * text of the model's last message counts, including sentinels such as * NO_REPLY: message-tool send text, earlier turn text the runner substituted * for an empty last message, delivery output, and host or hook text are never * returned. Blocked and hook-handled turns never ran a model; errored runs may * retain genuine partial model output and keep it. */ function resolveDiagnosticModelResponse(e) { if (e.meta.livenessState === "blocked" || e.meta.providerStarted === false) return; const t = e.meta.finalAssistantMessageRawText ?? e.meta.finalAssistantRawText; return t?.trim() ? t : void 0; } //#endregion export { resolveDiagnosticModelResponse as t };