mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 19:54:57 +00:00
refactor: dedupe agent and reply runtimes
This commit is contained in:
@@ -182,6 +182,16 @@ export function emitAssistantLifecycleErrorAndEnd(params: {
|
||||
params.emit({ type: "agent_end" });
|
||||
}
|
||||
|
||||
export function createReasoningFinalAnswerMessage(): AssistantMessage {
|
||||
return {
|
||||
role: "assistant",
|
||||
content: [
|
||||
{ type: "thinking", thinking: "Because it helps" },
|
||||
{ type: "text", text: "Final answer" },
|
||||
],
|
||||
} as AssistantMessage;
|
||||
}
|
||||
|
||||
type LifecycleErrorAgentEvent = {
|
||||
stream?: unknown;
|
||||
data?: {
|
||||
|
||||
Reference in New Issue
Block a user